11 2012 档案
CSharp设计模式读书笔记(5):原型模式(学习难度:★★★☆☆,使用频率:★★★☆☆)
摘要:原型模式(Prototype Pattern):使用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象。模式角色与结构:示例代码:using System;using System.Collections.Generic;using System.Linq;using System.Tex...
阅读全文
CSharp设计模式读书笔记(4):单例模式(学习难度:★☆☆☆☆,使用频率:★★★★☆)
摘要:单例模式(Singleton Pattern):确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例,这个类称为单例类,它提供全局访问的方法。模式角色与结构:示例代码:using System;using System.Collections.Generic;using System.L...
阅读全文
CSharp设计模式读书笔记(3):抽象工厂模式(学习难度:★★★★☆,使用频率:★★★★★)
摘要:抽象工厂模式(Abstract Factory Pattern):提供一个创建一系列相关或相互依赖对象的接口,而无须指定它们具体的类。抽象工厂模式又称为Kit模式。模式角色和结构图:抽象工厂是指一个工厂等级结构可以创建出分属于不同产品等级结构的一个产品族中的所有对象。示例代码:using Syste...
阅读全文
CSharp设计模式读书笔记(2):工厂方法模式(学习难度:★★☆☆☆,使用频率:★★★★★)
摘要:工厂方法模式(Factory Method Pattern):定义一个用于创建对象的接口,让子类决定将哪一个类实例化。工厂方法模式让一个类的实例化延迟到其子类。工厂方法模式又简称为工厂模式(Factory Pattern),又可称作虚拟构造器模式(Virtual Constructor Patter...
阅读全文
CSharp设计模式读书笔记(1):简单工厂模式(学习难度:★★☆☆☆,使用频率:★★★☆☆)
摘要:Simple Factory模式实际上不是GoF 23个设计模式中的一员。模式角色与结构:示例代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace CSharp.D...
阅读全文
CSharp设计模式读书笔记(0):设计原则(学习难度:★★☆☆☆,使用频率:★★★★★)
摘要:{参考:http://blog.csdn.net/lovelion/article/details/17517213}单一职责原则(Single Responsibility Principle--SRP):一个类只负责一个功能领域中的相应职责,或者可以定义为:就一个类而言,应该只有一个引起它变化的...
阅读全文
CLR Via CSharp读书笔记(6):类型和成员基础
摘要:类型成员定义:类型的可访问性: internal: 仅对定义程序集中的所有代码可见。类型默认可见性为internal;publicclassThisIsAPublicType{}internalclassThisIsAnInternalType{}classThisIsAlsoAnInternalT...
阅读全文
CLR Via CSharp读书笔记(5):基元类型、应用类型和值类型
摘要:引用类型和值类型应用类型:类值类型:结构体和枚举System.Object-->System.ValueType-->System.TimeSpan结构System.Object-->System.ValueType-->System.Enum--> System.DayOfWeek枚举值类型可以实...
阅读全文
CLR Via CSharp读书笔记(3, 4):共享程序集和强命名程序集, 类型基础
摘要:共享程序集和强命名程序集difference between weakly named and strongly named assemblies:a strongly named assembly is signed with a publisher’s public/private key pa...
阅读全文
CLR Via CSharp读书笔记(2):生成、打包、部署以及管理应用程序及类型
摘要:Ch02-1-SimpleProgram.cspublic sealed class Program { public static void Main() { System.Console.WriteLine("Hi"); }}Ch02-2-Minimum MSCorLib.cs// This project is a DLL that has the "Do not reference mscorlib.dll" option turned onnamespace System { public class Object { } public str
阅读全文
CLR Via CSharp读书笔记(1):CLR的执行模型
摘要:ch01-1-WinInstall.bat@ECHO OFFREM The following directory is for .NET 2.0set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319set PATH=%PATH%;...
阅读全文
WCF服务编程读书笔记(1,2):WCF基础 & 服务契约
摘要:例2-1:服务端的操作重载using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;namespace WCFServiceProgrammi...
阅读全文
WCF服务编程读书笔记(3):数据契约
摘要:Example 3-1. The DataContractSerializerusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Xml;namespace WCFServiceProgramming{ public abstract class XmlObjectSerializer { public virtual object ReadObject(Stream stream); ...
阅读全文
WCF服务编程读书笔记(4):实例管理
摘要:Example 4-1. The ServiceBehaviorAttribute used to configure instance context modeusing System;using System.Collections.Generic;using System.Linq;using System.Text;namespace WCFServiceProgramming{ public enum InstanceContextMode { PerCall, PerSession, Single } [Attrib...
阅读全文
WCF服务编程读书笔记(5):操作
摘要:Example 5-1. Defining and configuring a callback contractusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.ServiceModel.Channels;using System.Diagnostics;using System.Runtime.Serialization;namespace WCFServiceProgramming.Library{
阅读全文
WCF服务编程读书笔记(6):错误
摘要:Example 6-1. The FaultException classusing System;using System.Runtime;using System.Runtime.Serialization;using System.Security;using System.ServiceModel.Channels;namespace System.ServiceModel{ [Serializable] //More attributes public class FaultException : CommunicationException { pu...
阅读全文
WCF服务编程读书笔记(7):事务
摘要:Example 7-1. Explicit transaction managementusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.ServiceModel.Channels;using System.Diagnostics;using System.Runtime.Serialization;using System.ServiceModel.Dispatcher;using System.Ser
阅读全文
WCF服务编程读书笔记(8):并发管理
摘要:Example 8-1. Manual synchronization using fragmented lockingusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.Transactions;namespace WCFServiceProgramming.Library{ [ServiceContract(SessionMode = SessionMode.Required)] publi...
阅读全文
WCF服务编程读书笔记(9):队列服务
摘要:Example 9-1. Implementing and consuming a queued serviceusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;namespace WCFServiceProgramming.Library{ [ServiceContract] public interface IMyContract { [OperationContract(IsOneWay = ...
阅读全文
WCF服务编程读书笔记(10):安全
摘要:Example 10-1. Programmatically securing the basic bindingBasicHttpBinding binding1 = new BasicHttpBinding(BasicHttpSecurityMode.Message);BasicHttpBinding binding2 = new BasicHttpBinding( );binding2.Security.Mode = BasicHttpSecurityMode.Message;Example 10-2. Administratively securing the basic bindin
阅读全文
软件开发过程读书笔记(1):RUP
摘要:RUP: Rational Unified Process(Rational统一过程)软件过程模式中四大要素:生命周期,人员,方法和产品生命周期:业务建模-->需求-->分析设计-->实施-->测试-->部署配置和变更管理,项目管理,环境 先启-->精华-->构建-->产品化 人员:分析员,开发人员,测试员,经理,其他角色 (图形设计员,系统管理员,技术文档编写员,工具专家)方法:用例及用例驱动 以架构为中心 在面向对象的分析设计中采用UML进行可视化建模 面向对象的设计与构件实现 产品:工件:中间或最终产物
阅读全文
WCF之旅读书笔记(1):WCF重载和继承
摘要:<wsdl:operationname="AddWithThreeOperands">[OperationContract(Name="AddWithTwoOperands")] doubleAdd(doublex,doubley);classMyCalculatorClient:ClientBase<IMyCalculator>,IMyCalculator { publicdoubleAdd(doublex,doubley) { returnthis.Channel.Add(x,y); } }关键是ClientBase以及重写的
阅读全文
WCF之旅读书笔记(2):WCF如何通过Binding进行通信
摘要:Server端: Uri-->binding.BuildChannelListener<IReplyChannel(Uri)-->ChannelListener<IReplyChannel>.AcceptChannel()-->channel.ReceiveRequest(TimeSpan)-->RequestContext.Reply(Message).Client端: EndpointAddress-->binding.BuildChannelFactory<IRequestChannel>-->channelFactory
阅读全文
Javascript读书笔记(1):从零开始
摘要:<metahttp-equiv="X-UA-Compatible"content="IE=EmulateIE9"/>什么情况下使用JavaScript?在任何不得不用的场合使用,除此之外,不要再任何场合使用!JavaScript是面向对象的吗?JavaScript没有基于类的继承,但它有基于原型的继承。说JavaScript是一种基于对象的语言,是一种正确而略显保守的判断;说JavaScript不面向对象,则是错误的认知。JavaScript版本?http://www.csdn.net/article/2012-02-15/311826und
阅读全文
Inside SharePoint 2010 (5): Pages and Navigation
摘要:#1, The SharePoint section of the web.config fileView Code <configuration><configSections><sectionGroupname="SharePoint"><sectionname="SafeControls"/><sectionname="RuntimeFilter"/><sectionname="WebPartLimits"/><sectionnam
阅读全文
Inside SharePoint 2010 (4): Sandboxed Solutions
摘要:#1, Work Processes sandbox solution usesExecution Manager: Loading and execution of sandboxed solution code C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\UserCodeC:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\wss_usercode.configC:\Program Fil
阅读全文
Inside SharePoint 2010 (3): Developing a SharePoint Solution (Class Library Project)
摘要:#1, Create solution structure#2: feature.xml<FeatureId="86689158-7048-4421-AD21-E0DEF0D67C81"Title="WingtipLeadTracker"Description="AsamplefeaturedeployedusingLocalhostDevProject1.wsp"Version="1.0.0.0"Scope="Web"Hidden="FALSE"ReceiverAss
阅读全文
Inside SharePoint 2010 (2): Enabling the SharePoint 2010 Developer Dashboard
摘要:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingMicrosoft.SharePoint;usingMicrosoft.SharePoint.Administration;namespaceConsoleApplication1{classProgram{staticvoidMain(string[]args){SPDeveloperDashboardSettingssettings=SPWebService.ContentService.DeveloperDashboardS
阅读全文
Inside SharePoint 2010 (1): SharePoint 2010 HelloWorld
摘要:#1, 系统架构#2, 代码usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingMicrosoft.SharePoint;namespaceConsoleApplication1{classProgram{staticvoidMain(string[]args){constStringsiteUrl="http://localhost";using(SPSitesiteCollection=newSPSite(siteUrl)){SPWebsite=siteCo
阅读全文
浙公网安备 33010602011771号