Exemplo n.º 1
0
        public void FillProperties()
        {
            if (property_filled)
            {
                return;
            }
            if (property_filling)
            {
                throw new Exception();                  // check bad recursion
            }
            property_filling = true;
            property_filled  = true;

            if (BaseGen != null)
            {
                BaseGen.FillProperties();
            }
            foreach (var iface in GetAllDerivedInterfaces())
            {
                iface.FillProperties();
            }

            AddPropertyAccessors();

            var names = prop_hash.Keys;

            foreach (string name in names)
            {
                props.Add(prop_hash [name]);
            }
            props.Sort((p1, p2) => string.CompareOrdinal(p1.Name, p2.Name));
            property_filling = false;

            foreach (var nt in NestedTypes)
            {
                nt.FillProperties();
            }
        }