04 2011 档案
wcf trace and log config
摘要:<configuration> <system.diagnostics> <sources> <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing"> <listeners> <add type="System.Diagnostics.DefaultTraceListener" name="Default"> <fil 阅读全文
posted @ 2011-04-28 10:42 cwe 阅读(799) 评论(0) 推荐(0)
DBHelper
摘要:using System;using System.Collections;using System.Collections.Specialized;0006using System.Data;0007using System.Data.SqlClient;0008using System.Configuration;0009using System.Data.Common;0010using System.Collections.Generic;0011namespace Legalsoft.Wizard.DBUtility0012{0013public enum EffentNextTyp 阅读全文
posted @ 2011-04-21 18:55 cwe 阅读(319) 评论(0) 推荐(0)
对制造者线程和使用者线程进行同步(C# 编程指南)
摘要:下面的示例演示使用 lock 关键字以及 AutoResetEvent 和 ManualResetEvent 类对主线程和两个辅助线程进行线程同步。有关更多信息,请参见 lock 语句(C# 参考)。 该示例创建两个辅助线程。一个线程生成元素并将它们存储在非线程安全的泛型队列中。有关更多信息,请参见 Queue。另一个线程使用此队列中的项。另外,主线程定期显示队列的内容,因此该队列被三个线程访问。lock 关键字用于同步对队列的访问,以确保队列的状态没有被破坏。 除了用 lock 关键字来阻止同时访问外,还用两个事件对象提供进一步的同步。一个事件对象用来通知辅助线程终止,另一个事件对象由制造者 阅读全文
posted @ 2011-04-14 19:57 cwe 阅读(215) 评论(0) 推荐(0)