/// <summary> /// Initialise a new empty GSA ID Mapping Table /// </summary> public GSAIDMappingTable() : base("Nucleus", "GSA") { // Specify type category aliases TypeCategories.Add(typeof(Node), "NODE"); TypeCategories.Add(typeof(Element), "EL"); TypeCategories.Add(typeof(SectionFamily), "PROP_SEC"); TypeCategories.Add(typeof(BuildUpFamily), "PROP_2D"); }
private static ServicePack CreateServicePack( Type type, TypeCategories typeCategory, string typePostfix, IList <AttributePack> onType, IList <AttributePack> forAllmembers, IList <AttributePack> forAllInvolvedTypes, IList <AttributePack> forAllInvolvedTypeMembers, IDictionary <string, Type> extraCtorParams = null, IOptimizationPackage optimizationPackage = null, bool allMethodsVoid = false, params Type[] interfaces) { var matcher = new ServiceMatcher(type, typeCategory, typePostfix, extraCtorParams, interfaces: interfaces, allMethodsVoid: allMethodsVoid, optimizationPackage: optimizationPackage); SetOnTypeAttributes(matcher, onType); SetForAllmembersAttributes(matcher, forAllmembers); SetForAllInvolvedTypesAttributes(matcher, forAllInvolvedTypes); SetForAllInvolvedTypeMembersAttributes(matcher, forAllInvolvedTypeMembers); return(matcher.Pack()); }
public ServiceMatcher( Type targetType, TypeCategories typeCategory, string namePostfix = null, IDictionary <string, Type> ctorExtraParamsType = null, bool allMethodsVoid = false, IOptimizationPackage optimizationPackage = null, params Type[] interfaces) { this.allMethodsVoid = allMethodsVoid; this.optimizationPackage = optimizationPackage; moduleBuilder = optimizationPackage?.moduleBuilder ?? CreateModuleBuilder(); typeContainer = optimizationPackage?.typeContainer ?? new DummyTypeContainer(); this.targetType = targetType; this.typeCategory = typeCategory; this.namePostfix = namePostfix ?? string.Empty; this.ctorExtraParamsType = ctorExtraParamsType ?? new Dictionary <string, Type>(); this.interfaces = interfaces; typeAttributes = new List <Tuple <Type, IDictionary <Type, object>, IDictionary <string, object> > >(); allMembersAttributes = new List <Tuple <Type, IDictionary <Type, object>, IDictionary <string, object> > >(); involvedAttributes = new List <Tuple <Type, IDictionary <Type, object>, IDictionary <string, object> > >(); involvedTypeMembersAttributes = new List <Tuple <Type, IDictionary <Type, object>, IDictionary <string, object> > >(); }