Developer's Corner
Here is a list of code snippets I want to share with anyone interested in.
WPF Binding and INotifyPropertyChanged Speed Test [C#][WPF][.NET]
A sample WPF 4.0 application containing 5 implementations of data bound objects supporting property change notification:
- based on DependencyObject
- INotifyPropertyChange with hardcoded string as property name
- INotifyPropertyChange with hardcoded EventArgs as property name
- INotifyPropertyChange with property name resolution using Expression Tree
- INotifyPropertyChange with property name resolution using cached anonymous class and Expression Tree
The application allows to run performance test against all aforementioned implementations. There are also some well-known techniques illustrated, such as attributes, late binding, value converters, data template initialization hooks.
Download BindingSpeedTest.zip
CSMTPAuthConnection [C++][ATL]
This is an extension to ATL's CSMTPConnection class with ESMTP and authentication support. Methods added are self-descriptive and do not require extensive comments:
- ConnectESMTP
- AuthenticateLogin
- AuthenticateNTLM
There are two more helper classes in addition. CMimeHTML makes the deal with HTML-formatted messages easier, CMimeMessage2 is a support to CMimeHTML.
Download CSMTPAuthConnection.zip
EnumerateGroupUsers Sample [C#][.NET]
.NET 1.1 C# sample that shows how to enumerate and get all users belonging to a group in Active Directory.
Download EnumerateGroupUsers.cs