BuildEnvironment.TryGetEnvironment Method
Checks whether it is possible to get the environment of the specified object.
Namespace: Microsoft.TeamFoundation.Build.Workflow
Assembly: Microsoft.TeamFoundation.Build.Workflow (in Microsoft.TeamFoundation.Build.Workflow.dll)
Syntax
声明
Public Shared Function TryGetEnvironment ( _
instance As Object, _
<OutAttribute> ByRef environment As HostEnvironmentOption _
) As Boolean
public static bool TryGetEnvironment(
Object instance,
out HostEnvironmentOption environment
)
public:
static bool TryGetEnvironment(
Object^ instance,
[OutAttribute] HostEnvironmentOption% environment
)
static member TryGetEnvironment :
instance:Object *
environment:HostEnvironmentOption byref -> bool
public static function TryGetEnvironment(
instance : Object,
environment : HostEnvironmentOption
) : boolean
Parameters
- instance
Type: System.Object
The object of which the host environment is desired.
- environment
Type: Microsoft.TeamFoundation.Build.Client.HostEnvironmentOption%
A HostEnvironmentOption value that specifies the host environment of the specified object.
Return Value
Type: System.Boolean
True if it is possible to get the host environment of instance; otherwise, false.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.