This documentation is archived and is not being maintained.

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.

System::Object
  Microsoft.TeamFoundation.Framework.Server::Command

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

public ref class Command abstract : ICommand, 
	IDisposable

The Command type exposes the following members.

  NameDescription
Protected methodCommandAll Commands have an ICommandContext that enables them to communicate with the calling application.
Top

  NameDescription
Public propertyStatic memberCommandCacheLimitGet/Set Global Command cache size limit.
Public propertyIsCacheFullIsCacheFull returns True if the command cache is over the limit.
Protected propertyIsCanceledIsStopped returns true if the command has been stopped for any reason.
Public propertyMaxCacheSizeGet/Set command instance cache size limit.
Public propertyNameReturn the type name of this command.
Protected propertyRequestContextContext this command is executing.
Public propertyTotalResultSizeThe 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

  NameDescription
Public methodContinueExecutionDerived 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.
Public methodDecrementCacheUsageDecrementCacheUsage is used to notify the command that data is being dropped from the cache, usually by returning it to the application.
Public methodDispose()IDisposable implementation. When an ICommandContext ends, it will dispose each command that has been registered with it.
Protected methodDispose(Boolean)
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalize (Overrides Object::Finalize().)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIncrementCacheUsageIncrementCacheUsage 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.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: