public static MASchemaTypes GetSchema(IManagementAgentParameters config) { MASchemaTypes types = new MASchemaTypes(); Assembly assembly = Assembly.GetExecutingAssembly(); foreach (TypeInfo type in assembly.DefinedTypes) { if (!type.ImplementedInterfaces.Contains(typeof(ISchemaTypeBuilder))) { continue; } ISchemaTypeBuilder builder = (ISchemaTypeBuilder)Activator.CreateInstance(type); foreach (MASchemaType schemaType in builder.GetSchemaTypes(config)) { if (schemaType != null) { types.Add(schemaType); } } } return(types); }
public static ISchemaTypeBuilder <TDerivedSchemaType> OverrideType <TBaseSchemaType, TDerivedSchemaType>(this ISchemaTypeBuilder <TDerivedSchemaType> builder) where TBaseSchemaType : IGraphType where TDerivedSchemaType : TBaseSchemaType, IGraphType { AbstractTypeFactory <IGraphType> .OverrideType <TBaseSchemaType, TDerivedSchemaType>(); return(builder); }