protected static IScriptStructure CreateBase(ScriptStructure copy) { if (copy.Base == null) { return(null); } return(copy.Base.CreateCopy()); }
protected static IEnumerable <IScriptField> CreateFields(ScriptStructure copy) { List <IScriptField> fields = new List <IScriptField>(); foreach (ScriptField cfield in copy.Fields) { IScriptField field = cfield.CreateCopy(); fields.Add(field); } return(fields); }
protected ScriptStructure(ScriptStructure copy) : this(copy.Namespace, copy.Name, CreateBase(copy), CreateFields(copy)) { }