C# Class Sarcasm.Utility.ResourceCounter

显示文件 Open project: davidnemeti/Sarcasm

Public Methods

Method Description
Release ( int numberOfResourcesToRelease ) : void
ResourceCounter ( int totalNumberOfResources, int initialAcquiredNumberOfResources ) : System
TryAcquire ( int numberOfResourcesToAcquire ) : bool
TryAcquireOrLess ( int numberOfResourcesToAcquireIdeally, int &numberOfResourcesAcquiredActually ) : bool

Method Details

Release() public method

public Release ( int numberOfResourcesToRelease ) : void
numberOfResourcesToRelease int
return void

ResourceCounter() public method

public ResourceCounter ( int totalNumberOfResources, int initialAcquiredNumberOfResources ) : System
totalNumberOfResources int
initialAcquiredNumberOfResources int
return System

TryAcquire() public method

public TryAcquire ( int numberOfResourcesToAcquire ) : bool
numberOfResourcesToAcquire int
return bool

TryAcquireOrLess() public method

public TryAcquireOrLess ( int numberOfResourcesToAcquireIdeally, int &numberOfResourcesAcquiredActually ) : bool
numberOfResourcesToAcquireIdeally int
numberOfResourcesAcquiredActually int
return bool