2
using System.Reflection;
4
using Proxy = ServiceStack.Common.ReflectionExtensions;
6
namespace ServiceStack.Common.Extensions
8
public static class ReflectionExtensions
10
public static To PopulateWith<To, From>(this To to, From from)
12
return Proxy.PopulateWith(to, from);
15
public static To PopulateWithNonDefaultValues<To, From>(this To to, From from)
17
return Proxy.PopulateWithNonDefaultValues(to, from);
20
public static To PopulateFromPropertiesWithAttribute<To, From, TAttr>(this To to, From from)
22
return Proxy.PopulateFromPropertiesWithAttribute<To, From, TAttr>(to, from);
25
public static T TranslateTo<T>(this object from)
28
return Proxy.TranslateTo<T>(from);
31
public static TAttribute FirstAttribute<TAttribute>(this Type type)
33
return Proxy.FirstAttribute<TAttribute>(type);
36
public static TAttribute FirstAttribute<TAttribute>(this Type type, bool inherit)
38
return Proxy.FirstAttribute<TAttribute>(type, inherit);
41
public static TAttribute FirstAttribute<TAttribute>(this PropertyInfo propertyInfo)
43
return Proxy.FirstAttribute<TAttribute>(propertyInfo);
46
public static TAttribute FirstAttribute<TAttribute>(this PropertyInfo propertyInfo, bool inherit)
48
return Proxy.FirstAttribute<TAttribute>(propertyInfo, inherit);
51
public static bool IsGenericType(this Type type)
53
return Proxy.IsGenericType(type);
56
public static Type FirstGenericTypeDefinition(this Type type)
58
return Proxy.FirstGenericTypeDefinition(type);