Esempio n. 1
0
        public object Clone()
        {
            PortableClass portableClass = new PortableClass();

            portableClass.Name               = Name != null ? (string)Name.Clone() : null;
            portableClass.ID                 = ID != null ? (string)ID.Clone() : null;
            portableClass.Assembly           = Assembly != null ? (string)Assembly.Clone() : null;
            portableClass.Type               = Type != null ? (string)Type.Clone() : null;
            portableClass.PortableAttributes = PortableAttributes != null ? (PortableAttribute[])PortableAttributes.Clone() : null;
            return(portableClass);
        }
Esempio n. 2
0
            private static Hashtable GetCompactPortableClass(PortableClass clas)
            {
                Hashtable settings = new Hashtable();

                settings.Add("name", clas.Name);
                if (clas.ID != null)
                {
                    settings.Add("handle-id", clas.ID);
                }
                settings.Add("assembly", clas.Assembly);
                settings.Add("type", clas.Type);
                if (clas.PortableAttributes != null)
                {
                    settings.Add("attribute", GetCompactPortableAttributes(clas.PortableAttributes));
                }
                return(settings);
            }