public override TypeForwarderElement CreateTypeForwarderElement(AssemblyElement parent, string assemblyName, string typeName, IncludeStatus includeStatus) { TrimAssembly trimAssembly = (TrimAssembly)parent; TrimTypeForwarder typeForwarder = new TrimTypeForwarder(assemblyName, typeName, includeStatus); trimAssembly.TypeForwarders.Add(typeForwarder.Key, typeForwarder); return(typeForwarder); }
public override AssemblyElement CreateAssemblyElement(ModelElement model, string assemblyName, IncludeStatus includeStatus) { IncludeSet includeSet = (IncludeSet)model; TrimAssembly trimAssembly = new TrimAssembly(assemblyName, includeStatus);; includeSet.AddAssembly(trimAssembly); return(trimAssembly); }
public override TypeElement CreateTypeElement(AssemblyElement assembly, string typeName, IncludeStatus includeStatus, VisibilityOverride visibilityOverride, SecurityTransparencyStatus securityTransparencyStatus) { TrimAssembly trimAssembly = (TrimAssembly)assembly; TrimType typeIncludeInfo = new TrimType(typeName, includeStatus, visibilityOverride, securityTransparencyStatus); trimAssembly.Types.Add(typeIncludeInfo.Key, typeIncludeInfo); return(typeIncludeInfo); }
public void LoadFrom(ModelElement otherModel) { foreach (AssemblyElement assembly in otherModel.Assemblies.Values) { TrimAssembly newAssembly = new TrimAssembly(assembly.Key, assembly.IncludeStatus); _assemblies.Add(newAssembly.Name, newAssembly); foreach (KeyValuePair<String, TypeForwarderElement> typeForwarder in assembly.TypeForwarders) { TrimTypeForwarder newTypeForwarder = new TrimTypeForwarder(typeForwarder.Value.AssemblyName, typeForwarder.Value.TypeName, typeForwarder.Value.IncludeStatus); newAssembly.TypeForwarders.Add(newTypeForwarder.Key, newTypeForwarder); } foreach (KeyValuePair<String, TypeElement> type in assembly.Types) { TrimType newType = new TrimType(type.Value.Key, type.Value.IncludeStatus, type.Value.VisibilityOverride, type.Value.SecurityTransparencyStatus); newAssembly.Types.Add(newType.Key, newType); foreach (KeyValuePair<String, MemberElement> member in type.Value.Members) { TrimMember newMember = new TrimMember(newType, member.Value.Name, member.Value.ReturnType, member.Value.MemberType, member.Value.IncludeStatus, member.Value.VisibilityOverride, member.Value.SecurityTransparencyStatus); newType.Members.Add(newMember.Key, newMember); } } } }
public void LoadFrom(ModelElement otherModel) { foreach (AssemblyElement assembly in otherModel.Assemblies.Values) { TrimAssembly newAssembly = new TrimAssembly(assembly.Key, assembly.IncludeStatus); _assemblies.Add(newAssembly.Name, newAssembly); foreach (KeyValuePair <String, TypeForwarderElement> typeForwarder in assembly.TypeForwarders) { TrimTypeForwarder newTypeForwarder = new TrimTypeForwarder(typeForwarder.Value.AssemblyName, typeForwarder.Value.TypeName, typeForwarder.Value.IncludeStatus); newAssembly.TypeForwarders.Add(newTypeForwarder.Key, newTypeForwarder); } foreach (KeyValuePair <String, TypeElement> type in assembly.Types) { TrimType newType = new TrimType(type.Value.Key, type.Value.IncludeStatus, type.Value.VisibilityOverride, type.Value.SecurityTransparencyStatus); newAssembly.Types.Add(newType.Key, newType); foreach (KeyValuePair <String, MemberElement> member in type.Value.Members) { TrimMember newMember = new TrimMember(newType, member.Value.Name, member.Value.ReturnType, member.Value.MemberType, member.Value.IncludeStatus, member.Value.VisibilityOverride, member.Value.SecurityTransparencyStatus); newType.Members.Add(newMember.Key, newMember); } } } }
public void AddAssembly(TrimAssembly assembly) { _assemblies.Add(assembly.Key, assembly); }
public override AssemblyElement CreateAssemblyElement(ModelElement model, string assemblyName, IncludeStatus includeStatus) { IncludeSet includeSet = (IncludeSet)model; TrimAssembly trimAssembly = new TrimAssembly(assemblyName, includeStatus); ; includeSet.AddAssembly(trimAssembly); return trimAssembly; }