Argument

We found 10 examples in language CSharp for this search. You will see 47 fragments of code.
		[TearDown]
		public void TearDown () {}

		[SetUp]
		public void SetUp () {}

		[Test]
		public void TestActiveBorder ()
		{
			SolidBrush brush;
			brush = (SolidBrush) SystemBrushes.ActiveBorder;
			Assert.IsTrue (brush.Color.IsSystemColor, "P1#1");
			Assert.AreEqual (SystemColors.ActiveBorder, brush.Color, "P1#2");

			try {
				brush.Color = Color.Red;
				Assert.Fail ("P1#3: must throw ArgumentException");
			} catch (ArgumentException) {
				Assert.IsTrue (true, "P1#3");
			}

			try {
				brush.Color = SystemColors.ActiveBorder;
				Assert.Fail ("P1#4: must throw ArgumentException");
			} catch (ArgumentException) {
				Assert.IsTrue (true, "P1#4");
			}

			try {
				brush.Dispose();
				Assert.Fail ("P1#5: must throw ArgumentException");
			} catch (ArgumentException) {
				Assert.IsTrue (true, "P1#5");
			}
		}

		[Test]
		public void TestActiveCaption ()
		{
			SolidBrush brush;
			brush = (SolidBrush) SystemBrushes.ActiveCaption;
			Assert.IsTrue (brush.Color.IsSystemColor, "P2#1");
			Assert.AreEqual (SystemColors.ActiveCaption, brush.Color, "P2#2");

			try {
				brush.Color = Color.Red;
				Assert.Fail ("P2#3: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P2#3");
			}

			try {
				brush.Color = SystemColors.ActiveCaption;
				Assert.Fail ("P2#4: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P2#4");
			}

			try {
				brush.Dispose();
				Assert.Fail ("P2#5: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P2#5");
			}

		}

		[Test]
		public void TestActiveCaptionText ()
		{
			SolidBrush brush;
			brush = (SolidBrush) SystemBrushes.ActiveCaptionText;
			Assert.IsTrue (brush.Color.IsSystemColor, "P3#1");
			Assert.AreEqual (SystemColors.ActiveCaptionText, brush.Color, "P3#2");

			try {
				brush.Color = Color.Red;
				Assert.Fail ("P3#3: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P3#3");
			}

			try {
				brush.Color = SystemColors.ActiveCaptionText;
				Assert.Fail ("P3#4: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P3#4");
			}

			try {
				brush.Dispose();
				Assert.Fail ("P3#5: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P3#5");
			}
		}

		[Test]
		public void TestAppWorkspace ()
		{
			SolidBrush brush;
			brush = (SolidBrush) SystemBrushes.AppWorkspace;
			Assert.IsTrue (brush.Color.IsSystemColor, "P4#1");
			Assert.AreEqual (SystemColors.AppWorkspace, brush.Color, "P4#2");

			try {
				brush.Color = Color.Red;
				Assert.Fail ("P4#3: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P4#3");
			}

			try {
				brush.Color = SystemColors.AppWorkspace;
				Assert.Fail ("P4#4: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P4#4");
			}

			try {
				brush.Dispose();
				Assert.Fail ("P4#5: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P4#5");
			}
		}

using DG.Tools;
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Messages;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Query;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Reflection;
using System.ServiceModel;
using System.Text.RegularExpressions;

namespace DG.Tools.XrmMockup.Metadata
{
    internal static class Arguments {

        public static ArgumentDescription Url = new ArgumentDescription() {
            Name = "url",
            Abbreviations = new string[] { }
        };

        public static ArgumentDescription Username = new ArgumentDescription() {
            Name = "username",
            Abbreviations = new string[] { "usr", "u" }
        };

        public static ArgumentDescription Password = new ArgumentDescription() {
            Name = "password",
            Abbreviations = new string[] { "pwd", "p" }
        };

        public static ArgumentDescription Domain = new ArgumentDescription() {
            Name = "domain",
            Abbreviations = new string[] { "dmn", "d" }
        };

        public static ArgumentDescription AuthProvider = new ArgumentDescription() {
            Name = "ap",
            Abbreviations = new string[] { "authenticationprovider", "provider" }
        };

        public static ArgumentDescription OutDir = new ArgumentDescription() {
            Name = "outDir",
            Abbreviations = new string[] { "out", "o" }
        };


        public static ArgumentDescription Entities = new ArgumentDescription() {
            Name = "entities",
            Abbreviations = new string[] { "es" }
        };

        public static ArgumentDescription Solutions = new ArgumentDescription() {
            Name = "solutions",
            Abbreviations = new string[] { "ss" }
        };

        public static ArgumentDescription UnitTestProjectPath = new ArgumentDescription() {
            Name = "projectPath",
            Abbreviations = new string[] { "pp" }
        };

        public static ArgumentDescription fetchFromAssemblies = new ArgumentDescription()
        {
            Name = "fetchFromAssemblies",
            Abbreviations = new string[] { "fa" }
        };

        public static ArgumentDescription Method = new ArgumentDescription()
        {
            Name = "method",
            Abbreviations = new string[] { }
        };

        public static ArgumentDescription ClientId = new ArgumentDescription()
        {
            Name = "mfaAppId",
            Abbreviations = new string[] { }
        };

        public static ArgumentDescription ReturnUrl = new ArgumentDescription()
        {
            Name = "mfaReturnUrl",
            Abbreviations = new string[] { }
        };

        public static ArgumentDescription ClientSecret = new ArgumentDescription()
        {
            Name = "mfaClientSecret",
            Abbreviations = new string[] { }
        };

        public static ArgumentDescription ConnectionString = new ArgumentDescription()
        {
            Name = "connectionString",
            Abbreviations = new string[] { }
        };

        public static ArgumentDescription[] ArgList = new ArgumentDescription[] {
            Url,
            Username,
            Password,
            Domain,
            AuthProvider,
            Entities,
            Solutions,
            OutDir,
            UnitTestProjectPath,
            fetchFromAssemblies,
            Method,
            ClientId,
            ReturnUrl,
            ClientSecret,
            ConnectionString
        };
    }
}


		//

		private void ParseSpecialArguments(Type[] argumentTypes, ArgumentType[] argumentVariations)
		{
			if (argumentVariations == null || argumentVariations.Length == 0)
			{
				info.argumentTypes = argumentTypes;
				return;
			}

			if (argumentTypes.Length < argumentVariations.Length)
				throw new ArgumentException("argumentVariations contains more elements than argumentTypes", nameof(argumentVariations));

			var types = new List<Type>();
			for (var i = 0; i < argumentTypes.Length; i++)
			{
				var type = argumentTypes[i];
				switch (argumentVariations[i])
				{
					case ArgumentType.Ref:
					case ArgumentType.Out:
						type = type.MakeByRefType();
						break;
					case ArgumentType.Pointer:
						type = type.MakePointerType();
						break;
				}
				types.Add(type);
			}
			info.argumentTypes = types.ToArray();
		}

		[TearDown]
		public void TearDown () {}

		[SetUp]
		public void SetUp () {}

		[Test]
		public void TestActiveBorder ()
		{
			SolidBrush brush;
			brush = (SolidBrush) SystemBrushes.ActiveBorder;
			Assert.IsTrue (brush.Color.IsSystemColor, "P1#1");
			Assert.AreEqual (SystemColors.ActiveBorder, brush.Color, "P1#2");

			try {
				brush.Color = Color.Red;
				Assert.Fail ("P1#3: must throw ArgumentException");
			} catch (ArgumentException) {
				Assert.IsTrue (true, "P1#3");
			}

			try {
				brush.Color = SystemColors.ActiveBorder;
				Assert.Fail ("P1#4: must throw ArgumentException");
			} catch (ArgumentException) {
				Assert.IsTrue (true, "P1#4");
			}

			try {
				brush.Dispose();
				Assert.Fail ("P1#5: must throw ArgumentException");
			} catch (ArgumentException) {
				Assert.IsTrue (true, "P1#5");
			}
		}

		[Test]
		public void TestActiveCaption ()
		{
			SolidBrush brush;
			brush = (SolidBrush) SystemBrushes.ActiveCaption;
			Assert.IsTrue (brush.Color.IsSystemColor, "P2#1");
			Assert.AreEqual (SystemColors.ActiveCaption, brush.Color, "P2#2");

			try {
				brush.Color = Color.Red;
				Assert.Fail ("P2#3: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P2#3");
			}

			try {
				brush.Color = SystemColors.ActiveCaption;
				Assert.Fail ("P2#4: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P2#4");
			}

			try {
				brush.Dispose();
				Assert.Fail ("P2#5: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P2#5");
			}

		}

		[Test]
		public void TestActiveCaptionText ()
		{
			SolidBrush brush;
			brush = (SolidBrush) SystemBrushes.ActiveCaptionText;
			Assert.IsTrue (brush.Color.IsSystemColor, "P3#1");
			Assert.AreEqual (SystemColors.ActiveCaptionText, brush.Color, "P3#2");

			try {
				brush.Color = Color.Red;
				Assert.Fail ("P3#3: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P3#3");
			}

			try {
				brush.Color = SystemColors.ActiveCaptionText;
				Assert.Fail ("P3#4: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P3#4");
			}

			try {
				brush.Dispose();
				Assert.Fail ("P3#5: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P3#5");
			}
		}

		[Test]
		public void TestAppWorkspace ()
		{
			SolidBrush brush;
			brush = (SolidBrush) SystemBrushes.AppWorkspace;
			Assert.IsTrue (brush.Color.IsSystemColor, "P4#1");
			Assert.AreEqual (SystemColors.AppWorkspace, brush.Color, "P4#2");

			try {
				brush.Color = Color.Red;
				Assert.Fail ("P4#3: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P4#3");
			}

			try {
				brush.Color = SystemColors.AppWorkspace;
				Assert.Fail ("P4#4: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P4#4");
			}

			try {
				brush.Dispose();
				Assert.Fail ("P4#5: must throw ArgumentException");
			} catch (Exception e) {
				Assert.IsTrue (e is ArgumentException, "P4#5");
			}
		}

		[Test]
		public void FaultNullTest()
		{
			foreach (var block in Blocks.CreateBlocks ()) {
				AssertEx.Throws<ArgumentNullException> (() => block.Fault (null));
			}
		}

		[Test]
		public void  ActionBlockTest ()
		{
			AssertEx.Throws<ArgumentNullException> (
				() => new ActionBlock<int> ((Action<int>)null));
			AssertEx.Throws<ArgumentNullException> (
				() => new ActionBlock<int> (i => { }, null));
		}

		[Test]
		public void BatchBlockTest()
		{
			AssertEx.Throws<ArgumentOutOfRangeException> (() => new BatchBlock<int> (0));
			AssertEx.Throws<ArgumentOutOfRangeException> (() => new BatchBlock<int> (-1));

			AssertEx.Throws<ArgumentOutOfRangeException> (
				() => new BatchBlock<int> (2,
					      new GroupingDataflowBlockOptions { BoundedCapacity = 1 }));

			AssertEx.Throws<ArgumentNullException> (() => new BatchBlock<int> (2, null));
		}

		[Test]
		public void BatchedJoinBlockTest()
		{
			AssertEx.Throws<ArgumentOutOfRangeException> (() => new BatchedJoinBlock<int, int> (0));
			AssertEx.Throws<ArgumentOutOfRangeException> (() => new BatchedJoinBlock<int, int> (-1));

			AssertEx.Throws<ArgumentException> (
				() => new BatchedJoinBlock<int, int> (1,
					      new GroupingDataflowBlockOptions { BoundedCapacity = 1 }));
			AssertEx.Throws<ArgumentException> (
				() => new BatchedJoinBlock<int, int> (1,
					      new GroupingDataflowBlockOptions { Greedy = false }));

			AssertEx.Throws<ArgumentNullException> (() => new BatchedJoinBlock<int, int> (2, null));
		}

		[Test]
		public void BatchedJoinBlock3Test()
		{
			AssertEx.Throws<ArgumentOutOfRangeException> (() => new BatchedJoinBlock<int, int, int> (0));
			AssertEx.Throws<ArgumentOutOfRangeException> (() => new BatchedJoinBlock<int, int, int> (-1));

			AssertEx.Throws<ArgumentException> (
				() => new BatchedJoinBlock<int, int, int> (1,
					      new GroupingDataflowBlockOptions { BoundedCapacity = 1 }));
			AssertEx.Throws<ArgumentException> (
				() => new BatchedJoinBlock<int, int, int> (1,
					      new GroupingDataflowBlockOptions { Greedy = false }));

			AssertEx.Throws<ArgumentNullException> (() => new BatchedJoinBlock<int, int, int> (2, null));
		}

		[Test]
		public void BroadcastBlock()
		{
			// null is valid argument for BroadcastBlock, so this shouldn't throw
			new BroadcastBlock<int> (null);
			AssertEx.Throws<ArgumentNullException> (() => new BroadcastBlock<int> (i => i, null));
		}


		public override string ToString ()
		{
			string val = value != null ? value.ToString () : String.Empty;
			if (argumentType == typeof (string))
				return "\"" + val + "\"";
			if (argumentType == typeof (Type)) 
				return "typeof (" + val + ")";
			if (argumentType.IsEnum)
				return "(" + argumentType.Name + ")" + val;

			return val;
		}

		public override bool Equals (object obj)
		{
			if (!(obj is CustomAttributeTypedArgument))
				return false;
			CustomAttributeTypedArgument other = (CustomAttributeTypedArgument) obj;
			return  other.argumentType == argumentType &&
				value != null ? value.Equals (other.value) : (object) other.value == null;
		}

		public override int GetHashCode ()
		{
			return (argumentType.GetHashCode () << 16) + (value != null ? value.GetHashCode () : 0);
		}

		[SetUp]
		public void SetUp () { }

		[TearDown]
		public void TearDown () { }
		
		[Test]
		public void TestEquals ()
		{
			Pen pen1 = Pens.Blue;
			Pen pen2 = Pens.Blue;
			
			Assert.AreEqual (true, pen1.Equals (pen2),  "Equals");
		}

		[Test]
		public void TestAliceBlue ()
		{
			Pen pen = Pens.AliceBlue;
			Assert.AreEqual (pen.PenType, PenType.SolidColor, "P1#1");
			Assert.AreEqual (pen.Color, Color.AliceBlue, "P1#2");

			try {
				pen.Color = Color.AliceBlue;
				Assert.Fail ("P1#3: must throw ArgumentException");
			} catch (ArgumentException) {
				Assert.IsTrue (true, "P1#3");
			}
		}

		[Test]
		public void TestAntiqueWhite ()
		{
			Pen pen = Pens.AntiqueWhite;
			Assert.AreEqual (pen.PenType, PenType.SolidColor, "P2#1");
			Assert.AreEqual (pen.Color, Color.AntiqueWhite, "P2#2");

			try {
				pen.Color = Color.AntiqueWhite;
				Assert.Fail ("P2#3: must throw ArgumentException");
			} catch (ArgumentException) {
				Assert.IsTrue (true, "P2#3");
			}
		}

		[Test]
		public void TestAqua ()
		{
			Pen pen = Pens.Aqua;
			Assert.AreEqual (pen.PenType, PenType.SolidColor, "P3#1");
			Assert.AreEqual (pen.Color, Color.Aqua, "P3#2");

			try {
				pen.Color = Color.Aqua;
				Assert.Fail ("P3#3: must throw ArgumentException");
			} catch (ArgumentException) {
				Assert.IsTrue (true, "P3#3");
			}
		}

        /// <summary>
        /// Computes the dot product of x and y.
        /// </summary>
        /// <param name="x">The vector x.</param>
        /// <param name="y">The vector y.</param>
        /// <returns>The dot product of x and y.</returns>
        /// <remarks>This is equivalent to the DOT BLAS routine.</remarks>
        [SecuritySafeCritical]
        public override Complex DotProduct(Complex[] x, Complex[] y)
        {
            if (y == null)
            {
                throw new ArgumentNullException("y");
            }

            if (x == null)
            {
                throw new ArgumentNullException("x");
            }

            if (x.Length != y.Length)
            {
                throw new ArgumentException(Resources.ArgumentArraysSameLength);
            }

            return SafeNativeMethods.z_dot_product(x.Length, x, y);
        }
        
        /// <summary>
        /// Adds a scaled vector to another: <c>result = y + alpha*x</c>.
        /// </summary>
        /// <param name="y">The vector to update.</param>
        /// <param name="alpha">The value to scale <paramref name="x"/> by.</param>
        /// <param name="x">The vector to add to <paramref name="y"/>.</param>
        /// <param name="result">The result of the addition.</param>
        /// <remarks>This is similar to the AXPY BLAS routine.</remarks>
        [SecuritySafeCritical]
        public override void AddVectorToScaledVector(Complex[] y, Complex alpha, Complex[] x, Complex[] result)
        {
            if (y == null)
            {
                throw new ArgumentNullException("y");
            }

            if (x == null)
            {
                throw new ArgumentNullException("x");
            }

            if (y.Length != x.Length)
            {
                throw new ArgumentException(Resources.ArgumentVectorsSameLength);
            }

            if (!ReferenceEquals(y, result))
            {
                Array.Copy(y, 0, result, 0, y.Length);
            }

            if (alpha == Complex.Zero)
            {
                return;
            }

            SafeNativeMethods.z_axpy(y.Length, alpha, x, result);
        }

        /// <summary>
        /// Scales an array. Can be used to scale a vector and a matrix.
        /// </summary>
        /// <param name="alpha">The scalar.</param>
        /// <param name="x">The values to scale.</param>
        /// <param name="result">This result of the scaling.</param>
        /// <remarks>This is similar to the SCAL BLAS routine.</remarks>
        [SecuritySafeCritical]
        public override void ScaleArray(Complex alpha, Complex[] x, Complex[] result)
        {
            if (x == null)
            {
                throw new ArgumentNullException("x");
            } 
            
            if (!ReferenceEquals(x, result))
            {
                Array.Copy(x, 0, result, 0, x.Length);
            }

            if (alpha == Complex.One)
            {
                return;
            }

            SafeNativeMethods.z_scale(x.Length, alpha, result);
        }

        /// <summary>
        /// Multiples two matrices. <c>result = x * y</c>
        /// </summary>
        /// <param name="x">The x matrix.</param>
        /// <param name="rowsX">The number of rows in the x matrix.</param>
        /// <param name="columnsX">The number of columns in the x matrix.</param>
        /// <param name="y">The y matrix.</param>
        /// <param name="rowsY">The number of rows in the y matrix.</param>
        /// <param name="columnsY">The number of columns in the y matrix.</param>
        /// <param name="result">Where to store the result of the multiplication.</param>
        /// <remarks>This is a simplified version of the BLAS GEMM routine with alpha
        /// set to Complex.One and beta set to Complex.Zero, and x and y are not transposed.</remarks>
        public override void MatrixMultiply(Complex[] x, int rowsX, int columnsX, Complex[] y, int rowsY, int columnsY, Complex[] result)
        {
            MatrixMultiplyWithUpdate(Transpose.DontTranspose, Transpose.DontTranspose, Complex.One, x, rowsX, columnsX, y, rowsY, columnsY, Complex.Zero, result);
        }

        /// <summary>
        /// Multiplies two matrices and updates another with the result. <c>c = alpha*op(a)*op(b) + beta*c</c>
        /// </summary>
        /// <param name="transposeA">How to transpose the <paramref name="a"/> matrix.</param>
        /// <param name="transposeB">How to transpose the <paramref name="b"/> matrix.</param>
        /// <param name="alpha">The value to scale <paramref name="a"/> matrix.</param>
        /// <param name="a">The a matrix.</param>
        /// <param name="rowsA">The number of rows in the <paramref name="a"/> matrix.</param>
        /// <param name="columnsA">The number of columns in the <paramref name="a"/> matrix.</param>
        /// <param name="b">The b matrix</param>
        /// <param name="rowsB">The number of rows in the <paramref name="b"/> matrix.</param>
        /// <param name="columnsB">The number of columns in the <paramref name="b"/> matrix.</param>
        /// <param name="beta">The value to scale the <paramref name="c"/> matrix.</param>
        /// <param name="c">The c matrix.</param>
        [SecuritySafeCritical]
        public override void MatrixMultiplyWithUpdate(Transpose transposeA, Transpose transposeB, Complex alpha, Complex[] a, int rowsA, int columnsA, Complex[] b, int rowsB, int columnsB, Complex beta, Complex[] c)
        {
            if (a == null)
            {
                throw new ArgumentNullException("a");
            }

            if (b == null)
            {
                throw new ArgumentNullException("b");
            }

            if (c == null)
            {
                throw new ArgumentNullException("c");
            }

            var m = transposeA == Transpose.DontTranspose ? rowsA : columnsA;
            var n = transposeB == Transpose.DontTranspose ? columnsB : rowsB;
            var k = transposeA == Transpose.DontTranspose ? columnsA : rowsA;
            var l = transposeB == Transpose.DontTranspose ? rowsB : columnsB;

            if (c.Length != m * n)
            {
                throw new ArgumentException(Resources.ArgumentMatrixDimensions);   
            }

            if (k != l)
            {
                throw new ArgumentException(Resources.ArgumentMatrixDimensions);
            }

            SafeNativeMethods.z_matrix_multiply(transposeA, transposeB, m, n, k, alpha, a, b, beta, c);
        }

        /// <summary>
        /// Computes the LUP factorization of A. P*A = L*U.
        /// </summary>
        /// <param name="data">An <paramref name="order"/> by <paramref name="order"/> matrix. The matrix is overwritten with the
        /// the LU factorization on exit. The lower triangular factor L is stored in under the diagonal of <paramref name="data"/> (the diagonal is always Complex.One
        /// for the L factor). The upper triangular factor U is stored on and above the diagonal of <paramref name="data"/>.</param>
        /// <param name="order">The order of the square matrix <paramref name="data"/>.</param>
        /// <param name="ipiv">On exit, it contains the pivot indices. The size of the array must be <paramref name="order"/>.</param>
        /// <remarks>This is equivalent to the GETRF LAPACK routine.</remarks>
        [SecuritySafeCritical]
        public override void LUFactor(Complex[] data, int order, int[] ipiv)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            if (ipiv == null)
            {
                throw new ArgumentNullException("ipiv");
            }

            if (data.Length != order * order)
            {
                throw new ArgumentException(Resources.ArgumentArraysSameLength, "data");
            }

            if (ipiv.Length != order)
            {
                throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv");
            }
            
            SafeNativeMethods.z_lu_factor(order, data, ipiv);
        }

        /// <summary>
        /// Computes the dot product of x and y.
        /// </summary>
        /// <param name="x">The vector x.</param>
        /// <param name="y">The vector y.</param>
        /// <returns>The dot product of x and y.</returns>
        /// <remarks>This is equivalent to the DOT BLAS routine.</remarks>
        [SecuritySafeCritical]
        public override float DotProduct(float[] x, float[] y)
        {
            if (y == null)
            {
                throw new ArgumentNullException("y");
            }

            if (x == null)
            {
                throw new ArgumentNullException("x");
            }

            if (x.Length != y.Length)
            {
                throw new ArgumentException(Resources.ArgumentArraysSameLength);
            }

            return SafeNativeMethods.s_dot_product(x.Length, x, y);
        }
        
        /// <summary>
        /// Adds a scaled vector to another: <c>result = y + alpha*x</c>.
        /// </summary>
        /// <param name="y">The vector to update.</param>
        /// <param name="alpha">The value to scale <paramref name="x"/> by.</param>
        /// <param name="x">The vector to add to <paramref name="y"/>.</param>
        /// <param name="result">The result of the addition.</param>
        /// <remarks>This is similar to the AXPY BLAS routine.</remarks>
        [SecuritySafeCritical]
        public override void AddVectorToScaledVector(float[] y, float alpha, float[] x, float[] result)
        {
            if (y == null)
            {
                throw new ArgumentNullException("y");
            }

            if (x == null)
            {
                throw new ArgumentNullException("x");
            }

            if (y.Length != x.Length)
            {
                throw new ArgumentException(Resources.ArgumentVectorsSameLength);
            }

            if (!ReferenceEquals(y, result))
            {
                Array.Copy(y, 0, result, 0, y.Length);
            }

            if (alpha == 0.0f)
            {
                return;
            }

            SafeNativeMethods.s_axpy(y.Length, alpha, x, result);
        }

        /// <summary>
        /// Scales an array. Can be used to scale a vector and a matrix.
        /// </summary>
        /// <param name="alpha">The scalar.</param>
        /// <param name="x">The values to scale.</param>
        /// <param name="result">This result of the scaling.</param>
        /// <remarks>This is similar to the SCAL BLAS routine.</remarks>
        [SecuritySafeCritical]
        public override void ScaleArray(float alpha, float[] x, float[] result)
        {
            if (x == null)
            {
                throw new ArgumentNullException("x");
            } 
            
            if (!ReferenceEquals(x, result))
            {
                Array.Copy(x, 0, result, 0, x.Length);
            }

            if (alpha == 1.0f)
            {
                return;
            }

            SafeNativeMethods.s_scale(x.Length, alpha, result);
        }

        /// <summary>
        /// Multiples two matrices. <c>result = x * y</c>
        /// </summary>
        /// <param name="x">The x matrix.</param>
        /// <param name="rowsX">The number of rows in the x matrix.</param>
        /// <param name="columnsX">The number of columns in the x matrix.</param>
        /// <param name="y">The y matrix.</param>
        /// <param name="rowsY">The number of rows in the y matrix.</param>
        /// <param name="columnsY">The number of columns in the y matrix.</param>
        /// <param name="result">Where to store the result of the multiplication.</param>
        /// <remarks>This is a simplified version of the BLAS GEMM routine with alpha
        /// set to 1.0f and beta set to 0.0f, and x and y are not transposed.</remarks>
        public override void MatrixMultiply(float[] x, int rowsX, int columnsX, float[] y, int rowsY, int columnsY, float[] result)
        {
            MatrixMultiplyWithUpdate(Transpose.DontTranspose, Transpose.DontTranspose, 1.0f, x, rowsX, columnsX, y, rowsY, columnsY, 0.0f, result);
        }

        /// <summary>
        /// Multiplies two matrices and updates another with the result. <c>c = alpha*op(a)*op(b) + beta*c</c>
        /// </summary>
        /// <param name="transposeA">How to transpose the <paramref name="a"/> matrix.</param>
        /// <param name="transposeB">How to transpose the <paramref name="b"/> matrix.</param>
        /// <param name="alpha">The value to scale <paramref name="a"/> matrix.</param>
        /// <param name="a">The a matrix.</param>
        /// <param name="rowsA">The number of rows in the <paramref name="a"/> matrix.</param>
        /// <param name="columnsA">The number of columns in the <paramref name="a"/> matrix.</param>
        /// <param name="b">The b matrix</param>
        /// <param name="rowsB">The number of rows in the <paramref name="b"/> matrix.</param>
        /// <param name="columnsB">The number of columns in the <paramref name="b"/> matrix.</param>
        /// <param name="beta">The value to scale the <paramref name="c"/> matrix.</param>
        /// <param name="c">The c matrix.</param>
        [SecuritySafeCritical]
        public override void MatrixMultiplyWithUpdate(Transpose transposeA, Transpose transposeB, float alpha, float[] a, int rowsA, int columnsA, float[] b, int rowsB, int columnsB, float beta, float[] c)
        {
            if (a == null)
            {
                throw new ArgumentNullException("a");
            }

            if (b == null)
            {
                throw new ArgumentNullException("b");
            }

            if (c == null)
            {
                throw new ArgumentNullException("c");
            }

            var m = transposeA == Transpose.DontTranspose ? rowsA : columnsA;
            var n = transposeB == Transpose.DontTranspose ? columnsB : rowsB;
            var k = transposeA == Transpose.DontTranspose ? columnsA : rowsA;
            var l = transposeB == Transpose.DontTranspose ? rowsB : columnsB;

            if (c.Length != m * n)
            {
                throw new ArgumentException(Resources.ArgumentMatrixDimensions);   
            }

            if (k != l)
            {
                throw new ArgumentException(Resources.ArgumentMatrixDimensions);
            }

            SafeNativeMethods.s_matrix_multiply(transposeA, transposeB, m, n, k, alpha, a, b, beta, c);
        }

        /// <summary>
        /// Computes the LUP factorization of A. P*A = L*U.
        /// </summary>
        /// <param name="data">An <paramref name="order"/> by <paramref name="order"/> matrix. The matrix is overwritten with the
        /// the LU factorization on exit. The lower triangular factor L is stored in under the diagonal of <paramref name="data"/> (the diagonal is always 1.0f
        /// for the L factor). The upper triangular factor U is stored on and above the diagonal of <paramref name="data"/>.</param>
        /// <param name="order">The order of the square matrix <paramref name="data"/>.</param>
        /// <param name="ipiv">On exit, it contains the pivot indices. The size of the array must be <paramref name="order"/>.</param>
        /// <remarks>This is equivalent to the GETRF LAPACK routine.</remarks>
        [SecuritySafeCritical]
        public override void LUFactor(float[] data, int order, int[] ipiv)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            if (ipiv == null)
            {
                throw new ArgumentNullException("ipiv");
            }

            if (data.Length != order * order)
            {
                throw new ArgumentException(Resources.ArgumentArraysSameLength, "data");
            }

            if (ipiv.Length != order)
            {
                throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv");
            }
            
            SafeNativeMethods.s_lu_factor(order, data, ipiv);
        }

        /// <summary>
        /// Computes the dot product of x and y.
        /// </summary>
        /// <param name="x">The vector x.</param>
        /// <param name="y">The vector y.</param>
        /// <returns>The dot product of x and y.</returns>
        /// <remarks>This is equivalent to the DOT BLAS routine.</remarks>
        [SecuritySafeCritical]
        public override Complex32 DotProduct(Complex32[] x, Complex32[] y)
        {
            if (y == null)
            {
                throw new ArgumentNullException("y");
            }

            if (x == null)
            {
                throw new ArgumentNullException("x");
            }

            if (x.Length != y.Length)
            {
                throw new ArgumentException(Resources.ArgumentArraysSameLength);
            }

            return SafeNativeMethods.c_dot_product(x.Length, x, y);
        }
        
        /// <summary>
        /// Adds a scaled vector to another: <c>result = y + alpha*x</c>.
        /// </summary>
        /// <param name="y">The vector to update.</param>
        /// <param name="alpha">The value to scale <paramref name="x"/> by.</param>
        /// <param name="x">The vector to add to <paramref name="y"/>.</param>
        /// <param name="result">The result of the addition.</param>
        /// <remarks>This is similar to the AXPY BLAS routine.</remarks>
        [SecuritySafeCritical]
        public override void AddVectorToScaledVector(Complex32[] y, Complex32 alpha, Complex32[] x, Complex32[] result)
        {
            if (y == null)
            {
                throw new ArgumentNullException("y");
            }

            if (x == null)
            {
                throw new ArgumentNullException("x");
            }

            if (y.Length != x.Length)
            {
                throw new ArgumentException(Resources.ArgumentVectorsSameLength);
            }

            if (!ReferenceEquals(y, result))
            {
                Array.Copy(y, 0, result, 0, y.Length);
            }

            if (alpha == Complex32.Zero)
            {
                return;
            }

            SafeNativeMethods.c_axpy(y.Length, alpha, x, result);
        }

        /// <summary>
        /// Scales an array. Can be used to scale a vector and a matrix.
        /// </summary>
        /// <param name="alpha">The scalar.</param>
        /// <param name="x">The values to scale.</param>
        /// <param name="result">This result of the scaling.</param>
        /// <remarks>This is similar to the SCAL BLAS routine.</remarks>
        [SecuritySafeCritical]
        public override void ScaleArray(Complex32 alpha, Complex32[] x, Complex32[] result)
        {
            if (x == null)
            {
                throw new ArgumentNullException("x");
            } 
            
            if (!ReferenceEquals(x, result))
            {
                Array.Copy(x, 0, result, 0, x.Length);
            }

            if (alpha == Complex32.One)
            {
                return;
            }

            SafeNativeMethods.c_scale(x.Length, alpha, result);
        }

        /// <summary>
        /// Multiples two matrices. <c>result = x * y</c>
        /// </summary>
        /// <param name="x">The x matrix.</param>
        /// <param name="rowsX">The number of rows in the x matrix.</param>
        /// <param name="columnsX">The number of columns in the x matrix.</param>
        /// <param name="y">The y matrix.</param>
        /// <param name="rowsY">The number of rows in the y matrix.</param>
        /// <param name="columnsY">The number of columns in the y matrix.</param>
        /// <param name="result">Where to store the result of the multiplication.</param>
        /// <remarks>This is a simplified version of the BLAS GEMM routine with alpha
        /// set to Complex32.One and beta set to Complex32.Zero, and x and y are not transposed.</remarks>
        public override void MatrixMultiply(Complex32[] x, int rowsX, int columnsX, Complex32[] y, int rowsY, int columnsY, Complex32[] result)
        {
            MatrixMultiplyWithUpdate(Transpose.DontTranspose, Transpose.DontTranspose, Complex32.One, x, rowsX, columnsX, y, rowsY, columnsY, Complex32.Zero, result);
        }

        /// <summary>
        /// Multiplies two matrices and updates another with the result. <c>c = alpha*op(a)*op(b) + beta*c</c>
        /// </summary>
        /// <param name="transposeA">How to transpose the <paramref name="a"/> matrix.</param>
        /// <param name="transposeB">How to transpose the <paramref name="b"/> matrix.</param>
        /// <param name="alpha">The value to scale <paramref name="a"/> matrix.</param>
        /// <param name="a">The a matrix.</param>
        /// <param name="rowsA">The number of rows in the <paramref name="a"/> matrix.</param>
        /// <param name="columnsA">The number of columns in the <paramref name="a"/> matrix.</param>
        /// <param name="b">The b matrix</param>
        /// <param name="rowsB">The number of rows in the <paramref name="b"/> matrix.</param>
        /// <param name="columnsB">The number of columns in the <paramref name="b"/> matrix.</param>
        /// <param name="beta">The value to scale the <paramref name="c"/> matrix.</param>
        /// <param name="c">The c matrix.</param>
        [SecuritySafeCritical]
        public override void MatrixMultiplyWithUpdate(Transpose transposeA, Transpose transposeB, Complex32 alpha, Complex32[] a, int rowsA, int columnsA, Complex32[] b, int rowsB, int columnsB, Complex32 beta, Complex32[] c)
        {
            if (a == null)
            {
                throw new ArgumentNullException("a");
            }

            if (b == null)
            {
                throw new ArgumentNullException("b");
            }

            if (c == null)
            {
                throw new ArgumentNullException("c");
            }

            var m = transposeA == Transpose.DontTranspose ? rowsA : columnsA;
            var n = transposeB == Transpose.DontTranspose ? columnsB : rowsB;
            var k = transposeA == Transpose.DontTranspose ? columnsA : rowsA;
            var l = transposeB == Transpose.DontTranspose ? rowsB : columnsB;

            if (c.Length != m * n)
            {
                throw new ArgumentException(Resources.ArgumentMatrixDimensions);   
            }

            if (k != l)
            {
                throw new ArgumentException(Resources.ArgumentMatrixDimensions);
            }

            SafeNativeMethods.c_matrix_multiply(transposeA, transposeB, m, n, k, alpha, a, b, beta, c);
        }

        /// <summary>
        /// Computes the LUP factorization of A. P*A = L*U.
        /// </summary>
        /// <param name="data">An <paramref name="order"/> by <paramref name="order"/> matrix. The matrix is overwritten with the
        /// the LU factorization on exit. The lower triangular factor L is stored in under the diagonal of <paramref name="data"/> (the diagonal is always Complex32.One
        /// for the L factor). The upper triangular factor U is stored on and above the diagonal of <paramref name="data"/>.</param>
        /// <param name="order">The order of the square matrix <paramref name="data"/>.</param>
        /// <param name="ipiv">On exit, it contains the pivot indices. The size of the array must be <paramref name="order"/>.</param>
        /// <remarks>This is equivalent to the GETRF LAPACK routine.</remarks>
        [SecuritySafeCritical]
        public override void LUFactor(Complex32[] data, int order, int[] ipiv)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            if (ipiv == null)
            {
                throw new ArgumentNullException("ipiv");
            }

            if (data.Length != order * order)
            {
                throw new ArgumentException(Resources.ArgumentArraysSameLength, "data");
            }

            if (ipiv.Length != order)
            {
                throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv");
            }
            
            SafeNativeMethods.c_lu_factor(order, data, ipiv);
        }

ExpressionEvaluator.Parser.Expressions.Argument : Object

Constructors :

public Argument()

Methods :

public Expression get_Expression()
public Void set_Expression(Expression value = )
public Boolean get_IsNamedArgument()
public Void set_IsNamedArgument(Boolean value = )
public String get_Name()
public Void set_Name(String value = )
public Int32 get_Position()
public Void set_Position(Int32 value = )
public ParameterPassingModeEnum get_ParameterPassingMode()
public Void set_ParameterPassingMode(ParameterPassingModeEnum value = )
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()