コード例 #1
0
        public override DataType Clone(IDictionary <DataType, DataType>?clonedTypes)
        {
            var pre = PreferredType?.Clone(clonedTypes);
            var u   = new UnionType(Name, pre);

            u.Qualifier   = Qualifier;
            u.UserDefined = UserDefined;
            foreach (var a in this.Alternatives.Values)
            {
                u.Alternatives.Add(a.Clone());
            }
            return(u);
        }
コード例 #2
0
        public override DataType Clone()
        {
            DataType pre = PreferredType != null?PreferredType.Clone() : null;

            UnionType u = new UnionType(Name, pre);

            u.UserDefined = UserDefined;
            foreach (UnionAlternative a in this.Alternatives.Values)
            {
                u.Alternatives.Add(a.Clone());
            }
            return(u);
        }