RemoteArgument.CreateRemoteArgument Method

Definition

Creates a RemoteArgument for an argument.

Overloads

CreateRemoteArgument(Object)

Creates a RemoteArgument for an argument that is not passed by reference.

CreateRemoteArgument(Object, Boolean)

Creates a RemoteArgument for an argument that can be passed by reference.

CreateRemoteArgument(Object, Boolean, TypeCode)

Creates a RemoteArgument for an argument that has the specified type code and that can be passed by reference.

CreateRemoteArgument(Object)

Creates a RemoteArgument for an argument that is not passed by reference.

public static System.AddIn.Contract.RemoteArgument CreateRemoteArgument (object value);

Parameters

value
Object

The argument that will be passed across process or application domain boundaries.

Returns

A RemoteArgument that represents the specified argument.

Exceptions

value is null.

The TypeCode of value is Object and value is not an IContract.

-or-

The TypeCode of value is Empty and value is not set to Value.

-or-

value does not implement the IConvertible interface and value is not an Array.

-or-

value is an Array that contains elements with a TypeCode value of Object.

Remarks

This method calls the RemoteArgument constructor that applies to the type of the value parameter.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

CreateRemoteArgument(Object, Boolean)

Creates a RemoteArgument for an argument that can be passed by reference.

public static System.AddIn.Contract.RemoteArgument CreateRemoteArgument (object value, bool isByRef);

Parameters

value
Object

The argument that will be passed across process or application domain boundaries.

isByRef
Boolean

true to pass the value argument by reference; otherwise, false.

Returns

A RemoteArgument that represents the specified argument.

Exceptions

value is null.

The TypeCode of value is Object and value is not an IContract.

-or-

The TypeCode of value is Empty and value is not set to Value.

-or-

value does not implement the IConvertible interface and value is not an Array.

-or-

value is an Array that contains elements with a TypeCode value of Object.

Remarks

This method calls the RemoteArgument constructor that applies to the type of the value parameter.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

CreateRemoteArgument(Object, Boolean, TypeCode)

Creates a RemoteArgument for an argument that has the specified type code and that can be passed by reference.

public static System.AddIn.Contract.RemoteArgument CreateRemoteArgument (object value, bool isByRef, TypeCode typeCodeToUse);

Parameters

value
Object

The argument that will be passed across process or application domain boundaries.

isByRef
Boolean

true to pass the argument by reference; otherwise, false.

typeCodeToUse
TypeCode

A TypeCode that indicates the type code of value, if value is not an Array. Otherwise, a TypeCode that indicates the type code of the elements in value.

Returns

A RemoteArgument that represents the specified argument.

Exceptions

The TypeCode of value is Object, value is not an IContract, and value is not null.

-or-

The TypeCode of value is Empty and value is not Value.

-or-

value does not implement the IConvertible interface, value is not null, and value is not an Array.

-or-

value is an Array that contains elements with a TypeCode value of Object.

The TypeCode of value is not DBNull and typeCodeToUse is DBNull.

typeCodeToUse does not specify a valid TypeCode value.

Remarks

This method calls the RemoteArgument constructor that applies to the type of the value parameter.

You cannot use this method to create a RemoteArgument that represents a null array that contains elements of intrinsic data types. An intrinsic data type is a primitive data type (that is, the Type.IsPrimitive property of the type is true) or a String, Decimal, DateTime, or DBNull.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1