C# Класс SiteStatus.SiteStatusRepository

This class is responsible for generating a complete XML status report on a site.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetConfiguration ( ) : Report

Uses the application settings to pull up the configuration file and deserialize.

GetServices ( ) : List

Returns a list of services and their statuses. Pulls up the configuration file and checks the status of the services.

ReadComponents ( ) : List

Reads in all the component files from the components folder. File extensions are of .ver. Using the read/write share option, so the file can be overwritten and not lock up a deploy.

ResolveServiceStatus ( Service service ) : void

Sets the Status of the given service using the service monitor returned from a call to ResolveStatusMonitor.

ResolveStatusMonitor ( Service service ) : IStatusMonitor

Resolves a usable IStatusMonitor to determine for use to determine if the service is up or down. It does this using the supplied factories.

SiteStatusRepository ( string root ) : System

Instantiates a new SiteStatusRepository object with the default factories from SiteStatusHandler, and the given root.

SiteStatusRepository ( string root, BaseStatusMonitorFactory factories ) : System

Instantiates a new SiteStatusRepository object with the given factories, and the given root.

Write ( TextWriter writer ) : void

Writes a complete XML status report to the given writer.

WriteErrors ( TextWriter writer ) : void

This writes the issues that are detected during the retrieval of the site's status.

Приватные методы

Метод Описание
CheckForCtorErrors ( ) : void

Checks for errors with the initial configuration of the SiteStatusRepository's properties.

Описание методов

GetConfiguration() публичный Метод

Uses the application settings to pull up the configuration file and deserialize.
public GetConfiguration ( ) : Report
Результат Report

GetServices() публичный Метод

Returns a list of services and their statuses. Pulls up the configuration file and checks the status of the services.
public GetServices ( ) : List
Результат List

ReadComponents() публичный Метод

Reads in all the component files from the components folder. File extensions are of .ver. Using the read/write share option, so the file can be overwritten and not lock up a deploy.
public ReadComponents ( ) : List
Результат List

ResolveServiceStatus() публичный Метод

Sets the Status of the given service using the service monitor returned from a call to ResolveStatusMonitor.
public ResolveServiceStatus ( Service service ) : void
service Service The service that needs to be queried.
Результат void

ResolveStatusMonitor() публичный Метод

Resolves a usable IStatusMonitor to determine for use to determine if the service is up or down. It does this using the supplied factories.
public ResolveStatusMonitor ( Service service ) : IStatusMonitor
service Service The service that needs to be evaluated.
Результат IStatusMonitor

SiteStatusRepository() публичный Метод

Instantiates a new SiteStatusRepository object with the default factories from SiteStatusHandler, and the given root.
public SiteStatusRepository ( string root ) : System
root string The root of the site.
Результат System

SiteStatusRepository() публичный Метод

Instantiates a new SiteStatusRepository object with the given factories, and the given root.
public SiteStatusRepository ( string root, BaseStatusMonitorFactory factories ) : System
root string The root of the site.
factories SiteStatus.Factories.BaseStatusMonitorFactory The factories used in the ResolveStatusMonitor
Результат System

Write() публичный Метод

Writes a complete XML status report to the given writer.
public Write ( TextWriter writer ) : void
writer System.IO.TextWriter The writer to place the complete status report /// to.
Результат void

WriteErrors() публичный Метод

This writes the issues that are detected during the retrieval of the site's status.
public WriteErrors ( TextWriter writer ) : void
writer System.IO.TextWriter The writer to place the complete issues /// report.
Результат void