Uredi

Deli z drugimi prek


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(System::Object ^ value);
public static System.AddIn.Contract.RemoteArgument CreateRemoteArgument (object value);
static member CreateRemoteArgument : obj -> System.AddIn.Contract.RemoteArgument
Public Shared Function CreateRemoteArgument (value As Object) As RemoteArgument

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

CreateRemoteArgument(Object, Boolean)

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

public:
 static System::AddIn::Contract::RemoteArgument CreateRemoteArgument(System::Object ^ value, bool isByRef);
public static System.AddIn.Contract.RemoteArgument CreateRemoteArgument (object value, bool isByRef);
static member CreateRemoteArgument : obj * bool -> System.AddIn.Contract.RemoteArgument
Public Shared Function CreateRemoteArgument (value As Object, isByRef As Boolean) As RemoteArgument

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

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(System::Object ^ value, bool isByRef, TypeCode typeCodeToUse);
public static System.AddIn.Contract.RemoteArgument CreateRemoteArgument (object value, bool isByRef, TypeCode typeCodeToUse);
static member CreateRemoteArgument : obj * bool * TypeCode -> System.AddIn.Contract.RemoteArgument
Public Shared Function CreateRemoteArgument (value As Object, isByRef As Boolean, typeCodeToUse As TypeCode) As RemoteArgument

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