public void TestMethod1() { //"\\\\bosxixihome\\network interface(microsoft hyper-v network adapter _3)\\bytes received/sec" var path = "\\\\bosxixihome\\network interface(microsoft hyper-v network adapter _3)\\bytes received/sec"; var name = CounterName.GetNetworkInterfaceName(path); Assert.IsTrue(name == "(microsoft hyper-v network adapter _3)"); }
public static CounterName Read(BinaryReader reader) { CounterName result = new CounterName(); result.CounterId = Utilities.Read7BitEncodedInt(reader); result.Name = reader.ReadString(); return(result); }
public override int GetHashCode() { int result = DeploymentId != null?DeploymentId.GetHashCode() : 0; result = 31 * result + (Role != null ? Role.GetHashCode() : 0); result = 31 * result + (RoleInstance != null ? RoleInstance.GetHashCode() : 0); result = 31 * result + (CounterName != null ? CounterName.GetHashCode() : 0); result = 31 * result + (int)(_eventTickCount ^ (_eventTickCount >> 32)); return(result); }
public override int GetHashCode() { unchecked { var hashCode = CounterName.GetHashCode(); hashCode = (hashCode * 397) ^ (int)AssertionType; hashCode = (hashCode * 397) ^ Assertion.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = CategoryName?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (CounterName?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (InstanceName?.GetHashCode() ?? 0); return(hashCode); } }
private int ComputeHashCode() { unchecked { int result = (Source != null ? Source.GetHashCode() : 0); result = (result * 397) + (Instance != null ? Instance.GetHashCode() : 0); result = (result * 397) + (ExtendedData != null ? ExtendedData.GetHashCode() : 0); result = (result * 397) + (CounterName != null ? CounterName.GetHashCode() : 0); return(result); } }
private static string ToString(CounterName n) { switch (n) { case CounterName.ProcessID: return("ID Process"); case CounterName.IOWriteByesPerSecond: return("IO Write Bytes/sec"); case CounterName.IOReadBytesPerSecond: return("IO Read Bytes/sec"); } return(""); }
void ReleaseDesignerOutlets() { if (CounterCount != null) { CounterCount.Dispose(); CounterCount = null; } if (CounterName != null) { CounterName.Dispose(); CounterName = null; } if (IncrementButton != null) { IncrementButton.Dispose(); IncrementButton = null; } }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || (o as PerformanceData) == null) { return(false); } var that = (PerformanceData)o; if (_eventTickCount != that._eventTickCount) { return(false); } if (CounterName != null ? !CounterName.Equals(that.CounterName) : that.CounterName != null) { return(false); } if (DeploymentId != null ? !DeploymentId.Equals(that.DeploymentId) : that.DeploymentId != null) { return(false); } if (Role != null ? !Role.Equals(that.Role) : that.Role != null) { return(false); } if (RoleInstance != null ? !RoleInstance.Equals(that.RoleInstance) : that.RoleInstance != null) { return(false); } return(true); }
public override int GetHashCode() { unchecked { return(((CounterCategory != null ? CounterCategory.GetHashCode() : 0) * 397) ^ (CounterName != null ? CounterName.GetHashCode() : 0)); } }
public override int GetHashCode() { return(CategoryName.GetHashCode() ^ CounterName.GetHashCode()); }
public AddCounter(CounterName counterName) { CounterName = counterName; }
internal void Increment(CounterName name) { int idx = (int)name; Interlocked.Increment(ref _counterValues[idx]); }
internal void Decrement(CounterName name) { }
internal void IncrementBy(CounterName name, long value) { }
internal void IncrementBy(CounterName name, long value) { int idx = (int)name; Interlocked.Add(ref _counterValues[idx], value); }
public TakeNextCustomer( CounterName counterName) { CounterName = counterName; }
public RevokeCustomer( CounterName counterName) { CounterName = counterName; }
public static PerformanceCounter GetCounter(CategoryName category, CounterName counter, string name) { return(GetCounter(ToString(category), ToString(counter), name)); }
public static CounterName Read(BinaryReader reader) { CounterName result = new CounterName(); result.CounterId = Utilities.Read7BitEncodedInt(reader); result.Name = reader.ReadString(); return result; }
internal void Increment(CounterName name) { }