public static Variant Copy(Variant other) { var self = new Variant(other.GetType()); self.CopyFrom(other); return(self); }
public bool SetToParameter(Variant 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].GetHoldType() == parameter.HoldType) { parameter.CopyFrom(Serialized[index].Value); return(true); } } } return(false); }