Clone() public method

public Clone ( ) : ParsedType
return ParsedType
示例#1
0
        public ParsedProperty Clone()
        {
            ParsedProperty parsedPropety = (ParsedProperty)this.MemberwiseClone();

            parsedPropety.Type = Type.Clone();

            return(parsedPropety);
        }
示例#2
0
        public ParsedField Clone()
        {
            ParsedField newField = (ParsedField)this.MemberwiseClone();

            newField.Type = Type.Clone();

            return(newField);
        }
示例#3
0
        public ParsedType Clone()
        {
            ParsedType typeToReturn = new ParsedType();

            typeToReturn.Name             = Name;
            typeToReturn.IsInterface      = IsInterface;
            typeToReturn.NumberOfElements = NumberOfElements;

            if (GenericType != null)
            {
                typeToReturn.GenericType = GenericType.Clone();
            }

            typeToReturn.GenericRestrictions = new List <string>();
            typeToReturn.GenericRestrictions.AddRange(GenericRestrictions);

            return(typeToReturn);
        }
示例#4
0
        public ParsedMethod Clone()
        {
            ParsedMethod parsedMethod = (ParsedMethod)this.MemberwiseClone();

            parsedMethod.Type = Type.Clone();

            parsedMethod.ArgumentList = new List <ParsedField>();
            parsedMethod.GenericTypes = new List <ParsedType>();

            foreach (ParsedField argument in ArgumentList)
            {
                parsedMethod.ArgumentList.Add(argument.Clone());
            }

            foreach (ParsedType genericType in GenericTypes)
            {
                parsedMethod.GenericTypes.Add(genericType.Clone());
            }

            return(parsedMethod);
        }