Exemplo n.º 1
0
        public Primitive(XmlBindings.Primitive xmlData, Overrides.XmlBindings.Primitive overrides, Dictionary <string, QualifiableType> typeDictionary)
        {
            m_name = xmlData.Name;
            typeDictionary[m_name] = this;

            m_projectedName = m_name;
            if (overrides != null && overrides.ProjectedNameOverride != null)
            {
                m_projectedName = overrides.ProjectedNameOverride;
            }
        }
Exemplo n.º 2
0
        public D2DTypes(XmlBindings.D2DTypes xmlData, Overrides.XmlBindings.Settings overrides, Dictionary <string, QualifiableType> typeDictionary, OutputDataTypes outputDataTypes)
        {
            const Namespace globalNamespace = null; // Using null as the namespace parameter indicates the global namespace.

            m_primitiveList = new List <Primitive>();
            foreach (XmlBindings.Primitive p in xmlData.Primitives)
            {
                Overrides.XmlBindings.Primitive overridePrimitive = null;
                if (overrides != null)
                {
                    overridePrimitive = overrides.Primitives.Find(x => x.Name == p.Name);
                }

                m_primitiveList.Add(new Primitive(p, overridePrimitive, typeDictionary));
            }

            m_structList = new List <Struct>();
            foreach (XmlBindings.Struct s in xmlData.Structs)
            {
                Overrides.XmlBindings.Struct overrideStruct = null;
                if (overrides != null)
                {
                    overrideStruct = overrides.Structs.Find(x => x.Name == s.Name);
                }

                m_structList.Add(new Struct(globalNamespace, s, overrideStruct, typeDictionary, outputDataTypes));
            }

            m_namespaceList = new List <Namespace>();
            foreach (XmlBindings.Namespace n in xmlData.Namespaces)
            {
                Overrides.XmlBindings.Namespace overrideNamespace = null;
                if (overrides != null)
                {
                    overrideNamespace = overrides.Namespaces.Find(x => x.Name == n.Name);
                }

                m_namespaceList.Add(new Namespace(n, overrideNamespace, overrides.RootNamespace.Value, typeDictionary, outputDataTypes));
            }
        }