C# Class Microsoft.Protocols.TestSuites.SharedTestSuite.StatusManager

This class is used to make sure clean up the test environment.
Show file Open project: OfficeDev/Interop-TestSuites

Public Methods

Method Description
CancelExclusiveLock ( string fileUrl ) : void

This method is used to cancel record of exclusive lock.

CancelRecordCheckOut ( string fileUrl ) : void

This method is used to cancel record of check out.

CancelSharedLock ( string fileUrl, string clientId, string schemaLockId ) : void

This method is used to cancel record of coauthoring session or schema lock.

CleanUpFiles ( ) : bool

This method is used to remove all the upload files by the records.

GenerateErrorMessageReport ( ) : string

This method is used to generate error message report when cleaning the environment.

RecordCoauthSession ( string fileUrl, string clientId, string schemaLockId ) : void

This method is used to record the coauth lock status with specified client ID and schema lock ID for the file URL.

RecordCoauthSession ( string fileUrl, string clientId, string schemaLockId, string userName, string password, string domain ) : void

This method is used to record the coauth lock status with specified client ID and schema lock ID for the file URL.

RecordDisableCellStorageService ( ) : void

This method is used to record the status of storage web service turned off.

RecordDisableClaimsBasedAuthentication ( ) : void

This method is used to record the status of switching to the windows based claims authentication.

RecordDisableCoauth ( ) : void

This method is used to record the status of disable coauthoring feature.

RecordDisableVersioning ( string documentLibraryName ) : void

This method is used to record the status of disable the versioning for the specified document library.

RecordDocumentLibraryCheckOutRequired ( ) : void

This method is used to record the status of saving file to document library that needs files checked out.

RecordEditorTable ( string fileUrl, string clientId ) : void

This method is used to record the editors table status with specified client ID and editorsTableType for the file URL.

RecordEditorTable ( string fileUrl, string clientId, string userName, string password, string domain ) : void

This method is used to record the Editors Table status with specified client ID and editorsTableType for the file URL.

RecordExclusiveLock ( string fileUrl, string exclusiveId ) : void

This method is used to record the exclusive lock status with specified exclusive lock ID for the file URL.

RecordExclusiveLock ( string fileUrl, string exclusiveId, string userName, string password, string domain ) : void

This method is used to record the exclusive lock status with specified exclusive lock ID for the file URL.

RecordFileCheckOut ( string fileUrl, string userName, string password, string domain ) : void

This method is used to record the specified file URL which has been checked out.

RecordFileUpload ( string url ) : void

This method is used to record the status which one file is uploaded to the specified full file URI.

RecordSchemaLock ( string fileUrl, string clientId, string schemaLockId ) : void

This method is used to record the schema lock status with specified client ID and schema lock ID for the file URL.

RecordSchemaLock ( string fileUrl, string clientId, string schemaLockId, string userName, string password, string domain ) : void

This method is used to record the schema lock status with specified client ID and schema lock ID for the file URL.

RollbackStatus ( ) : bool

Roll back all the file and document library status to do the environment clean up.

StatusManager ( ITestSite site, Action intializeContext ) : System

Initializes a new instance of the StatusManager class.

Private Methods

Method Description
AddOrUpdate ( ServerStatus key, System.Action value ) : void

This method is used to add or update the DocumentLibraryStatusRollbackFunctions key/value pairs.

AddOrUpdate ( SharedLockKey key, System.Action value ) : void

This method is used to add or update the ReleaseSharedLockFunctions key/value pairs.

AddOrUpdate ( string key, System.Action value, KeyStatus keyStatus ) : void

This method is used to add or update the key/value pairs with the specified key status.

Method Details

CancelExclusiveLock() public method

This method is used to cancel record of exclusive lock.
public CancelExclusiveLock ( string fileUrl ) : void
fileUrl string Specify the file URL which get the exclusive lock.
return void

CancelRecordCheckOut() public method

This method is used to cancel record of check out.
public CancelRecordCheckOut ( string fileUrl ) : void
fileUrl string Specify the file URL which has been checked out.
return void

CancelSharedLock() public method

This method is used to cancel record of coauthoring session or schema lock.
public CancelSharedLock ( string fileUrl, string clientId, string schemaLockId ) : void
fileUrl string Specify the file URL which get the coauth lock.
clientId string Specify the client ID of the coauth lock.
schemaLockId string Specify the schema ID of the coauth lock.
return void

CleanUpFiles() public method

This method is used to remove all the upload files by the records.
public CleanUpFiles ( ) : bool
return bool

GenerateErrorMessageReport() public method

This method is used to generate error message report when cleaning the environment.
public GenerateErrorMessageReport ( ) : string
return string

RecordCoauthSession() public method

This method is used to record the coauth lock status with specified client ID and schema lock ID for the file URL.
public RecordCoauthSession ( string fileUrl, string clientId, string schemaLockId ) : void
fileUrl string Specify the file URL which get the coauth lock.
clientId string Specify the client ID of the coauth lock.
schemaLockId string Specify the schema ID of the coauth lock.
return void

