mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
imported signalr 1.1.3 into NzbDrone.
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Microsoft.AspNet.SignalR.Infrastructure
|
||||
{
|
||||
internal class PerformanceCounterWrapper : IPerformanceCounter
|
||||
{
|
||||
private readonly PerformanceCounter _counter;
|
||||
|
||||
public PerformanceCounterWrapper(PerformanceCounter counter)
|
||||
{
|
||||
_counter = counter;
|
||||
}
|
||||
|
||||
public string CounterName
|
||||
{
|
||||
get
|
||||
{
|
||||
return _counter.CounterName;
|
||||
}
|
||||
}
|
||||
|
||||
public long RawValue
|
||||
{
|
||||
get { return _counter.RawValue; }
|
||||
set { _counter.RawValue = value; }
|
||||
}
|
||||
|
||||
public long Decrement()
|
||||
{
|
||||
return _counter.Decrement();
|
||||
}
|
||||
|
||||
public long Increment()
|
||||
{
|
||||
return _counter.Increment();
|
||||
}
|
||||
|
||||
public long IncrementBy(long value)
|
||||
{
|
||||
return _counter.IncrementBy(value);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
_counter.Close();
|
||||
}
|
||||
|
||||
public void RemoveInstance()
|
||||
{
|
||||
try
|
||||
{
|
||||
_counter.RemoveInstance();
|
||||
}
|
||||
catch(NotImplementedException)
|
||||
{
|
||||
// This happens on mono
|
||||
}
|
||||
}
|
||||
|
||||
public CounterSample NextSample()
|
||||
{
|
||||
return _counter.NextSample();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user