1
0
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:
kayone
2013-11-21 21:26:57 -08:00
parent 891443e05d
commit 0e623e7ce4
236 changed files with 20490 additions and 35 deletions

View File

@@ -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();
}
}
}