Command Class
Command class that all Business Logic commands derive from. Each command implementation should implement an Execute method that performs the actual work for this command.
Inheritance Hierarchy
System.Object
Microsoft.TeamFoundation.Framework.Server.Command
Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public MustInherit Class Command _
Implements ICommand, IDisposable
public abstract class Command : ICommand,
IDisposable
public ref class Command abstract : ICommand,
IDisposable
[<AbstractClass>]
type Command =
class
interface ICommand
interface IDisposable
end
public abstract class Command implements ICommand, IDisposable
The Command type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Command | All Commands have an ICommandContext that enables them to communicate with the calling application. |
Top
Properties
Name | Description | |
---|---|---|
CommandCacheLimit | Get/Set Global Command cache size limit. | |
IsCacheFull | IsCacheFull returns True if the command cache is over the limit. | |
IsCanceled | IsStopped returns true if the command has been stopped for any reason. | |
MaxCacheSize | Get/Set command instance cache size limit. | |
Name | Return the type name of this command. | |
RequestContext | Context this command is executing. | |
TotalResultSize | The TotalResultSize is the sum of all data sent that was ever added to the command cache. This gives an approximate representation the size of the response for the command. |
Top
Methods
Name | Description | |
---|---|---|
ContinueExecution | Derived classes can override ContinueExecution when the initial call to Execute returns partial results. This will allow the command to continue with the operation and retrieve more data for the response. If the command always returns completed results from the Execute method it does not have to implement this method. | |
DecrementCacheUsage | DecrementCacheUsage is used to notify the command that data is being dropped from the cache, usually by returning it to the application. | |
Dispose() | IDisposable implementation. When an ICommandContext ends, it will dispose each command that has been registered with it. | |
Dispose(Boolean) | ||
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | (Overrides Object.Finalize().) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IncrementCacheUsage | IncrementCacheUsage is used to notify the command that data is being cached that can be sent to the client. Once the command caches enough data, this method returns True to the caller telling them that it has exceeded the maximum requested cache size. If the caller can stop execution and return its current data, it should do so at this point. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
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.