Пример #1
0
        public static TTarget As <TTarget>(this object source)
            where TTarget : class
        {
            var adapter = TypeAdapterFactory.Create();

            return(adapter.Adapt <TTarget>(source));
        }
Пример #2
0
        public static List <TTarget> AsCollection <TTarget>(this IEnumerable <object> source)
            where TTarget : class
        {
            var adapter = TypeAdapterFactory.Create();

            return(adapter.Adapt <List <TTarget> >(source));
        }