public bool IsAssignableFrom(TypeProxy type) { if (type == null) { throw new ArgumentNullException("type"); } return(_type.IsAssignableFrom(type._type)); }
private TypeProxy MakeGenericType(Type templateType, TypeProxy argType) { if (argType == null) { throw new ArgumentNullException("argType"); } var templateTypeProxy = MakeTypeProxy(templateType); return(templateTypeProxy.MakeGenericType(argType)); }
public bool Equals(TypeProxy other) { if (other == null) { return(false); } else if (Object.ReferenceEquals(this, other)) { return(true); } else { return(_type.Equals(other._type)); } }
internal TypeProxy MakeTypeProxy(Type type) { if (type == null) { throw new ArgumentNullException("type"); } TypeProxy proxy; if (!_proxies.TryGetValue(type, out proxy)) { proxy = new TypeProxy(_utils, type); _proxies.Add(type, proxy); } return(proxy); }
public TypeProxy MakeGenericDictionaryType(TypeProxy keyTypeProxy, TypeProxy valueTypeProxy) { return(MakeGenericType(typeof(IDictionary <,>), keyTypeProxy, valueTypeProxy)); }
public TypeProxy MakeGenericSetType(TypeProxy elementTypeProxy) { return(MakeGenericType(typeof(ISet <>), elementTypeProxy)); }
public TypeProxy MakeGenericEnumerableType(TypeProxy elementTypeProxy) { return(MakeGenericType(typeof(IEnumerable <>), elementTypeProxy)); }
public TypeProxy MakeGenericNullableType(TypeProxy valueTypeProxy) { return(MakeGenericType(typeof(Nullable <>), valueTypeProxy)); }