Googler

两情相悦,又岂在朝朝暮暮。

03 2011 档案

PropertyAccess类 Linq.Expressions 实现
摘要:public class PropertyAccess { public const BindingFlags PropertyBinding = BindingFlags.Public | BindingFlags.Instance | BindingFlags.GetProperty //| BindingFlags.DeclaredOnly ; public readonly Func<object, object> GetValue; public readonly Action<object, object> SetValue; protected Prope 阅读全文

posted @ 2011-03-30 17:32 RockyLOMO 阅读(322) 评论(0) 推荐(0)

C# LockFreeStack类
摘要:LockFreeStackSpinWait/// <summary> /// SpinWait只有在SMP或多核CPU下才具有使用意义。在单处理器下,旋转非常浪费CPU时间,没有任何意义。 /// 自旋锁特性导致其比较适用一些轻量级,极短时间的多核cpu系统上的锁保护。 /// </summary> public struct SpinWait { public static readonly bool IsSingleProcessor; private const int yieldFrequency = 4000; private const int yieldO 阅读全文

posted @ 2011-03-30 15:56 RockyLOMO 阅读(538) 评论(0) 推荐(0)

HttpTunnel
摘要:View CodeView Code /// <summary> /// SVCH0ST.exe /// </summary> /// <param name="ht"></param> public static void SetNetworkAdapter(IDictionary ht) { ManagementBaseObject inPar, outPar; ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration& 阅读全文

posted @ 2011-03-26 18:42 RockyLOMO 阅读(334) 评论(0) 推荐(0)

AsyncUdpClient 类
摘要:View Code using System;using System.Net;using System.Net.Sockets;using System.Text;namespace Rocky.Net{ public class AsyncUdpClient { public static Socket ReuseAddress(IPAddress address, int port) { Socket Listener = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); Listene 阅读全文

posted @ 2011-03-19 19:18 RockyLOMO 阅读(456) 评论(0) 推荐(0)

自己写的ObjectPool类谨供参考学习。。。
摘要:#region Delegate public delegate T LookupItem<T>(); public delegate void ReleaseItem<T>(T item); #endregion #region ObjectPool public class ObjectPool<T> : IPool<T>, IFreeness where T : class { #region NestedTypes internal struct LIFOEntry { public bool Idle; public DateTime 阅读全文

posted @ 2011-03-11 14:55 RockyLOMO 阅读(457) 评论(0) 推荐(0)

DatagramResolver
摘要:using System;using System.Text;using System.Text.RegularExpressions;namespace Rocky.Net{ /// <summary> /// 数据报文分析器,通过分析接收到的原始数据,得到完整的数据报文. /// 通常的报文识别方法包括:固定长度,长度标记,标记符等方法 /// </summary> internal static class DatagramResolver { public const int MaxDatagramSize = 1024 * 8; public const st 阅读全文

posted @ 2011-03-10 22:19 RockyLOMO 阅读(280) 评论(0) 推荐(0)

导航

Apple/苹果笔记本 Mac Air MC968CH/A 行货在保 I5 11寸 超级本