Photon Server API
Public Member Functions | Static Public Member Functions | Properties | List of all members
ExitGames.Diagnostics.Counter.WindowsPerformanceCounter Class Reference

An ICounter that wraps a windows PerformanceCounter. More...

Inheritance diagram for ExitGames.Diagnostics.Counter.WindowsPerformanceCounter:
ExitGames.Diagnostics.Counter.ICounter

Public Member Functions

 WindowsPerformanceCounter (PerformanceCounter counter)
 Initializes a new instance of the WindowsPerformanceCounter class. More...
 
 WindowsPerformanceCounter (string name, PerformanceCounter counter)
 Initializes a new instance of the WindowsPerformanceCounter class. More...
 
long Decrement ()
 Decrements the counter. More...
 
float GetNextValue ()
 Gets the next value. More...
 
long Increment ()
 Increments the counter. More...
 
long IncrementBy (long value)
 Increments the counter by a value. More...
 

Static Public Member Functions

static WindowsPerformanceCounter CreateCounter (string name, string categoryName, string counterName)
 Create a new instance of WindowsPerformanceCounter. More...
 
static WindowsPerformanceCounter CreateCounter (string name, string categoryName, string counterName, string instanceName)
 Create a new instance of WindowsPerformanceCounter. More...
 

Properties

CounterType CounterType [get]
 Gets the type of the counter. More...
 
string Name [get]
 Gets the counter name. More...
 
long Value [get, set]
 Gets or sets the PerformanceCounter.RawValue. More...
 
- Properties inherited from ExitGames.Diagnostics.Counter.ICounter
CounterType CounterType [get]
 Gets the type of the counter. More...
 
string Name [get]
 Gets the name of the counter. More...
 

Detailed Description

An ICounter that wraps a windows PerformanceCounter.

Constructor & Destructor Documentation

ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.WindowsPerformanceCounter ( PerformanceCounter  counter)
inline

Initializes a new instance of the WindowsPerformanceCounter class.

Parameters
counterThe counter.
ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.WindowsPerformanceCounter ( string  name,
PerformanceCounter  counter 
)
inline

Initializes a new instance of the WindowsPerformanceCounter class.

Parameters
nameThe name.
counterThe counter.

Member Function Documentation

static WindowsPerformanceCounter ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.CreateCounter ( string  name,
string  categoryName,
string  counterName 
)
inlinestatic

Create a new instance of WindowsPerformanceCounter.

Parameters
nameThe counter.
categoryNameThe windows performance counter category name.
counterNameThe windows performance counter name.
Returns
A new instance of WindowsPerformanceCounter.
static WindowsPerformanceCounter ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.CreateCounter ( string  name,
string  categoryName,
string  counterName,
string  instanceName 
)
inlinestatic

Create a new instance of WindowsPerformanceCounter.

Parameters
nameThe counter.
categoryNameThe windows performance counter category name.
counterNameThe windows performance counter name.
instanceNameThe windows performance counter instance Name.
Returns
A new instance of WindowsPerformanceCounter.
long ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.Decrement ( )
inline

Decrements the counter.

Returns
The new value.

Implements ExitGames.Diagnostics.Counter.ICounter.

float ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.GetNextValue ( )
inline

Gets the next value.

Returns
The next value.

Implements ExitGames.Diagnostics.Counter.ICounter.

long ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.Increment ( )
inline

Increments the counter.

Returns
The new value.

Implements ExitGames.Diagnostics.Counter.ICounter.

long ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.IncrementBy ( long  value)
inline

Increments the counter by a value.

Parameters
valueThe value.
Returns
The new value.

Implements ExitGames.Diagnostics.Counter.ICounter.

Property Documentation

CounterType ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.CounterType
get

Gets the type of the counter.

The type of the counter.

string ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.Name
get

Gets the counter name.

long ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.Value
getset

Gets or sets the PerformanceCounter.RawValue.