共用方式為


TfsClientCredentials Class

Provides credentials to use when you connect to a Team Foundation Server.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.Client.TfsClientCredentials

Namespace:  Microsoft.TeamFoundation.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)

Syntax

'Declaration
Public Class TfsClientCredentials
public class TfsClientCredentials
public ref class TfsClientCredentials
type TfsClientCredentials =  class end
public class TfsClientCredentials

The TfsClientCredentials type exposes the following members.

Constructors

  Name Description
Public method TfsClientCredentials() Initializes a new TfsClientCredentials instance with default credentials.
Public method TfsClientCredentials(Boolean) Initializes a new TfsClientCredentials instance with default credentials if they are specified.
Public method TfsClientCredentials(FederatedCredential) Initializes a new TfsClientCredentials instance with the specified windows credential and default issued token credential.
Public method TfsClientCredentials(WindowsCredential) Initializes a new TfsClientCredentials instance with the specified windows credential and default issued token credential.
Public method TfsClientCredentials(WindowsCredential, FederatedCredential) Initializes a new TfsClientCredentials instance with the specified windows and issued token credential.
Public method TfsClientCredentials(WindowsCredential, Boolean) Initializes a new TfsClientCredentials instance with the specified windows credential and default issued token credential.
Public method TfsClientCredentials(WindowsCredential, FederatedCredential, Boolean) Initializes a new TfsClientCredentials instance with the specified windows and issued token credential.

Top

Properties

  Name Description
Public property AllowInteractive Gets or sets a value indicating whether interactive prompts are allowed.
Public property Federated Gets or sets a value indicating the issued token credentials to use for authentication with the server.
Public property Windows Gets the windows credential to use for NTLM authentication with the server.

Top

Methods

  Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public methodStatic member LoadCachedCredentials(Uri, Boolean, Boolean) Loads stored credentials for the specified server if found. If no credentials are found in the windows credential store for the specified server and options then default credentials are returned.
Public methodStatic member LoadCachedCredentials(String, Uri, Boolean, Boolean) Loads stored credentials for the specified server if found. If no credentials are found for the specified server and options then default credentials are returned. This overload assumes that the credentials are to be stored under the TFS server's registry root
Public methodStatic member LoadCachedCredentials(String, Uri, Boolean, Boolean, String, Boolean) Loads stored credentials for the specified server if found. If no credentials are found in the windows credential store for the specified server and options then default credentials are returned.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SignOut
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Operators

  Name Description
Public operatorStatic member Implicit(FederatedCredential to TfsClientCredentials) Implicitly converts a FederatedCredential instance into a TfsClientCredentials instance.
Public operatorStatic member Implicit(WindowsCredential to TfsClientCredentials) Implicitly converts a WindowsCredential instance into a TfsClientCredentials instance.

Top

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.

See Also

Reference

Microsoft.TeamFoundation.Client Namespace