2 writes to _instanceName
System.Diagnostics.PerformanceCounter (2)
System\Diagnostics\PerformanceCounter.cs (2)
63
_instanceName
= string.Empty;
254
_instanceName
= value;
16 references to _instanceName
System.Diagnostics.PerformanceCounter (16)
System\Diagnostics\PerformanceCounter.cs (16)
243
return
_instanceName
;
247
if (value == null &&
_instanceName
== null)
250
if ((value == null &&
_instanceName
!= null) ||
251
(value != null &&
_instanceName
== null) ||
252
!string.Equals(
_instanceName
, value, StringComparison.OrdinalIgnoreCase))
482
if (string.IsNullOrEmpty(
_instanceName
))
487
if (!string.IsNullOrEmpty(
_instanceName
))
508
if (string.IsNullOrEmpty(
_instanceName
))
513
if (!string.IsNullOrEmpty(
_instanceName
))
517
if (string.IsNullOrEmpty(
_instanceName
) && InstanceLifetime == PerformanceCounterInstanceLifetime.Process)
520
_sharedCounter = new SharedPerformanceCounter(currentCategoryName.ToLowerInvariant(), _counterName.ToLowerInvariant(),
_instanceName
.ToLowerInvariant(), _instanceLifetime);
551
if (!string.IsNullOrEmpty(
_instanceName
))
552
throw new InvalidOperationException(SR.Format(SR.InstanceNameProhibited,
_instanceName
));
558
if (string.IsNullOrEmpty(
_instanceName
))
561
return counterSample.GetInstanceValue(
_instanceName
);
591
_sharedCounter.RemoveInstance(
_instanceName
.ToLowerInvariant(), _instanceLifetime);