Skip to main content

Definition

Assembly: Microsoft.Restier.Core.dll Namespace: Microsoft.Restier.Core.Operation Inheritance: Microsoft.Restier.Core.InvocationContext

Syntax

Microsoft.Restier.Core.Operation.OperationContext

Summary

Represents context under which a operation is executed. One instance created for one execution of one operation.

Constructors

.ctor

Initializes a new instance of the OperationContext class.

Syntax

public OperationContext(Microsoft.Restier.Core.ApiBase api, System.Func<string, object> getParameterValueFunc, string operationName, bool isFunction, System.Collections.IEnumerable bindingParameterValue)

Parameters

NameTypeDescription
apiMicrosoft.Restier.Core.ApiBaseAn Api.
getParameterValueFuncSystem.Func<string, object>The function that used to retrieve the parameter value name.
operationNamestringThe operation name.
isFunctionboolA flag indicates this is a function call or action call.
bindingParameterValueSystem.Collections.IEnumerableA queryable for binding parameter value and if it is function/action import, the value will be null.

.ctor Inherited

Inherited from Microsoft.Restier.Core.InvocationContext
Initializes a new instance of the InvocationContext class.

Syntax

public InvocationContext(Microsoft.Restier.Core.ApiBase api)

Parameters

NameTypeDescription
apiMicrosoft.Restier.Core.ApiBaseAn Api.

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

Api Inherited

Inherited from Microsoft.Restier.Core.InvocationContext
Gets the ApiBase descendant for this invocation.

Syntax

public Microsoft.Restier.Core.ApiBase Api { get; }

Property Value

Type: Microsoft.Restier.Core.ApiBase

BindingParameterValue

Gets the queryable for binding parameter value, and if it is function/action import, the value will be null.

Syntax

public System.Collections.IEnumerable BindingParameterValue { get; }

Property Value

Type: System.Collections.IEnumerable

GetParameterValueFunc

Gets the function that used to retrieve the parameter value name.

Syntax

public System.Func<string, object> GetParameterValueFunc { get; }

Property Value

Type: System.Func<string, object>

IsFunction

Gets a value indicating whether it is a function call or action call.

Syntax

public bool IsFunction { get; }

Property Value

Type: bool

OperationName

Gets the operation name.

Syntax

public string OperationName { get; }

Property Value

Type: string

ParameterValues

Gets or sets the parameters value array used by method, It is only set after parameters are prepared.

Syntax

public System.Collections.Generic.ICollection<object> ParameterValues { get; set; }

Property Value

Type: System.Collections.Generic.ICollection<object>

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetApiService Inherited

Inherited from Microsoft.Restier.Core.InvocationContext
Gets an API service.

Syntax

public T GetApiService<T>() where T : class

Returns

Type: T The API service instance.

Type Parameters

  • T - The API service type.

GetApiService Inherited

Inherited from Microsoft.Restier.Core.InvocationContext
Gets an API service.

Syntax

public object GetApiService(System.Type type)

Parameters

NameTypeDescription
typeSystem.TypeThe API service type.

Returns

Type: object The API service instance.

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?