Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TeamFoundationServiceHost Class

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

public class TeamFoundationServiceHost : ServiceHost<TeamFoundationRequestContext>, 

The TeamFoundationServiceHost type exposes the following members.

Protected propertyActiveRequestsList of active requests on this host (Inherited from ServiceHost<T>.)
Public propertyApplicationServiceHostRetrieves the application service host from the current host, if this host is an application or collection.If it is a DeploymentServiceHost this property will return null.
Public propertyAuthorityReturns the authority of the host (e.g. contoso.tfs.com). This can be null if the host does not require authority-matching for host selection.
Public propertyCollectionServiceHostRetrieves the collection service host from the current host. If this host is not a collection it will search up the host chain to find it. If one isnt found, it will return null.
Public propertyDataDirectoryThis the fully qualified local filesystem directory that this host can used to store files. Other hosts will not read/write to this location. An example of this is the VersionControl Proxy cache location. Gets the data directory configured based on the following logic: 1. Checks to see whether there is one specified in the .config file. 2. Checks to see whether there is one specified in the registry. 3. Use the PhysicalDirectory\_tfs_data if it is available. 4. String.Empty is used as the root. The directory is then made unique for this host.The directory is then made unique for this host.
Public propertyDeploymentServiceHostRetrieves the deployment service host associated with the current host. For Deployment, Application and Collection hosts this should never return null.
Public propertyHasDatabaseAccessReturns true if the service host knows how to talk to the database
Public propertyHostTypeThe context this service host is running in.
Public propertyInstanceIdThe unique identifier for this service host. (Overrides ServiceHost<T>.InstanceId.)
Public propertyIsDisposed (Inherited from ServiceHost<T>.)
Public propertyIsProductionFlag that determines Production/Development Environment.
Public propertyItemsThe Items collection allows for others in the system to store named data in the context of a single service host.
Public propertyLastUse (Inherited from ServiceHost<T>.)
Public propertyMetabaseThe MetaBase for this host defines is general configuration around its path structure.
Protected propertyMetabaseRegistryPatternsThe metabase registry query patterns for this service host.
Public propertyNameThe name for this service host. May be null or empty.
Public propertyNumberOfActiveRequestsNumber of currently active requests (Inherited from ServiceHost<T>.)
Public propertyParentServiceHost
Public propertyPartitionId
Public propertyPhysicalDirectoryThis is the fully qualified local file system directory that this host is mapped to. If the virtual path is remapped, this directory should represent the remapped location.
Public propertyPlugInDirectory
Protected propertyRequestsDrainedEventGets the Event. (Inherited from ServiceHost<T>.)
Public propertyStartTimeGets the time this host instance was started.
Public propertyStaticContentDirectoryThe static content directory, relative to the SAP. This allows the virtual directory to be mapped to a different location than the actual content on the drive.
Public propertyStatusGets the current status of the service host.
Public propertyStatusReasonGets the reason for the current status.
Public propertyVirtualDirectoryThis is the virtual directory of the host, relative to the SAP Example: http://charry-dev:8080/Application/Collection Application Host = /Application Collection Host = /Application/Colletion (Overrides ServiceHost<T>.VirtualDirectory.)

Public methodApplicationEndRequestEnd an application request. Processes request filters, removes the request from the set of active requests, and disposes the request context.
Public methodBeginRequestAdd a request context to the set of currently active requests (Overrides ServiceHost<T>.BeginRequest(T).)
Protected methodBeginStatusChangeBegins a status change operation on the current host if applicable.
Protected methodCheckIfDisposedVerify the host is still a valid host object and hasn't been disposed before we start using it. (Inherited from ServiceHost<T>.)
Public methodCreateServicingContext
Public methodDispose() (Inherited from ServiceHost<T>.)
Protected methodDispose(Boolean) (Overrides ServiceHost<T>.Dispose(Boolean).)
Public methodEndRequestRemove a request context to the set of currently active requests (Overrides ServiceHost<T>.EndRequest(T).)
Protected methodEndStatusChangeCompletes a status change operation by transitioning the state to the next valid state. Stopping goes to Stopped, Starting goes to Started, and Pausing goes to Paused.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetCultureThe Application Culture is the installed culture for this team foundation application.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodInitializeMetabaseLegacyInitialize the metabase the old way. We still need to keep this method to support online upgrade, when the request restriction registry keys are not yet persisted to the TFS registry table. Note: DO NOT add new request restrictions to this method.
Public methodIsIs can be used to determine whether a service host supports the features of a given TeamFoundationHostType. One service host can support multiple host types.
Public methodIsOnlyServiceHosts can be multiple types at the same time, an example is the deployment service host may be combined with an application service host. This method will make sure that the host is only the type specified and not combined with other types.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMonitorClientDisconnects
Protected methodMonitorServiceHostRequests
Protected methodOiHeartbeat
Protected methodRaisePropertiesChanged
Protected methodRaiseStatusChanged
Public methodReportException
Protected methodSetHostStatusThis method is for internal use only.
Protected methodStartServicesLoads the core services in the appropriate order.
Protected methodStopServicesShuts down all active services for the current service host.
Public methodThrowIfShutdownThrows an exception if the host is currently paused or stopped.
Public methodToString() (Overrides Object.ToString().)
Public methodStatic memberToString(Guid, String)
Public methodStatic memberToString(String, String)

Public eventPropertiesChangedProvide events to capture the host properties changing.
Public eventStatusChangedProvide events to capture the host status changing and changed events.

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