CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of PortableAreas
C#
// Map content before registering areas
protected void Application_Start()
{
    Content.Map<MyPortableArea>()
        .Master("~/Views/Shared/PA.master")
        .Title("PATitle")
        .Body("PAMain");
 
    AreaRegistration.RegisterAllAreas();
by John Nelson   May 19, 2010 @ 9:33pm
277 Views
no comments
 
C#
private static IEnumerable<Type> FindAllMessageHandlers()
{
    var iMessageHandler = typeof(IMessageHandler);
 
    var types = from type in AppDomain.CurrentDomain.GetAssemblies().SelectMany(t => t.GetTypes())
            let canInstantiate = !type.IsInterface && !type.IsAbstract && !type.IsNestedPrivate
            let isIMessageHandler = type.GetInterface(iMessageHandler.Name) != null
            where canInstantiate && isIMessageHandler
            select type;
by John Nelson   May 06, 2010 @ 7:03pm
295 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate