Pchp.Library.Arrays.SetOperation C# (CSharp) Method

SetOperation() private static method

Internal method common for all functions.
private static SetOperation ( SetOperations op, PhpArray array, PhpArray arrays, PhpValue>.IComparer comparer ) : PhpArray
op SetOperations
array Pchp.Core.PhpArray
arrays Pchp.Core.PhpArray
comparer PhpValue>.IComparer
return Pchp.Core.PhpArray
        private static PhpArray SetOperation(SetOperations op, PhpArray array, PhpArray[] arrays, IComparer<KeyValuePair<IntStringKey, PhpValue>> comparer)
        {
            if (array == null)
            {
                //PhpException.ArgumentNull("array");
                //return null;
                throw new ArgumentNullException();
            }

            if (arrays == null || arrays.Length == 0)
            {
                //PhpException.InvalidArgumentCount(null, null);
                //return null;
                throw new ArgumentException();
            }

            Debug.Assert(comparer != null);

            PhpArray result = new PhpArray();
            array.SetOperation(op, arrays, comparer, result);

            // the result is inplace deeply copied on return to PHP code:
            //result.InplaceCopyOnReturn = true;
            return result;
        }