public virtual bool IsTypeToBeIntrospected(Type type) { var returnType = FilterNullableAndProxies(type); return(!IsTypeIgnored(returnType) && !IsTypeUnsupportedByReflector(returnType) && IsTypeWhiteListed(returnType) && (!FasterTypeUtils.IsGenericCollection(type) || type.GetGenericArguments().All(IsTypeToBeIntrospected))); }
public virtual Type FilterNullableAndProxies(Type type) { if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable <>)) { // use type inside nullable wrapper return(type.GetGenericArguments()[0]); } return(FasterTypeUtils.IsProxy(type) ? type.BaseType : type); }
private void PopulateAssociatedActions(IObjectSpecBuilder spec, Type[] services, IMetamodelBuilder metamodel) { if (string.IsNullOrWhiteSpace(spec.FullName)) { var id = spec.Identifier?.ClassName ?? "unknown"; logger.LogWarning($"Specification with id : {id} has null or empty name"); } if (FasterTypeUtils.IsSystem(spec.FullName) && !spec.IsCollection) { return; } if (FasterTypeUtils.IsNakedObjects(spec.FullName)) { return; } PopulateContributedActions(spec, services, metamodel); }
private void PopulateAssociatedActions(IObjectSpecBuilder spec, Type[] services, IMetamodelBuilder metamodel) { if (string.IsNullOrWhiteSpace(spec.FullName)) { string id = (spec.Identifier != null ? spec.Identifier.ClassName : "unknown") ?? "unknown"; Log.WarnFormat("Specification with id : {0} as has null or empty name", id); } if (FasterTypeUtils.IsSystem(spec.FullName) && !spec.IsCollection) { return; } if (FasterTypeUtils.IsNakedObjects(spec.FullName)) { return; } PopulateContributedActions(spec, services, metamodel); }
public virtual string GetKeyForType(Type type) => FasterTypeUtils.IsGenericCollection(type) ? $"{type.Namespace}.{type.Name}" : FasterTypeUtils.IsObjectArray(type) ? "System.Array" : type.GetProxiedTypeFullName();