C# Class MonkeyWrench.Database.DBRevisionWork_Extensions

Afficher le fichier Open project: rolfbjarne/monkeywrench Class Usage Examples

Méthodes publiques

Méthode Description
CalculateState ( DB db, int id, bool &completed ) : DBState

Calculates the state. Always hits the db.

CalculateState ( this rw, DB db ) : DBState

Calculates the state. Always hits the db.

Create ( DB db, int id ) : DBRevisionWork
EnsureState ( DB db, int id, DBState current ) : DBState

Calculates a new state if the current state is NotDone.

EnsureState ( this rw, DB db ) : DBState

Calculates a new state if the current state is NotDone

Find ( DB db, DBLane lane, MonkeyWrench.DataClasses.DBHost host, DBRevision revision ) : DBRevisionWork
GetCount ( DB db, int lane_id, int host_id ) : int
GetFiles ( this rw, DB db ) : List

Returns a list of all the files this revisionwork has produced

GetNextWork ( this rw, DB db, DBLane lane, MonkeyWrench.DataClasses.DBHost host, DBRevision revision, bool multiple_work ) : List

Finds pending steps for the current revision

SetWorkHost ( this rw, DB db, MonkeyWrench.DataClasses.DBHost host ) : bool

Sets workhost to the specified host and saves it to the db.

UpdateState ( this rw, DB db ) : void

Private Methods

Méthode Description
FilterPendingWork ( this rw, DB db, List steps, List result, bool multiple_work ) : void

Puts pending steps in result

ForAll ( List states, List nonfatal, IsMatch pred ) : bool
ForAny ( List states, List nonfatal, IsMatch pred ) : bool
SaveState ( DB db, int id, DBState state, bool completed ) : void

Method Details

CalculateState() public static méthode

Calculates the state. Always hits the db.
public static CalculateState ( DB db, int id, bool &completed ) : DBState
db DB
id int
completed bool
Résultat DBState

CalculateState() public static méthode

Calculates the state. Always hits the db.
public static CalculateState ( this rw, DB db ) : DBState
rw this
db DB
Résultat DBState

Create() public static méthode

public static Create ( DB db, int id ) : DBRevisionWork
db DB
id int
Résultat MonkeyWrench.DataClasses.DBRevisionWork

EnsureState() public static méthode

Calculates a new state if the current state is NotDone.
public static EnsureState ( DB db, int id, DBState current ) : DBState
db DB
id int
current DBState
Résultat DBState

EnsureState() public static méthode

Calculates a new state if the current state is NotDone
public static EnsureState ( this rw, DB db ) : DBState
rw this
db DB
Résultat DBState

Find() public static méthode

public static Find ( DB db, DBLane lane, MonkeyWrench.DataClasses.DBHost host, DBRevision revision ) : DBRevisionWork
db DB
lane MonkeyWrench.DataClasses.DBLane
host MonkeyWrench.DataClasses.DBHost
revision MonkeyWrench.DataClasses.DBRevision
Résultat MonkeyWrench.DataClasses.DBRevisionWork

GetCount() public static méthode

public static GetCount ( DB db, int lane_id, int host_id ) : int
db DB
lane_id int
host_id int
Résultat int

GetFiles() public static méthode

Returns a list of all the files this revisionwork has produced
public static GetFiles ( this rw, DB db ) : List
rw this
db DB
Résultat List

GetNextWork() public static méthode

Finds pending steps for the current revision
public static GetNextWork ( this rw, DB db, DBLane lane, MonkeyWrench.DataClasses.DBHost host, DBRevision revision, bool multiple_work ) : List
rw this
db DB
lane MonkeyWrench.DataClasses.DBLane
host MonkeyWrench.DataClasses.DBHost
revision MonkeyWrench.DataClasses.DBRevision
multiple_work bool
Résultat List

SetWorkHost() public static méthode

Sets workhost to the specified host and saves it to the db.
public static SetWorkHost ( this rw, DB db, MonkeyWrench.DataClasses.DBHost host ) : bool
rw this
db DB
host MonkeyWrench.DataClasses.DBHost
Résultat bool

UpdateState() public static méthode

public static UpdateState ( this rw, DB db ) : void
rw this
db DB
Résultat void