276 references to SR
System.ComponentModel.TypeConverter (276)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (4)
67_ => throw new ArgumentException(SR.Format(SR.InvalidColor, text)), 112throw new ArgumentException(SR.Format(SR.ConvertInvalidPrimitive, text.ToString(), nameof(Int32)), e);
System\ComponentModel\AmbientValueAttribute.cs (1)
147throw new ArgumentException(SR.RuntimeInstanceNotAllowed);
System\ComponentModel\ArrayConverter.cs (3)
22return SR.Format(SR.UsingResourceKeys() ? "{0} Array" : SR.Array, value.GetType().Name);
System\ComponentModel\BaseNumberConverter.cs (2)
80throw new ArgumentException(SR.Format(SR.ConvertInvalidPrimitive, text, TargetType.Name), nameof(value), e);
System\ComponentModel\BooleanConverter.cs (2)
39throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(Boolean)), e);
System\ComponentModel\CharConverter.cs (2)
55throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, text, nameof(Char)));
System\ComponentModel\CollectionConverter.cs (2)
23return SR.UsingResourceKeys() ? "(Collection)" : SR.Collection;
System\ComponentModel\Container.cs (2)
235throw new ArgumentException(SR.Format(SR.DuplicateComponentName, name));
System\ComponentModel\CultureInfoConverter.cs (4)
25private static string DefaultCultureString => SR.UsingResourceKeys() ? "(Default)" : SR.CultureInfoConverterDefaultCultureString; 127throw new ArgumentException(SR.Format(SR.CultureInfoConverterInvalidCulture, (string)value), nameof(value));
System\ComponentModel\DateOnlyConverter.cs (2)
66throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(DateOnly)), e);
System\ComponentModel\DateTimeConverter.cs (2)
70throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(DateTime)), e);
System\ComponentModel\DateTimeOffsetConverter.cs (2)
70throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(DateTimeOffset)), e);
System\ComponentModel\Design\CheckoutException.cs (1)
24public static readonly CheckoutException Canceled = new CheckoutException(SR.CHECKOUTCanceled, E_ABORT);
System\ComponentModel\Design\DesignerOptionService.cs (4)
42throw new ArgumentException(SR.Format(SR.InvalidArgumentValue, "name.Length"), nameof(name)); 464return SR.UsingResourceKeys() ? "(Collection)" : SR.CollectionConverterText;
System\ComponentModel\Design\DesigntimeLicenseContextSerializer.cs (1)
158throw new NotSupportedException(SR.BinaryFormatterMessage);
System\ComponentModel\Design\PropertyTabAttribute.cs (8)
58throw new ArgumentException(SR.PropertyTabAttributeBadPropertyTabScope, nameof(tabScope)); 75throw new ArgumentException(SR.PropertyTabAttributeBadPropertyTabScope, nameof(tabScope)); 134throw new TypeLoadException(SR.Format(SR.PropertyTabAttributeTypeLoadException, className)); 198throw new ArgumentException(SR.PropertyTabAttributeArrayLengthMismatch); 206throw new ArgumentException(SR.PropertyTabAttributeArrayLengthMismatch); 213throw new ArgumentException(SR.PropertyTabAttributeParamsBothNull); 222throw new ArgumentException(SR.PropertyTabAttributeBadPropertyTabScope);
System\ComponentModel\Design\Serialization\InstanceDescriptor.cs (8)
46throw new ArgumentException(SR.InstanceDescriptorMustBeStatic); 50throw new ArgumentException(SR.InstanceDescriptorLengthMismatch); 57throw new ArgumentException(SR.InstanceDescriptorCannotBeStatic); 61throw new ArgumentException(SR.InstanceDescriptorLengthMismatch); 68throw new ArgumentException(SR.InstanceDescriptorMustBeStatic); 72throw new ArgumentException(SR.InstanceDescriptorLengthMismatch); 79throw new ArgumentException(SR.InstanceDescriptorMustBeReadable); 84throw new ArgumentException(SR.InstanceDescriptorMustBeStatic);
System\ComponentModel\Design\Serialization\MemberRelationshipService.cs (6)
46throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "source.Owner"), nameof(source)); 59throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "source.Owner"), nameof(source)); 125throw new ArgumentException(SR.Format(SR.MemberRelationshipService_RelationshipNotSupported, sourceName, source.Member.Name, relName, relationship.Member.Name));
System\ComponentModel\Design\ServiceContainer.cs (6)
85throw new ArgumentException(SR.Format(SR.ErrorInvalidServiceInstance, serviceType.FullName)); 90throw new ArgumentException(SR.Format(SR.ErrorServiceExists, serviceType.FullName), nameof(serviceType)); 127throw new ArgumentException(SR.Format(SR.ErrorServiceExists, serviceType.FullName), nameof(serviceType));
System\ComponentModel\EnumConverter.cs (5)
28throw new ArgumentException(SR.EnumInvalidValue); 104throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, EnumType.Name), e); 133throw new ArgumentException(SR.Format(SR.EnumConverterInvalidValue, value, EnumType.Name));
System\ComponentModel\ExtendedPropertyDescriptor.cs (3)
102name = SR.Format(SR.UsingResourceKeys() ? "{0} on {1}" : SR.MetaExtenderName, name, providerName);
System\ComponentModel\InstanceCreationEditor.cs (2)
14public virtual string Text => SR.UsingResourceKeys() ? "(New...)" : SR.InstanceCreationEditorDefaultText;
System\ComponentModel\LicenseException.cs (4)
26public LicenseException(Type? type) : this(type, null, SR.Format(SR.LicExceptionTypeOnly, type?.FullName)) 33public LicenseException(Type? type, object? instance) : this(type, null, SR.Format(SR.LicExceptionTypeAndInstance, type?.FullName, instance?.GetType().FullName))
System\ComponentModel\LicenseManager.cs (3)
56throw new InvalidOperationException(SR.LicMgrContextCannotBeChanged); 237throw new InvalidOperationException(SR.LicMgrAlreadyLocked); 249throw new ArgumentException(SR.LicMgrDifferentUser);
System\ComponentModel\ListSortDescriptionCollection.cs (7)
31set => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 43set => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 46int IList.Add(object? value) => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 48void IList.Clear() => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 54void IList.Insert(int index, object? value) => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 56void IList.Remove(object? value) => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 58void IList.RemoveAt(int index) => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection);
System\ComponentModel\MaskedTextProvider.cs (5)
227throw new ArgumentException(SR.MaskedTextProviderMaskInvalidChar); 668throw new InvalidOperationException(SR.MaskedTextProviderPasswordAndPromptCharError); 674throw new ArgumentException(SR.MaskedTextProviderInvalidCharError); 699throw new InvalidOperationException(SR.MaskedTextProviderPasswordAndPromptCharError); 705throw new ArgumentException(SR.MaskedTextProviderInvalidCharError);
System\ComponentModel\MemberDescriptor.cs (1)
47throw new ArgumentException(SR.InvalidMemberName, nameof(name));
System\ComponentModel\MultilineStringConverter.cs (2)
23return SR.UsingResourceKeys() ? "(Text)" : SR.Text;
System\ComponentModel\NullableConverter.cs (1)
31throw new ArgumentException(SR.NullableConverterBadCtorArg, nameof(type));
System\ComponentModel\ReferenceConverter.cs (2)
18private static readonly string s_none = SR.UsingResourceKeys() ? "(none)" : SR.toStringNone;
System\ComponentModel\ReflectEventDescriptor.cs (10)
83throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 87throw new ArgumentException(SR.Format(SR.ErrorInvalidEventType, name)); 101_componentClass = componentClass ?? throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 195throw new ArgumentException(SR.Format(SR.ErrorInvalidEventHandler, Name)); 369throw new ArgumentException(SR.Format(SR.ErrorMissingEventAccessors, Name));
System\ComponentModel\ReflectPropertyDescriptor.cs (12)
95throw new ArgumentException(SR.Format(SR.ErrorInvalidPropertyType, name)); 100throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 171throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 343throw new InvalidOperationException(SR.Format(SR.ErrorMissingPropertyAccessors, _componentClass.FullName + "." + Name)); 351throw new ArgumentException(SR.Format(SR.ErrorMissingPropertyAccessors, Name)); 940throw new TargetInvocationException(SR.Format(SR.ErrorPropertyAccessorException, Name, name, message), t);
System\ComponentModel\TimeOnlyConverter.cs (2)
66throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(TimeOnly)), e);
System\ComponentModel\TimeSpanConverter.cs (2)
51throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(TimeSpan)), e);
System\ComponentModel\ToolboxItemAttribute.cs (3)
47throw new NotSupportedException(SR.IDesignerHostNotSupported); 93throw new ArgumentException(SR.Format(SR.ToolboxItemAttributeFailedGetType, _toolboxItemTypeName), ex);
System\ComponentModel\TypeConverter.cs (8)
194string? valueTypeName = value == null ? (SR.UsingResourceKeys() ? "(null)" : SR.Null) : value.GetType().FullName; 195throw new NotSupportedException(SR.Format(SR.ConvertFromException, GetType().Name, valueTypeName)); 204string? valueTypeName = value == null ? (SR.UsingResourceKeys() ? "(null)" : SR.Null) : value.GetType().FullName; 205throw new NotSupportedException(SR.Format(SR.ConvertToException, GetType().Name, valueTypeName, destinationType.FullName));
System\ComponentModel\TypeDescriptor.cs (115)
407throw new ArgumentException(SR.TypeDescriptorSameAssociation); 432throw new ArgumentException(SR.TypeDescriptorAlreadyAssociated); 486throw new ArgumentException(SR.TypeDescriptorArgsCountMismatch); 1743throw new NotSupportedException(SR.ComObjectDescriptorsNotSupported); 1752throw new NotSupportedException(SR.ComObjectDescriptorsNotSupported); 2090throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(Attribute).FullName)); 2103throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(PropertyDescriptor).FullName)); 2116throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(EventDescriptor).FullName)); 2784throw new ArgumentException(SR.Format(SR.ConvertToException, nameof(objectType), instance.GetType()), nameof(instance)); 3048throw new NotSupportedException(SR.ComObjectDescriptorsNotSupported); 3253throw new ArgumentException(SR.TypeDescriptorArgsCountMismatch); 3441if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3443if (attrs == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3464if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3486if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3507if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3509if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3529if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3531if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3552if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3572if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3594if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3614if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3616if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3635if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptorFromRegisteredType")); 3637if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 3662if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3664if (evts == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3684if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3686if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3705if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3707if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3732if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3734if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3756if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3804throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3807throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3831throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3856throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3882throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3885throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3909throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3912throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverterFromRegisteredType")); 3937throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3963throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3991throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4016throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4019throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4043throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptorFromRegisteredType")); 4046throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 4071throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4074throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4099throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4103throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4127throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4132throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetPropertiesFromRegisteredType")); 4157throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4160throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4184throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4204throw new NotImplementedException(SR.Format(SR.CustomTypeProviderNotImplemented, memberName)); 4208throw new InvalidOperationException(SR.Format(SR.TypeIsNotRegistered, type.FullName));
System\ComponentModel\TypeListConverter.cs (2)
76return SR.UsingResourceKeys() ? "(none)" : SR.none;
System\ComponentModel\VersionConverter.cs (2)
50throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, versionString, nameof(Version)), e);
System\Drawing\PointConverter.cs (3)
54throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text, "x, y")); 104throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Drawing\RectangleConverter.cs (3)
50throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text, "x, y, width, height")); 110throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Drawing\SizeConverter.cs (3)
50throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text, "Width,Height")); 102throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Drawing\SizeFConverter.cs (3)
49throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text, "Width,Height")); 99throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Timers\Timer.cs (6)
53throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(interval), interval)); 59throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(interval), interval)); 171throw new ArgumentException(SR.Format(SR.TimerInvalidInterval, value, 0));
System\Timers\TimersDescriptionAttribute.cs (5)
30case TimersDescriptionStringId.TimerAutoReset: return SR.TimerAutoReset; 31case TimersDescriptionStringId.TimerEnabled: return SR.TimerEnabled; 32case TimersDescriptionStringId.TimerInterval: return SR.TimerInterval; 33case TimersDescriptionStringId.TimerIntervalElapsed: return SR.TimerIntervalElapsed; 34case TimersDescriptionStringId.TimerSynchronizingObject: return SR.TimerSynchronizingObject;