C# Class TopologicalSorting.Resource

A class of resource which may be used by a single concurrent process
Show file Open project: martindevans/TopologicalSorting Class Usage Examples

Public Properties

Property Type Description
Graph DependencyGraph
Name string

Public Methods

Method Description
Resource ( DependencyGraph graph, string name ) : System.Collections.Generic

Initializes a new instance of the Resource class.

ToString ( ) : string

Returns a System.String that represents this instance.

UsedBy ( ) : void

Indicates that this resource is used by the given processes

UsedBy ( IEnumerable processes ) : void

Indicates that this resource is used by the given processes

UsedBy ( OrderedProcess process ) : void

Indicates that this resource is used by the given process

Method Details

Resource() public method

Initializes a new instance of the Resource class.
public Resource ( DependencyGraph graph, string name ) : System.Collections.Generic
graph DependencyGraph The graph which this ResourceClass is part of
name string The name of this resource
return System.Collections.Generic

ToString() public method

Returns a System.String that represents this instance.
public ToString ( ) : string
return string

UsedBy() public method

Indicates that this resource is used by the given processes
public UsedBy ( ) : void
return void

UsedBy() public method

Indicates that this resource is used by the given processes
public UsedBy ( IEnumerable processes ) : void
processes IEnumerable The processes.
return void

UsedBy() public method

Indicates that this resource is used by the given process
public UsedBy ( OrderedProcess process ) : void
process OrderedProcess The process.
return void

Property Details

Graph public property

The graph this class is part of
public DependencyGraph,TopologicalSorting Graph
return DependencyGraph

Name public property

The name of this resource
public string Name
return string