public bool SetToParameter(GenericParameter parameter) { int index = GetIndexOf(parameter.Name); if (index != -1) { if (HasRuntime) { if (Runtime[index].GetValueType() == parameter.HoldType.Type) { Runtime[index].SetTo(parameter); return(true); } } else { if (Serialized[index].HoldType == parameter.HoldType) { parameter.CopyFrom(Serialized[index]); return(true); } } } return(false); }
public static GenericParameter Copy(GenericParameter other) { var self = new GenericParameter(other.GetType()); self.CopyFrom(other); return(self); }