예제 #1
0
파일: MetaInput.cs 프로젝트: yarwelp/tooll
        public MetaInput Clone()
        {
            var input = new MetaInput(Guid.NewGuid(), Name, OpPart, DefaultValue.Clone(), IsMultiInput)
            {
                Relevance   = Relevance,
                Description = Description,

                // float stuff
                Min       = Min,
                Max       = Max,
                Scale     = Scale,
                ScaleType = ScaleType
            };

            foreach (var entry in EnumValues)
            {
                input.EnumValues.Add(new EnumEntry(entry.Name, entry.Value));
            }

            if (Name != null)
            {
                input.Name = string.Copy(Name);
            }
            return(input);
        }
예제 #2
0
 public AstParameter Clone()
 {
     return(new AstParameter(Name?.Clone() as AstIdExpr, TypeExpr?.Clone(), DefaultValue?.Clone(), Mutable, Location));
 }
예제 #3
0
 public Parameter Clone() => new Parameter(Name.Copy(), (Block)DefaultValue?.Clone(), Visibility, ReadOnly, Lazy,
                                           Comparisand, (Block)Condition?.Clone());
예제 #4
0
 public Input(Symbol.InputDefinition inputDefinition)
 {
     InputDefinition = inputDefinition;
     Value           = DefaultValue.Clone();
     IsDefault       = true;
 }