Exemplo n.º 1
0
        public void FillTranslatorEnumTo(Dictionary <String, TypeDef> VersionedNameToType, EnumDef e, List <String> l, String NamespaceName)
        {
            var     Name  = e.FullName();
            EnumDef eHead = null;

            if (VersionedNameToType.ContainsKey(Name))
            {
                var tHead = VersionedNameToType[Name];
                if (tHead.OnEnum)
                {
                    eHead = tHead.Enum;
                }
            }
            var VersionedSimpleName = e.GetTypeSpec().SimpleName(NamespaceName);
            var TypeString          = GetTypeString(Nonversioned(e.GetTypeSpec()), NamespaceName);
            var VersionedTypeString = GetTypeString(e.GetTypeSpec(), NamespaceName);

            if (eHead == null)
            {
                FillTranslatorEnumTo(VersionedSimpleName, TypeString, VersionedTypeString, e.Literals, new List <LiteralDef> {
                }, l, NamespaceName);
            }
            else
            {
                FillTranslatorEnumTo(VersionedSimpleName, TypeString, VersionedTypeString, e.Literals, eHead.Literals, l, NamespaceName);
            }
        }