Threading – thread-safe size capped queue
Here is a queue class based on the implementation Marc Gravell provided in this StackOverflow question:
Here is a queue class based on the implementation Marc Gravell provided in this StackOverflow question:
Whilst listening to the latest .Net Rocks! podcast, I stumbled across HornGet, which is a site that provides pre-compiled binaries for well known open source projects such as NHibernate, RhinoMocks, etc. I posted a while back about the problems I had finding a build of NHibernate which works with both FluentNHibernate and Linq2NHibernate, only if …
Having just listened to a recent .Net Rocks! podcast with Anders Hejlsberg (chief architect of the C# language) in a fittingly named show, “Anders Hejlsberg blows our mind!”, I felt it worthwhile to note down some of the views Anders shared with us, and some nice quotes for you to use in your next geek …
Anders Hejlsberg’s podcast session with .Net Rocks! Read More »
If you have created a WCF service in the past then I assume you’re aware that WCF is very heavily configuration-driven and that you can specify the service behaviour including the throttling parameters (MaxConcurrentCalls, MaxConcurrentInstances, MaxConcurrentSessions) in the config file. But to specify the type of service (PerCall, PerSession or Singleton) you need to apply …
Yet another recurring phrase on DotNetRocks’s podcasts, and a catchy one at that! The term ‘technical debt’ was coined by Ward Cunningham to describe the eventual consequences a software development organization incurs when it chooses to do things the quick and dirty way, which benefits the short-term but increases complexity and ultimately is more costly …
Serialization Overhead When it comes to serializing/deserializing objects for transport through the wire, you will most likely incur some overhead in the serialized message though the amount of overhead varies depends on the data interchange format used – XML is overly verbose where as JSON is much more light-weight: XML representation: JSON representation: {“MyProperty”:10} As …
Extension methods for compressing/decompressing string Read More »
One of the more obscure things I have had to do inside a Castle config is to specify an IEnumerable<T> instance which required taking the technique I showed in this post a little further: I specified the lifestyle of this IEnumerable<T> to be singleton as in most cases where you would want to do something …
Castle Windsor Tips – specifying IEnumerable
Usually an enum type is used to define a set of constants such as colours, etc. but you can also use it to define bit flags and stored any combination of the defined values. You use the FlagsAttribute attribute to create an enum type as bit flags which you can then interact with using the …
You should already know that in C# all types derive from System.Object and that C# supports both reference types (which are allocated onto the heap) as well as value types (primitives, enum, struct, etc. which are allocated onto the stack). One of the key differences between value types and references types is that when you …
Oh, the Pain! For a long time, unit testing non-public methods in C# has been a pain in the back side. In order to test a non-public method (most likely private methods) you have a number of choices each with an undesired effect: The easiest way out is to make the methods public. However, this …
.Net Tips – using InternalsVisibleTo attribute to help testing non-public methods Read More »
By continuing to use the site, you agree to the use of cookies. more information
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.