/************************************************************************************************************************/ /// <summary>Copies the contents of the 'target' call to this call.</summary> public void CopyFrom(PersistentCall target) { _Target = target._Target; _MethodName = target._MethodName; _Method = target._Method; _PersistentArguments = new PersistentArgument[target._PersistentArguments.Length]; for (int i = 0; i < _PersistentArguments.Length; i++) { _PersistentArguments[i] = target._PersistentArguments[i].Clone(); } }
private static PersistentArgument[] NewArgumentArray(int length) { if (length == 0) { return(NoArguments); } else { var array = new PersistentArgument[length]; for (int i = 0; i < length; i++) { array[i] = new PersistentArgument(); } return(array); } }
/************************************************************************************************************************/ /// <summary>Creates an exact copy of this argument.</summary> public PersistentArgument Clone() { #pragma warning disable IDE0017 // Simplify object initialization var clone = new PersistentArgument(); #pragma warning restore IDE0017 // Simplify object initialization clone._Type = _Type; clone._Int = _Int; clone._String = _String; clone._X = _X; clone._Y = _Y; clone._Z = _Z; clone._W = _W; clone._Object = _Object; clone._SystemType = _SystemType; clone._HasSystemType = _HasSystemType; clone._Value = _Value; return(clone); }