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 MvcContrib
C#
public static class MapExtensions
{
    public static IMappingExpression<IPagination<TSource>, IPagination<TDestination>> ConstructPagination<TSource, TDestination>(this IMappingExpression<IPagination<TSource>, IPagination<TDestination>> map)
        where TSource : class
        where TDestination : class
    {
        return map.ConstructUsing(src => 
                new CustomPagination<TDestination>(src.ToList().Select(p => AutoMapper.Mapper.Map<TSource, TDestination>(p)),
                    src.PageNumber,
                    src.PageSize,
by John Nelson   August 09, 2010 @ 6:52pm
582 Views
no comments
 
C#
using System;
using System.Collections.Specialized;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Mvc;
using Moq;
using MvcContrib.Web.Security;
using NUnit.Framework;
by Pure Krome   June 01, 2010 @ 10:45pm
268 Views
no comments
 
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