Jeremiah Clark's Blog

A place to collect my ramblings about Microsoft and the .NET Framework.

Browse by Tags

Tagged Content List
  • Blog Post: Visual Studio Unit Testing Extensions v1.2.0.0

    Version 1.2.0.0 of these Unit Testing Extensions are available on CodePlex today. The original post that talks about the project can be found here .  An updated NuGet package is also available . This release contains additional assertions on IEnumerable<T>, String, and Type.  Additionally...
  • Blog Post: ASP.NET MVC: Fun With Routes

    For the purposes of this post, let’s say that we are building a community blogging site.  We want multiple users to be able to maintain separate blogs on the site.  We have an area in our MVC application that is called Blogs .  We have a controller in the Blogs area called BlogController...
  • Blog Post: Visual Studio Testing Extensions now available on NuGet

    I have become a huge fan of NuGet lately.  It really makes managing references and dependencies a lot easier. If you are not familiar with NuGet, here is the description from its site: NuGet (formerly known as NuPack) is a free, open source developer focused package management system for the .NET...
  • Blog Post: Visual Studio Unit Testing Extensions v1.1.0.0

    I just released version 1.1.0.0 of these Unit Testing Extensions on CodePlex today. The original post that talks about the project can be found here . This release contains additional assertions on DateTime, ICollection<T>, and String. This release is also targeted to the .NET 4 Framework. ...
  • Blog Post: ServiceLocator and Unity – Be Careful

    Chris Tavarez has provided a handy adapter ( UnityServiceLocator ) for using ServiceLocator to resolve types from a Unity container. You can then use ServiceLocator.SetLocatorProvider() to register the UnityServiceLocator as the default provider for ServiceLocator. For this example, we will be using...
  • Blog Post: Tip: Entity Framework, Unity, and The ASP.NET RoleProvider – Read the MSDN Fine Print

    A custom Role Provider is a very useful tool for adding custom authorization to your ASP.NET and/or ASP.NET MVC applications. A common use for a custom Role Provider is when you have role information stored in a data store that differs from the schema that is used by the built-in ASP.NET Role Providers...
  • Blog Post: Testing Your Unity XML Configuration

    When using Unity as your IoC container , one way to configure the container is to use an configuration section in your app.config or web.config file. A simplified example of this configuration is shown below: 1: <? xml version ="1.0" encoding ="utf-8" ? > 2: < configuration >...
  • Blog Post: Dynamic Expression Trees

    I have been working on a project that uses the Entity Framework as the persistence store. I am implementing a global search capability that returns results from the various entities that have a string property that start with a given query string. So I started out with writing code for each entity that...
  • Blog Post: Provide Caching For Your Complex Functions

    Function caching, or more specifically memoization , is a code optimization technique that can be used to speed up code that calls complex functions with the same inputs.  Let's take a look at the classic fibonacci function: 1: private int Fib( int val) 2: { 3: return val <= 2 ? 1 ...
  • Blog Post: Extending MVC: Returning an Image from a Controller Action

    So I was thinking tonight, what if I want my MVC application to serve images that are stored in a SQL database as binary data? Or files that are stored in the database?   One of the things that I really like about MVC is that ability to add custom functionality in a fairly simple way. ...
  • Blog Post: Autocompletion Textbox in MVC Using jQuery

    Ok, I have to admit it: jQuery is awesome. If you haven't started looking at it, I highly recommend that you do. It works wonders in the ASP.NET MVC world. One of the best things about jQuery is the enormous number of plug-ins that are available for adding even more functionality to the library. The...
  • Blog Post: CheckBoxList Helper for MVC

    The early previews of the MVC Toolkit contained a few helpers that are not available in the current MVC Beta and MVC Beta Futures .  On of the ones that was nixed was the CheckBoxList helper.  I was in need of this type of functionality lately and found myself out of luck.  I needed to...
  • Blog Post: Use PowerShell To Test Code Snippets

    If you are like me, then you might have multiple Console applications in your projects folder that you use for testing small chunks of code.  I think at one point recently, I was up to ConsoleApplication28 before I cleaned up the unused projects.  These are typically used for testing small...
  • Blog Post: Lazy Evaluation requires you to think outside the box

    I was watching a presentation today and there was a point brought up that I found really interesting. Say you have the following LINQ code: 1: int [] iArray = new int [] { 5, 4, 3, 2, 1, 0 }; 2:   3: IEnumerable< int > results = iArray.Select(i => 100 / i); 4:   ...
  • Blog Post: Consume an RSS Feed with .NET 3.5

    .NET 3.5 added some new classes that really help when dealing with RSS/ATOM feeds.  These classes are located in the System.ServiceModel.Syndication namespace in the System.ServiceModel.Web.dll library.  The SyndicationFeed class in this namespace can be used to both expose and consume a feed...
  • Blog Post: Specifying Global Assembly Cache Permissions

    I came across this problem today.  I am using SQL Reporting Services to send reports to a SharePoint document library on a scheduled basis by using the Copy webservice that SharePoint provides.  It was working as expected during initial testing.  The report would be generated and then...
  • Blog Post: When is a List not a List?

    The answer: When it is a SortedList. Here is one issue that I have with the Framework.  The name SortedList<T> implies that the class inherits IList<T>, but it does not.  In fact, it implements IDictionary<TKey,TValue>. This issue came up lately in a project I was working...
  • Blog Post: Parallel Extensions June 2008 CTP Released

    The Parallel Programming team has released a June 2008 CTP of the Parallel Extensions for .NET. They have made some good improvements over the last version. More about the release can be found here . The CTP can be downloaded here .
  • Blog Post: Singularity Now Available On CodePlex

    Singularity is an operating system research project that is being developed by Microsoft Research.  They have recently released the Singularity Research Development Kit on CodePlex and it looks quite interesting. Singularity is mostly written in managed code (C#) with only a small amount of unsafe...
  • Blog Post: How to Assign a Strong Name to an Unsigned 3rd-Party Assembly

    Here is the scenario:  You get a .NET DLL from somewhere that provides some really cool functionality that you need for your BizTalk/SharePoint/etc application.  So you go to install the utility into the GAC, and then you realize that the DLL has not been signed.  If the assembly must...
  • Blog Post: Parallel Extensions for .NET - Part 1

    Some of my recent posts have mentioned the Parallel Extensions to the .NET Framework CTP that was released in December by the Parallel Computing Team at Microsoft. This post is meant to give an introduction to the Parallel Extensions, as well as some resources for the project. The Parallel Extensions...
  • Blog Post: Task Parallel Library on Channel 9

    Joe Duffy and other members of the Parallel Extensions team at Microsoft Research talk about the Task Parallel Library. This is a great presentation and they go into quite a bit of depth about the internals of the TPL. I am very interested in the TPL and PLINQ. I will be posting more about these in the...
  • Blog Post: Visual Studio Tip: Get Public Key Token for a Strong Named Assembly

    I can't remember where I picked this tip up from, but I have found it useful on many occasions so I thought that I would share it. Sometimes I need to reference the strong named assembly that I am writing in a config file or some other location, and I need to put in the fully qualified name such as...
  • Blog Post: Managed BF Language Compiler

    As usual, I received my February 2008 copy of MSDN magazine and proceeded to devour it. An article that I found quite interesting was " Create a Language Compiler for the .NET Framework " by Joel Pobar . It talks about using the code generation features of the CLR to create a compiler. A co-worker...
  • Blog Post: Design By Contact Approach: Spec#

    I recently attended a very interesting presentation by Matt Podwysocki where he talked about Spec#. This is an extension to the C# language that implements the DBC (Design By Contract) approach to development. Spec# was developed by Microsoft Research and you can find more information about it...
Page 1 of 2 (33 items) 12