C# Class SyncthingCore.ManagedInstance

Datei anzeigen Open project: kreischweide/metrothing Class Usage Examples

Public Properties

Property Type Description
Announcers AnnouncerCollection
ConnectedEndpoint SyncthingCore.Types.RestEndpoint
Errors ErrorCollection
Folders FoldersCollection
Information SyncthingCore.Types.Information
PossibleEndpoints RestEndpointCollection
Statistics SyncthingCore.Types.Statistic
Synchronization SyncthingCore.Types.Synchronization

Public Methods

Method Description
BumpFile ( string folderId, string fileId ) : Task
Disconnect ( ) : void

Disconnects the Syncthing instance, stopping and canceling all threads

IsInState ( State state ) : bool
LoadNeededFiles ( Folder folder ) : Task
ManagedInstance ( ) : System
ManagedInstance ( ManagedInstanceDirective directive ) : System
RescanAllAsync ( ) : Task
RestartAsync ( ) : Task
ToString ( ) : string
Unwatch ( ) : void

Stops the instance monitoring

UpgradeAsync ( ) : Task
Watch ( ) : void

Initiates the instance monitoring

Protected Methods

Method Description
OnMonitored ( InstanceEventArgs e ) : void
OnUnmonitored ( InstanceEventArgs e ) : void

Private Methods

Method Description
Clear ( ) : void

Removes any trace of volatile information that could taint the behaivour in an disconnected state.

ConfigureStateMachine ( ) : void
ConfigureThreads ( ) : void
Initialize ( ManagedInstanceDirective directive = null ) : void
OnConnected ( ConnectedEventArgs e ) : void
OnConnectedState ( ) : void
OnConnectedStateExit ( ) : void
OnConnecting ( InstanceEventArgs e ) : void
OnConnectingState ( ) : void
OnConnectionChecked ( HeartbeatWorkerEventArgs e ) : void
OnDisconnected ( InstanceEventArgs e ) : void
OnDisconnectedState ( ) : void
OnDisconnecting ( InstanceEventArgs e ) : void
OnEndpointConnectStatusReceived ( object sender, ConnectionWorkerEventArgs e ) : void
OnHeartbeatReceived ( object sender, HeartbeatWorkerEventArgs e ) : void
OnMonitoredState ( ) : void
OnStateMachineTransitioned ( Trigger>.StateMachine obj ) : void
OnUnmonitoredState ( ) : void

Method Details

BumpFile() public method

public BumpFile ( string folderId, string fileId ) : Task
folderId string
fileId string
return Task

Disconnect() public method

Disconnects the Syncthing instance, stopping and canceling all threads
public Disconnect ( ) : void
return void

IsInState() public method

public IsInState ( State state ) : bool
state State
return bool

LoadNeededFiles() public method

public LoadNeededFiles ( Folder folder ) : Task
folder SyncthingCore.Types.Folder
return Task

ManagedInstance() public method

public ManagedInstance ( ) : System
return System

ManagedInstance() public method

public ManagedInstance ( ManagedInstanceDirective directive ) : System
directive ManagedInstanceDirective
return System

OnMonitored() protected method

protected OnMonitored ( InstanceEventArgs e ) : void
e InstanceEventArgs
return void

OnUnmonitored() protected method

protected OnUnmonitored ( InstanceEventArgs e ) : void
e InstanceEventArgs
return void

RescanAllAsync() public method

public RescanAllAsync ( ) : Task
return Task

RestartAsync() public method

public RestartAsync ( ) : Task
return Task

ToString() public method

public ToString ( ) : string
return string

Unwatch() public method

Stops the instance monitoring
public Unwatch ( ) : void
return void

UpgradeAsync() public method

public UpgradeAsync ( ) : Task
return Task

Watch() public method

Initiates the instance monitoring
public Watch ( ) : void
return void

Property Details

Announcers public_oe property

Contains all announcers known to the Syncthing instance
public AnnouncerCollection Announcers
return AnnouncerCollection

ConnectedEndpoint public_oe property

The currently connected endpoint, if the managed instance is in the Connected state, otherwise null
public RestEndpoint,SyncthingCore.Types ConnectedEndpoint
return SyncthingCore.Types.RestEndpoint

Errors public_oe property

Contains and manages all available error messages on the Syncthing instance
public ErrorCollection Errors
return ErrorCollection

Folders public_oe property

Contains all folders known to this instance
public FoldersCollection Folders
return FoldersCollection

Information public_oe property

Contains basic information about the Syncthing instance
public Information,SyncthingCore.Types Information
return SyncthingCore.Types.Information

PossibleEndpoints public_oe property

A collection of REST endpoints to try.
This comes in handy if your client switches the network often (like a laptop) where the instance might be available through a LAN based hostname (office) or through an external port-forwarding (on the go).
public RestEndpointCollection PossibleEndpoints
return RestEndpointCollection

Statistics public_oe property

Contains all available statistics given by the Syncthing instance
public Statistic,SyncthingCore.Types Statistics
return SyncthingCore.Types.Statistic

Synchronization public_oe property

Conaints all information about the overall synchronization effort
public Synchronization,SyncthingCore.Types Synchronization
return SyncthingCore.Types.Synchronization