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)


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

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


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


  • 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.


Target Platforms

See Also


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