protected internal override IEnumerable <TypeSpec> OnLoadGenericArguments() { if (Type == null) { return(Enumerable.Empty <TypeSpec>()); } return(Type.GetGenericArguments().Select(x => TypeResolver.FromType(x))); }
protected internal virtual TypeSpec OnLoadPropertyType() { if (PropertyInfo == null) { throw new InvalidOperationException("Unable to load PropertyType when PropertyInfo is null."); } return(TypeResolver.FromType(PropertyInfo.PropertyType)); }
public virtual TypeSpec OnLoadBaseType() { if (Type == null) { throw new InvalidOperationException("Don't know where to get base from when Type is null."); } return(Type.BaseType != null?TypeResolver.FromType(Type.BaseType) : null); }
protected internal virtual TypeSpec OnLoadDeclaringType() { if (PropertyInfo == null) { throw new InvalidOperationException("Unable to load DeclaringType when PropertyInfo is null."); } var decType = PropertyInfo.DeclaringType; return(decType != null?TypeResolver.FromType(decType) : null); }