Alois Kraus

blog

  Home  |   Contact  |   Syndication    |   Login
  106 Posts | 8 Stories | 293 Comments | 162 Trackbacks

News



Article Categories

Archives

Post Categories

Image Galleries

Programming

February 2006 Entries

The following code sample shows how to configure the Enterprise Library Logging Block programatically without the help of ObjectBuilder. To create a working LogWriter instance with your own settings you need to create the following objects: A Formatter which contains a valid message template A LogSource which has a name (Category) contains a colleciton of Listeners (Sinks) along with the Formatter. A collection LogSources with the category as key and the LogSource object as valueTo use this logger ......

After reading Mike Stalls Debugging Blog I was wondering if it is really impossible to pass property values by reference: void PassIntByRef(ref int x) ... PassIntByRef(ref MyProperty); <-- this is illegal in C#.Another restriction which is often annoying is that you cannot have property delegates. class PropertyDelegation { public delegate int ReturnValueDelegate(); ReturnValueDelegate ValueGetter; int x = 0; public int X // This is our beloved property we care so much about. { get { return x; ......

Good news. I am a Patterns and Practices Champions Award winner. I am very happy to be given this award by the Microsoft Patterns and Practices team. There is much more to be told about best programming practices for the .NET platform and especially the Enterprise Library. At the moment I have very little time since I have some new challenges at work to master and the urgent need to go skiing in the Alps in Austria ;-). But I promise to do my best to post some a small sample on how to use the Enterprise ......