Vagif Abilov's blog on .NET


Browse by Tags

All Tags » C# (RSS)
Introducing Simple.Data OData provider
Mark Rendle’s Simple.Data has quickly become a popular choice to retrieve data from various data sources. The number of Simple.Data providers includes today SQL Server, Oracle, Mysql, MongoDB and others. When I saw Simple.Data in action, I became enthusiastic...
ConstructorInfo.Invoke over Activator.CreateInstance
About a year ago I blogged about different methods of object instantiation and that compiled lambda expressions should be preferred in case same type is instantiated frequently and instantiation performance is critical. However, on many occasions dealing...
Enhancing SpecFlow set comparison methods
SpecFlow has an excellent set of Table extension methods contributed by Darren Cauthon (he also made a video available on TekPub ). Methods such as CreateInstance, CreateSet or CompareSet enable conversion of SpecFlow tables to strong-typed item collections...
Interaction-based testing and stable expectations
Yesterday I participated in a discussion about how to test the following class (it was actually an interview question). Here’s the class under test: public class ClassUnderTest { private SomeService service; public ClassUnderTest(SomeService service)...
Mock framework challenges in F#
Getting mock framework API rigth is uneasy task. Mock framework designers don’t have as much freedom as designers of other libraries: the purpose of a mock framework is not to expose an arbitraty API (unknown at the time of mock framework design) and...
.NET 4.0 and NotSupportedException complaining about dynamic assemblies
If you search for “The invoked member is not supported in a dynamic assembly” error message, you will get plenty of results. Some of them related to code that worked in .NET 2.0 and 3.x but suddenly stopped working in .NET 4.0. What may be surprising...
Using T4 templates to manage assembly version information
I wanted to configure version information generation for some .NET projects. It’s been a long time since I investigated available options, so I searched around hoping to find some simple way of doing this. What I’ve found didn’t look very encouraging...
How to make .NET application support both console and GUI mode
I am currently working on a next version of a utility to generate Visual Studio solutions . A new version will be called Solution Maker and add user interface support to a command line option. I wanted to mix console and GUI mode in a single program,...
Don’t use Activator.CreateInstance or ConstructorInfo.Invoke, use compiled lambda expressions
For a long time I’ve been under impression that rule engine that comes with Microsoft Windows Workflow Foundation is slow, very slow. We used it to execute some of our business rules, and soon found out that rule processing slows down application execution...
Using “yield” to enumerate endless sequence
Craig Andera in his blog post showed yet another Fibonacci algorithm, this one with “yeild” operator. private IEnumerable Fibonacci() { yield return 0; yield return 1; int a = 0; int b = 1; while (true) { int temp = a + b; a = b; b = temp; yield return...
Posted: Thu, Mar 11 2010 10:41 AM by Vagif Abilov | with no comments
Filed under: ,
NUnitForVS: integrating NUnit tests into Visual Studio
Roy Osherove listed advantages of NUnit over MsTest but also mentioned one MsTest’s strength that can be crucial for many developers: “the integration with other team system tools and reporting is just beyond compare and the reporting alone helps alot...
Fluent object construction
I like an idea to replace constructor overloads that take optional parameters with more fluent approach, so there will be less (and easier for understanding) constructor overloads and more readable code. Perhaps also more writeable. Let’s take an example...
Utility to generate solution files can now create solution folders
If somebody wants more from the program you wrote, it’s a good sign. It means that at last you did something useful :-) Recently my colleague mentioned that the utility that I wrote to generate project solution file should support creation of solution...
Functional programming for C# developers
Latest Jeremy Miller’s article in MSDN Magazine will be very helpful for C# developers who haven’t started yet exploring functional programming. What is good about this article is that it gives practical advices on how to inject some fairly small pieces...
Improving code quality using NDepend
We are often too liberal adding project references. In our team I’ve sent once a warning that every time an assembly reference is added to a project, an angel gets killed, but Norway does not seem to be very religious country. Recently we’ve even had...
More Posts Next page »