July 29, 2008
@ 01:28 PM

The type name that you need to use in config files, such as for IoC containers, can be quite complex. For me, it's easier just to spike them than to try to remember the format gobbledy-gook.

public class GenericsTypeSpikes
{
    [Fact]
    public void The_name_of_a_complex_type_can_be_found_in_Type_AssemblyQualifiedName()
    {
        Type t = typeof(IList<ISource>);

        Assert.Equal("System.Collections.Generic.IList`1[[Blah.Core.ISource, Blah.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", t.AssemblyQualifiedName);
    }
}

 
All comments require the approval of the site owner before being displayed.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview