static ComponentType createApplicationComponentConcrete(string app_name, IDictionary <ProxyComponentAttribute, string> attributes)
        {
            ComponentType c = new ComponentType();

            ComponentHeaderType h = c.header = new ComponentHeaderType();

            h.hash_component_UID = null;             //?
            h.isAbstract         = false;
            h.kind        = SupportedKinds.Proxy;
            h.name        = attributes[ProxyComponentAttribute.COMPONENT_NAME_CONCRETE];
            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     = attributes[ProxyComponentAttribute.COMPONENT_NAME_ABSTRACT];
            h.baseType.component.localRef = "base";
            h.baseType.component.multiple = false;

            IList <object> body_items = new List <object> ();

            // ADD INNER COMPONENTS (many, one for each environment bindind)
            // NO INNER COMPONENTS

            // NO PARAMETERS
            // NO SUPPLY PARAMTERS
            // NO INNER RENAMING
            // NO FUSION
            // NO SPLIT
            // NO RECURSIVE ENTRY

            // ADD UNIT (single)
            createApplicationComponentConcreteUnit(body_items, attributes);

            // ADD INTERFACE
            createApplicationComponentConreteInterface(body_items, attributes);

            // NO FUSION OF REPLICATORS

            // NO EXTERNAL LIBRARIES

            c.componentInfo = new object[body_items.Count];
            body_items.CopyTo(c.componentInfo, 0);

            return(c);
        }
        static ComponentType createSystemAbstract(string app_name,
                                                  IDictionary <ProxyComponentAttribute, string> application_attributes,
                                                  IDictionary <ProxyComponentAttribute, string> worklow_attributes,
                                                  IDictionary <string, InstanceType> component_refs,
                                                  IList <Tuple <string, string, EnvironmentPortType> > bindings_application,
                                                  IList <Tuple <string, string, EnvironmentPortType> > bindings_workflow)
        {
            ComponentType c = new ComponentType();

            ComponentHeaderType h = c.header = new ComponentHeaderType();

            h.hash_component_UID = null;             //?
            h.isAbstract         = true;
            h.kind        = SupportedKinds.System;
            h.name        = "System";
            h.packagePath = app_name;

            IList <object> body_items = new List <object> ();

            // ADD INNER COMPONENTS (many, one for each environment bindind)
            createSystemComponentAbstractInner(app_name, body_items, component_refs, application_attributes, worklow_attributes);

            // NO PARAMETERS
            // NO SUPPLY PARAMTERS
            fuseEnvironmentBindings(application_attributes[ProxyComponentAttribute.INNER_COMPONENT_NAME], bindings_application, component_refs);
            fuseEnvironmentBindings(worklow_attributes[ProxyComponentAttribute.INNER_COMPONENT_NAME], bindings_workflow, component_refs);
            // NO SPLIT
            // NO RECURSIVE ENTRY

            // ADD UNIT (single)
            createSystemComponentAbstractUnit(body_items, component_refs, application_attributes, worklow_attributes, bindings_application, bindings_workflow);

            // ADD INTERFACE
            // createSystemComponentAbstractInterface (body_items, bindings_application);

            // NO FUSION OF REPLICATORS

            // NO EXTERNAL LIBRARIES

            c.componentInfo = new object[body_items.Count];
            body_items.CopyTo(c.componentInfo, 0);

            return(c);
        }
        static ComponentType createApplicationComponentAbstract(string app_name, IList <Tuple <string, string, EnvironmentPortType> > bindings_application, ref IList <string> port_names, IDictionary <ProxyComponentAttribute, string> attributes)
        {
            ComponentType c = new ComponentType();

            ComponentHeaderType h = c.header = new ComponentHeaderType();

            h.hash_component_UID = null;             //?
            h.isAbstract         = true;
            h.kind        = SupportedKinds.Proxy;
            h.name        = attributes[ProxyComponentAttribute.COMPONENT_NAME_ABSTRACT];
            h.packagePath = app_name;

            IList <object> body_items = new List <object> ();

            // ADD INNER COMPONENTS (many, one for each environment bindind)
            createApplicationComponentAbstractInner(body_items, bindings_application, ref port_names);

            // NO PARAMETERS
            // NO SUPPLY PARAMTERS
            // NO INNER RENAMING
            // NO FUSION
            // NO SPLIT
            // NO RECURSIVE ENTRY

            // ADD UNIT (single)
            createApplicationComponentAbstractUnit(body_items, bindings_application, attributes);

            // ADD INTERFACE
            createApplicationComponentAbstractInterface(body_items, bindings_application, attributes);

            // NO FUSION OF REPLICATORS

            // NO EXTERNAL LIBRARIES

            c.componentInfo = new object[body_items.Count];
            body_items.CopyTo(c.componentInfo, 0);

            return(c);
        }
        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);
        }