RequestExtensions.Extend Method

Used to extend an object with an interface from a foreign app domain. This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.ServicesProvider.Common
Assembly: Microsoft.OneGet.ServicesProvider.Common (in Microsoft.OneGet.ServicesProvider.Common.dll)

Usage

'Usage
Dim obj As Object
Dim tInterface As Type
Dim objects As Object()
Dim returnValue As MarshalByRefObject

returnValue = RequestExtensions.Extend(obj, tInterface, objects)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Extend ( _
    obj As Object, _
    tInterface As Type, _
    ParamArray objects As Object() _
) As MarshalByRefObject
[ExtensionAttribute] 
public static MarshalByRefObject Extend (
    Object obj,
    Type tInterface,
    params Object[] objects
)
[ExtensionAttribute] 
public:
static MarshalByRefObject^ Extend (
    Object^ obj, 
    Type^ tInterface, 
    ... array<Object^>^ objects
)
/** @attribute ExtensionAttribute() */ 
public static MarshalByRefObject Extend (
    Object obj, 
    Type tInterface, 
    Object[] objects
)
ExtensionAttribute 
public static function Extend (
    obj : Object, 
    tInterface : Type, 
    ... objects : Object[]
) : MarshalByRefObject

Parameters

  • obj
    The base object to extend.
  • tInterface
    The interface from the foreign app domain.
  • objects
    The overriding objects. These can be anonymous objects with Delegates or objects with methods.

Return Value

Returns MarshalByRefObject.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

RequestExtensions Class
RequestExtensions Members
Microsoft.OneGet.ServicesProvider.Common Namespace