次の方法で共有


FeatureAvailabilityExtensionMethods.IsFeatureEnabled Method

Checks the TeamFoundationFeatureAvailabilityService to detect if feature is enabled. The request context is elevated to bypass security checks which is permitted here since the request is initiated on the server side.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function IsFeatureEnabled ( _
    requestContext As TeamFoundationRequestContext, _
    featureName As String _
) As Boolean
public static bool IsFeatureEnabled(
    this TeamFoundationRequestContext requestContext,
    string featureName
)
[ExtensionAttribute]
public:
static bool IsFeatureEnabled(
    TeamFoundationRequestContext^ requestContext, 
    String^ featureName
)
static member IsFeatureEnabled : 
        requestContext:TeamFoundationRequestContext * 
        featureName:string -> bool
public static function IsFeatureEnabled(
    requestContext : TeamFoundationRequestContext, 
    featureName : String
) : boolean

Parameters

Return Value

Type: System.Boolean
true if feature is enabled, false otherwise

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TeamFoundationRequestContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

FeatureAvailabilityExtensionMethods Class

Microsoft.TeamFoundation.Framework.Server Namespace