Compartir a través de


Failure Class

Describes a failure.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.VersionControl.Client.Failure

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

Syntax

'Declaración
Public NotInheritable Class Failure
public sealed class Failure
public ref class Failure sealed
[<Sealed>]
type Failure =  class end
public final class Failure

The Failure type exposes the following members.

Properties

  Name Description
Public property Code Gets the failure code.
Public property ComputerName Gets the name of the computer that is associated with the failure.
Public property IdentityName Gets the identity that is associated with the failure.
Public property ItemId Gets the item ID that is associated with the failure.
Public property LocalItem Gets the local item that is associated with the failure.
Public property Message Gets the failure message.
Public property RequestType Gets the request type that caused this failure.
Public property ResourceName Gets the resource name that is associated with the failure.
Public property ServerItem Gets the server item that is associated with the failure.
Public property Severity Gets the severity of the failure.
Public property VersionControlServer Gets the version control server on which the failure occurred.
Public property Warnings Gets an array of warnings that is associated with the failure.
Public property WorkspaceName Gets the workspace name that is associated with the failure.
Public property WorkspaceOwner Gets the workspace owner that is associated with the failure.

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 GetFormattedMessage Gets a user-readable message that describes this failure.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Creates a user-readable string that describes the properties of a failure. (Overrides Object.ToString().)

Top

Remarks

The Failure object contains much of the same information as an exception but is not derived from Exception and is not throwable.

Commands that operate on a collection of items, each of which may succeed or fail independently of the others will return an array of Failure objects representing the items that had trouble.

The Failure object also contains fields that describe the context in which the error occurred. A smart client may use these to make decisions about how to handle the error. Irrelevant info remains null and will not be sent as part of the soap reply.

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.VersionControl.Client Namespace