Geeks With Blogs
Bruce Ge
Although delegate type and Enum type are class types, we can not inherit from them as they are sealed classes after compile, public delegate void DelegateTestType(); //Compile time error class myTest : DelegateTestType { ... } we can not make it as a type constraint either on class or method: //Compile time error class myTest<T> where T : DelegateTestType ......

We all know the usage of the anonymous type: var obj = new { Name = "John", Age = 24 }; What if we want to add a anonymous delegate or Lamba to it? Like: var obj = new { Name = "John", Age = 24, behaviour=delegate(string name, int age) { return "Customer Name: " + name + ", Age: " + age; } }; or var obj = new { Name = "John", Age = 24, behaviour = (name, ......

for the ado database sync, the method public virtual SyncContext ApplyChanges(SyncGroupMetadata groupMetadata, DataSet dataSet,SyncSession syncSession) on server side is not efficient, as it receive the changed data from client side, but it again sent it back to client within the SyncContext. In the returned SyncContext object, I found DataSet and GroupProgress.Changes ......

I was using Gzip Encoder to compress wcf message, it surprised me that sometimes the compression message size is even bigger than the original size, so I looked the code, I found within GZipMessageEncoderFactory.cs, the method "CompressBuffer" in the GZipMessageEncoderFactory class is not quite right. it was like this originally: private static ArraySegment<byte> ......

Been using ReliableSessionBindingElement within WCF, I found we can not set the retry interval, as we only can set MaxRetryCount. WCF uses an internal algorithm to determine when to retransmit, based on a computed average round-trip time. The initial retry time is computed based on the measured roundtrip time of establishing the session. The retransmission ......

I have been working on database synchronization for a couple of weeks, and seems it at the final testing stage, I am using Microsoft Sync Framework 2.0, the DB server is SQL server 2008 Standard, and clients are SQL Server 2008 Express as I use Change Tracking to track DB changes instead of TombStone Tables and Guid tracking columns, I use WCF+IIS+SSL ......

Copyright © argot | Powered by: GeeksWithBlogs.net