Browse by Tags

All Tags » General (RSS)

C# Code Snippets for properties raising PropertyChanged event by marianor

I decided to publish the snippets I use to implement properties that raise the PropertyChanged event. There are two code snippets, one generates a property raising the event, it is called by typing propnpc in the code editor, and generates the following...
Filed under:

MOQ 3.5 Beta released by marianor

MOQ 3.5 Beta was released, it includes a lot of fixes of the previous version. You can get the binaries here . If you are using Visual Studio 2010 you should download the version called: Moq 3.5 Beta Binaries and Help (with Castle Assemblies) .
Filed under:

MOQ 3.1 released by marianor

Finally MOQ 3.1 was released, it includes a lot of fixes of the previous version (3.0). You can get the binaries here .
Filed under:

Using expression trees to get property getter and setters by marianor

There are times when you need get and set property values and you do not know the type of the properties. One option is use reflection through GetValue and SetValue from PropertyInfo class, but this wears to poor performance in our code. In order to do...
Filed under:

Moq 3.0 Final by marianor

Finally the new version of Moq is released, check the new improvements and fixes here . You can get the binaries from http://moq.me/get . Enjoy It !!!
Filed under:

Sticky notes add-in for Visual Studio by marianor

My coworker Pablo has released a nice Visual Studio add-in called Sticky Notes . Basically this add-in allows to write sticky notes in your code , that can be private notes or team notes.
Filed under:

Easy way to compare two XMLs for equality by marianor

The first thing to do is normalize to two XMLs, for this you can use a small method using Linq:   private static XElement Normalize( XElement element) {     if (element.HasElements)     {        ...
Filed under: ,

Simulating command line parameters in Click Once applications by marianor

The impossibility of send command line arguments to an application in a standard way is one disappointed thing about ClickOnce. However we can send query string arguments in order to simulate command line arguments. First, we will need to enable the application...
Filed under:

Generic expression IComparer by marianor

This provides a generic IComparer using Linq expressions, the aim of the ExpressionComparer<T> is allow you sort collections or arrays of classes through its properties. The constructor of the expression comparer receives a: params Func <T, IComparable...
Filed under:

Unhandled exceptions in children threads by marianor

When an exception is thrown in a thread that is not the main thread, it can be catch with the event UnhandledException of the AppDomain class. However attaching this event can not avoid the application to crash. There are two ways to workaround this issue...
Filed under:
More Posts Next page »