static void createApplicationComponentConcreteUnit(IList <object> body_items, IDictionary <ProxyComponentAttribute, string> attributes) { UnitType cu = new UnitType(); cu.facet = 0; cu.iRef = attributes[ProxyComponentAttribute.INTERFACE_NAME_CONCRETE]; cu.multiple = false; cu.@private = false; cu.replica = 0; cu.uRef = attributes[ProxyComponentAttribute.UNIT_NAME_CONCRETE]; cu.visibleInterface = true; UnitRefType uRef = new UnitRefType(); uRef.cRef = "base"; uRef.uRef = attributes[ProxyComponentAttribute.UNIT_NAME_ABSTRACT]; cu.super = uRef; body_items.Add(cu); }
static ComponentType createSystemConcrete(string app_name, ComponentType system_abstract) { ComponentType system_concrete = new ComponentType(); ComponentHeaderType h = system_concrete.header = new ComponentHeaderType(); h.hash_component_UID = null; //? h.isAbstract = false; h.kind = SupportedKinds.System; h.name = "SystemImpl"; h.packagePath = app_name; h.baseType.extensionType = new ExtensionTypeType(); h.baseType.extensionType.Item = true; h.baseType.extensionType.ItemElementName = ItemChoiceType1.implements; h.baseType.component = new ComponentInUseType(); h.baseType.component.package = app_name; h.baseType.component.name = "System"; h.baseType.component.localRef = "base"; h.baseType.component.multiple = false; IList <object> body_items = new List <object> (); foreach (object o in system_abstract.componentInfo) { if (o is UnitType) { UnitType u = (UnitType)o; UnitType cu = new UnitType(); cu.facet = 0; cu.iRef = u.iRef + "Impl"; cu.multiple = false; cu.@private = false; cu.replica = 0; cu.uRef = u.uRef; cu.visibleInterface = true; UnitRefType uRef = new UnitRefType(); uRef.cRef = "base"; uRef.uRef = u.uRef; cu.super = uRef; body_items.Add(cu); } else if (o is InterfaceType) { InterfaceType i = (InterfaceType)o; InterfaceType ct = new InterfaceType(); ct.iRef = i.iRef + "Impl"; ct.nArgs = 0; ct.sources = null; //? body_items.Add(ct); } } system_concrete.componentInfo = new object[body_items.Count]; body_items.CopyTo(system_concrete.componentInfo, 0); return(system_concrete); }