RecordCoauthSession() public method

This method is used to record the coauth lock status with specified client ID and schema lock ID for the file URL.
public RecordCoauthSession ( string fileUrl, string clientId, string schemaLockId, string userName, string password, string domain ) : void
fileUrl string Specify the file URL which get the coauth lock.
clientId string Specify the client ID of the coauth lock.
schemaLockId string Specify the schema ID of the coauth lock.
userName string Specify the user name of the user who calls cell storage service.
password string Specify the password of the user who calls cell storage service.
domain string Specify the domain of the user who calls cell storage service.
return void

RecordDisableCellStorageService() public method

This method is used to record the status of storage web service turned off.
public RecordDisableCellStorageService ( ) : void
return void

RecordDisableClaimsBasedAuthentication() public method

This method is used to record the status of switching to the windows based claims authentication.
public RecordDisableClaimsBasedAuthentication ( ) : void
return void

RecordDisableCoauth() public method

This method is used to record the status of disable coauthoring feature.
public RecordDisableCoauth ( ) : void
return void

RecordDisableVersioning() public method

This method is used to record the status of disable the versioning for the specified document library.
public RecordDisableVersioning ( string documentLibraryName ) : void
documentLibraryName string Specify the document library name.
return void

RecordDocumentLibraryCheckOutRequired() public method

This method is used to record the status of saving file to document library that needs files checked out.
public RecordDocumentLibraryCheckOutRequired ( ) : void
return void

RecordEditorTable() public method

This method is used to record the editors table status with specified client ID and editorsTableType for the file URL.
public RecordEditorTable ( string fileUrl, string clientId ) : void
fileUrl string Specify the file URL which get the file we use
clientId string Specify the client ID of the editors table.
return void

RecordEditorTable() public method

This method is used to record the Editors Table status with specified client ID and editorsTableType for the file URL.
public RecordEditorTable ( string fileUrl, string clientId, string userName, string password, string domain ) : void
fileUrl string Specify the file URL which get the file we use.
clientId string Specify the client ID of the editors table.
userName string Specify the user name of the user who calls cell storage service.
password string Specify the password of the user who calls cell storage service.
domain string Specify the domain of the user who calls cell storage service.
return void

RecordExclusiveLock() public method

This method is used to record the exclusive lock status with specified exclusive lock ID for the file URL.
public RecordExclusiveLock ( string fileUrl, string exclusiveId ) : void
fileUrl string Specify the file URL which get the exclusive lock.
exclusiveId string Specify the exclusive lock ID of the exclusive lock.
return void

RecordExclusiveLock() public method

This method is used to record the exclusive lock status with specified exclusive lock ID for the file URL.
public RecordExclusiveLock ( string fileUrl, string exclusiveId, string userName, string password, string domain ) : void
fileUrl string Specify the file URL which get the exclusive lock.
exclusiveId string Specify the exclusive lock ID of the exclusive lock.
userName string Specify the user name of the user who calls cell storage service.
password string Specify the password of the user who calls cell storage service.
domain string Specify the domain of the user who calls cell storage service.
return void

RecordFileCheckOut() public method

This method is used to record the specified file URL which has been checked out.
public RecordFileCheckOut ( string fileUrl, string userName, string password, string domain ) : void
fileUrl string Specify the file URL which has been checked out.
userName string Specify the user name of the user who calls cell storage service.
password string Specify the password of the user who calls cell storage service.
domain string Specify the domain of the user who calls cell storage service.
return void

RecordFileUpload() public method

This method is used to record the status which one file is uploaded to the specified full file URI.
public RecordFileUpload ( string url ) : void
url string Specify the full file URL.
return void

RecordSchemaLock() public method

This method is used to record the schema lock status with specified client ID and schema lock ID for the file URL.
public RecordSchemaLock ( string fileUrl, string clientId, string schemaLockId ) : void
fileUrl string Specify the file URL which get the schema lock.
clientId string Specify the client ID of the schema lock.
schemaLockId string Specify the schema ID of the schema lock.
return void

RecordSchemaLock() public method

This method is used to record the schema lock status with specified client ID and schema lock ID for the file URL.
public RecordSchemaLock ( string fileUrl, string clientId, string schemaLockId, string userName, string password, string domain ) : void
fileUrl string Specify the file URL which get the schema lock.
clientId string Specify the client ID of the schema lock.
schemaLockId string Specify the schema ID of the schema lock.
userName string Specify the user name of the user who calls cell storage service.
password string Specify the password of the user who calls cell storage service.
domain string Specify the domain of the user who calls cell storage service.
return void

RollbackStatus() public method

Roll back all the file and document library status to do the environment clean up.
public RollbackStatus ( ) : bool
return bool

StatusManager() public method

Initializes a new instance of the StatusManager class.
public StatusManager ( ITestSite site, Action intializeContext ) : System
site ITestSite Specify the ITestSite instance.
intializeContext Action Specify the initialize context call back function.
return System