50 references to Format
System.Diagnostics.PerformanceCounter (50)
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.PERF_INFO.cs (1)
192throw new InvalidOperationException(SR.Format(SR.InvalidPerfData, type.Name));
System\Diagnostics\CounterSampleCalculator.cs (1)
101throw new Win32Exception(result, SR.Format(SR.PerfCounterPdhError, result.ToString("x", CultureInfo.InvariantCulture)));
System\Diagnostics\PerformanceCounter.cs (5)
483throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, currentCategoryName)); 488throw new InvalidOperationException(SR.Format(SR.SingleInstanceOnly, currentCategoryName)); 509throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, currentCategoryName)); 514throw new InvalidOperationException(SR.Format(SR.SingleInstanceOnly, currentCategoryName)); 552throw new InvalidOperationException(SR.Format(SR.InstanceNameProhibited, _instanceName));
System\Diagnostics\PerformanceCounterCategory.cs (2)
224throw new InvalidOperationException(SR.Format(SR.PerformanceCategoryExists, categoryName)); 348throw new ArgumentException(SR.Format(SR.DuplicateCounterName, counterData[i].CounterName));
System\Diagnostics\PerformanceCounterLib.cs (14)
384throw new InvalidOperationException(SR.Format(SR.MissingCategory, category)); 796throw new InvalidOperationException(SR.Format(SR.MissingCategory, category)); 827throw new InvalidOperationException(SR.Format(SR.MissingCategory, category)); 840throw new InvalidOperationException(SR.Format(SR.CantReadCategory, category)); 866throw new InvalidOperationException(SR.Format(SR.MissingCategory, category)); 931throw new InvalidOperationException(SR.Format(SR.MissingCategory, category)); 959throw new InvalidOperationException(SR.Format(SR.MissingCounter, counter)); 1095throw new InvalidOperationException(SR.Format(SR.CategoryHelpCorrupt, names[index * 2])); 1100throw new InvalidOperationException(SR.Format(SR.CounterNameCorrupt, names[index * 2])); 1224throw new UnauthorizedAccessException(SR.Format(SR.CantChangeCategoryRegistration, arg0)); 1340throw new InvalidOperationException(SR.Format(SR.CounterDataCorrupt, perfDataKey.ToString()), e); 1428throw new InvalidOperationException(SR.Format(SR.CantReadCategoryIndex, categoryIndex.ToString())); 1637throw new InvalidOperationException(SR.Format(SR.CantReadCounter, counter)); 1737throw new InvalidOperationException(SR.Format(SR.CantReadInstance, instanceName));
System\Diagnostics\PerformanceData\CounterSet.cs (14)
38throw new ArgumentException(SR.Format(SR.Perflib_Argument_InvalidCounterSetInstanceType, instanceType), nameof(instanceType)); 95throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _providerGuid)); 99throw new ArgumentException(SR.Format(SR.Perflib_Argument_InvalidCounterType, counterType), nameof(counterType)); 103throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_AddCounterAfterInstance, _counterSet)); 110throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_AddCounterAfterInstance, _counterSet)); 137throw new ArgumentException(SR.Format(SR.Perflib_Argument_InvalidCounterType, counterType), nameof(counterType)); 141throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _providerGuid)); 145throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_AddCounterAfterInstance, _counterSet)); 152throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_AddCounterAfterInstance, _counterSet)); 183throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _providerGuid)); 193throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _providerGuid)); 197throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _providerGuid)); 201throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_CounterSetContainsNoCounter, _counterSet)); 255(uint)Interop.Errors.ERROR_ALREADY_EXISTS => new InvalidOperationException(SR.Format(SR.Perflib_Argument_CounterSetAlreadyRegister, _counterSet)),
System\Diagnostics\PerformanceData\CounterSetInstance.cs (2)
55throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_CounterSetNotInstalled, _counterSet._counterSet)); 60throw new ArgumentException(SR.Format(SR.Perflib_Argument_InvalidInstance, _counterSet._counterSet), nameof(instanceName));
System\Diagnostics\PerformanceData\CounterSetInstanceCounterDataSet.cs (2)
118throw new ArgumentException(SR.Format(SR.Perflib_Argument_ProviderNotFound, _instance._counterSet._providerGuid), "ProviderGuid"); 122throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _instance._counterSet._providerGuid));
System\Diagnostics\PerformanceData\PerfProviderCollection.cs (1)
100throw new ArgumentException(SR.Format(SR.Perflib_Argument_CounterSetAlreadyRegister, counterSetGuid), nameof(counterSetGuid));
System\Diagnostics\PerformanceDataRegistryKey.cs (3)
38throw new ArgumentException(SR.Format(SR.Arg_DllInitFailure, machineName)); 47throw new ArgumentException(SR.Format(SR.Arg_RegKeyNoRemoteConnect, machineName)); 126throw new UnauthorizedAccessException(SR.Format(SR.UnauthorizedAccess_RegistryKeyGeneric_Key, name));
System\Diagnostics\SharedPerformanceCounter.cs (5)
965throw new InvalidOperationException(SR.Format(SR.SingleInstanceOnly, _categoryName)); 970throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, _categoryName)); 976throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, _categoryName)); 1040throw new InvalidOperationException(SR.Format(SR.InstanceAlreadyExists, instanceName)); 1046throw new InvalidOperationException(SR.Format(SR.InstanceAlreadyExists, instanceName));