RequestExtensions.As Method

Use this method to adapt an object from a foreign app domain to a known interface in this app domain. This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.MetaProvider.PowerShell
Assembly: Microsoft.OneGet.MetaProvider.PowerShell (in Microsoft.OneGet.MetaProvider.PowerShell.dll)

Usage

'Usage
Dim instance As Object
Dim returnValue As T

returnValue = RequestExtensions.As(instance)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function As(Of T) ( _
    instance As Object _
) As T
[ExtensionAttribute] 
public static T As<T> (
    Object instance
)
[ExtensionAttribute] 
public:
generic<typename T>
static T As (
    Object^ instance
)

GenericParameters

  • T
  • T

Parameters

  • instance
  • instance

Return Value

Returns {0}.

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.MetaProvider.PowerShell Namespace