196 references to SR
System.Diagnostics.PerformanceCounter (196)
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.PERF_INFO.cs (2)
192throw new InvalidOperationException(SR.Format(SR.InvalidPerfData, type.Name));
src\runtime\src\libraries\Common\src\System\Diagnostics\NetFrameworkUtils.cs (2)
134throw new InvalidOperationException(SR.Format(SR.RegKeyMissingShort, "HKEY_LOCAL_MACHINE", machineName));
System\Diagnostics\CounterCreationDataCollection.cs (1)
93throw new ArgumentException(SR.MustAddCounterCreationData);
System\Diagnostics\CounterSampleCalculator.cs (3)
79throw new InvalidOperationException(SR.MismatchedCounterTypes); 101throw new Win32Exception(result, SR.Format(SR.PerfCounterPdhError, result.ToString("x", CultureInfo.InvariantCulture)));
System\Diagnostics\PerformanceCounter.cs (25)
230throw new InvalidOperationException(SR.CantSetLifetimeAfterInitialized); 296throw new ArgumentException(SR.Format(SR.InvalidProperty, nameof(MachineName), value), nameof(value)); 434throw new InvalidOperationException(SR.ReadOnlyCounter); 441throw new NotSupportedException(SR.PCNotSupportedUnderAppContainer); 470throw new InvalidOperationException(SR.CategoryNameMissing); 472throw new InvalidOperationException(SR.CounterNameMissing); 477throw new InvalidOperationException(SR.Format(SR.CounterExists, currentCategoryName, _counterName)); 483throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, currentCategoryName)); 488throw new InvalidOperationException(SR.Format(SR.SingleInstanceOnly, currentCategoryName)); 492throw new InvalidOperationException(SR.InstanceLifetimeProcessonReadOnly); 499throw new InvalidOperationException(SR.RemoteWriting); 502throw new InvalidOperationException(SR.NotCustomCounter); 509throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, currentCategoryName)); 514throw new InvalidOperationException(SR.Format(SR.SingleInstanceOnly, currentCategoryName)); 518throw new InvalidOperationException(SR.InstanceLifetimeProcessforSingleInstance); 552throw new InvalidOperationException(SR.Format(SR.InstanceNameProhibited, _instanceName)); 559throw new InvalidOperationException(SR.InstanceNameRequired); 588throw new InvalidOperationException(SR.ReadOnlyRemoveInstance);
System\Diagnostics\PerformanceCounterCategory.cs (48)
49throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(categoryName), categoryName), nameof(categoryName)); 52throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(machineName), machineName), nameof(machineName)); 74throw new ArgumentException(SR.Format(SR.InvalidProperty, nameof(CategoryName), value), nameof(value)); 88throw new InvalidOperationException(SR.CategoryNameNotSet); 132throw new ArgumentException(SR.Format(SR.InvalidProperty, nameof(MachineName), value), nameof(value)); 146throw new InvalidOperationException(SR.CategoryNameNotSet); 168throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(categoryName), categoryName), nameof(categoryName)); 171throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(machineName), machineName), nameof(machineName)); 224throw new InvalidOperationException(SR.Format(SR.PerformanceCategoryExists, categoryName)); 246throw new ArgumentException(SR.Format(SR.PerfInvalidCategoryName, 1, MaxCategoryNameLength)); 251throw new ArgumentException(SR.CategoryNameTooLong); 259throw new ArgumentException(SR.Format(SR.PerfInvalidCounterName, 1, MaxCounterNameLength)); 290throw new ArgumentException(SR.Format(SR.PerfInvalidHelp, 0, MaxHelpLength)); 301throw new ArgumentException(SR.InvalidCounterName); 315throw new InvalidOperationException(SR.CounterLayout); 322throw new InvalidOperationException(SR.CounterLayout); 328throw new InvalidOperationException(SR.CounterLayout); 342throw new InvalidOperationException(SR.CounterLayout); 348throw new ArgumentException(SR.Format(SR.DuplicateCounterName, counterData[i].CounterName)); 378throw new InvalidOperationException(SR.CantDeleteCategory); 411throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(categoryName), categoryName), nameof(categoryName)); 414throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(machineName), machineName), nameof(machineName)); 448throw new ArgumentException(SR.InstanceNameRequired); 460throw new InvalidOperationException(SR.CategoryNameNotSet); 463throw new InvalidOperationException(SR.Format(SR.MissingInstance, instanceName, _categoryName)); 488throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(machineName), machineName), nameof(machineName)); 504throw new InvalidOperationException(SR.CategoryNameNotSet); 517throw new InvalidOperationException(SR.CategoryNameNotSet); 542throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(categoryName), categoryName), nameof(categoryName)); 545throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(machineName), machineName), nameof(machineName)); 558throw new InvalidOperationException(SR.CategoryNameNotSet);
System\Diagnostics\PerformanceCounterLib.cs (31)
384throw new InvalidOperationException(SR.Format(SR.MissingCategory, category)); 468iniWriter.WriteLine(SR.HelpNotAvailable); 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())); 1630throw new InvalidOperationException(SR.CounterLayout); 1637throw new InvalidOperationException(SR.Format(SR.CantReadCounter, counter)); 1680throw new ObjectDisposedException(SR.ObjectDisposed_CategorySampleClosed, nameof(CategorySample)); 1737throw new InvalidOperationException(SR.Format(SR.CantReadInstance, instanceName));
System\Diagnostics\PerformanceData\CounterSet.cs (36)
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)); 114throw new ArgumentException(SR.Format(SR.Perflib_Argument_CounterAlreadyExists, counterId, _counterSet), nameof(counterId)); 133throw new ArgumentException(SR.Perflib_Argument_EmptyCounterName, nameof(counterName)); 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)); 156throw new ArgumentException(SR.Format(SR.Perflib_Argument_CounterNameAlreadyExists, counterName, _counterSet), nameof(counterName)); 160throw new ArgumentException(SR.Format(SR.Perflib_Argument_CounterAlreadyExists, counterId, _counterSet), nameof(counterId)); 179throw new ArgumentException(SR.Perflib_Argument_EmptyInstanceName, nameof(instanceName)); 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 (7)
27throw new ArgumentException(SR.Perflib_Argument_EmptyInstanceName, nameof(instanceName)); 52throw new ArgumentException(SR.Format(SR.Perflib_Argument_InstanceAlreadyExists, _instName, _counterSet._counterSet), nameof(instanceName)); 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 (8)
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)); 128throw new InsufficientMemoryException(SR.Format(SR.Perflib_InsufficientMemory_InstanceCounterBlock, _instance._counterSet._counterSet, _instance._instName)); 153(uint)Interop.Errors.ERROR_NOT_FOUND => new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_CounterRefValue, _instance._counterSet._counterSet, CounterDef.Key, _instance._instName)),
System\Diagnostics\PerformanceData\PerfProviderCollection.cs (2)
100throw new ArgumentException(SR.Format(SR.Perflib_Argument_CounterSetAlreadyRegister, counterSetGuid), nameof(counterSetGuid));
System\Diagnostics\PerformanceDataRegistryKey.cs (6)
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 (25)
99throw new InvalidOperationException(SR.InstanceNameTooLong); 104throw new InvalidOperationException(SR.ProcessLifetimeNotValidInGlobal); 177throw new InvalidOperationException(SR.CountersOOM); 591throw new InvalidOperationException(SR.MappingCorrupted); 605throw new InvalidOperationException(SR.MappingCorrupted); 613throw new InvalidOperationException(SR.MappingCorrupted); 965throw new InvalidOperationException(SR.Format(SR.SingleInstanceOnly, _categoryName)); 970throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, _categoryName)); 976throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, _categoryName)); 1036throw new InvalidOperationException(SR.CantConvertProcessToGlobal); 1040throw new InvalidOperationException(SR.Format(SR.InstanceAlreadyExists, instanceName)); 1046throw new InvalidOperationException(SR.Format(SR.InstanceAlreadyExists, instanceName)); 1052throw new InvalidOperationException(SR.CantConvertGlobalToProcess); 1625throw new InvalidOperationException(SR.MappingCorrupted); 1639throw new InvalidOperationException(SR.MappingCorrupted); 1662throw new InvalidOperationException(SR.SharedMemoryGhosted); 1690throw new InvalidOperationException(SR.SetSecurityDescriptorFailed); 1748throw new InvalidOperationException(SR.CantCreateFileMapping); 1753throw new InvalidOperationException(SR.CantMapFileView); 1758throw new InvalidOperationException(SR.CantGetMappingSize);