Format:
Recent snippets matching tags of MvcContrib
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,
582 Views
no comments
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;
268 Views
no comments
// Map content before registering areas protected void Application_Start() { Content.Map<MyPortableArea>() .Master("~/Views/Shared/PA.master") .Title("PATitle") .Body("PAMain"); AreaRegistration.RegisterAllAreas();
277 Views
no comments
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;
295 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
