Esempio n. 1
0
        public static DTGNamespaceMetadata MapToDTGModel(NamespaceMetadata namespaceMetadata)
        {
            var m_NamespaceName = namespaceMetadata.NamespaceName;

            //May be even more beneficial to create all types from all namespaces beforehand
            foreach (var type in namespaceMetadata.Types)
            {
                HelperDictonaries.TypeDictonaryForDTG[type] = TypeMapper.MapToDTGModel(type);
            }
            var m_Types = from type in namespaceMetadata.Types orderby type.TypeName select TypeMapper.FillTypeDTG(HelperDictonaries.TypeDictonaryForDTG[type], type);

            DTGNamespaceMetadata namespaceModel = new DTGNamespaceMetadata {
                NamespaceName = m_NamespaceName,
                Types         = m_Types
            };

            return(namespaceModel);
        }