Share via


RequestExtensions.Extend Method

This is called to adapt and extend an object that we wish to pass to a foreign app domain This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.PackageProvider.Bootstrap
Assembly: Microsoft.OneGet.PackageProvider.Bootstrap (in Microsoft.OneGet.PackageProvider.Bootstrap.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 that we are passing
  • tInterface
    the target interface (from the foreign appdomain)
  • objects
    the overriding objects (may be anonymous objects with Delegates, or an object 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.PackageProvider.Bootstrap Namespace