diff --git a/eng/WpfArcadeSdk/tools/SystemResources.props b/eng/WpfArcadeSdk/tools/SystemResources.props index 65eb08357da..de2392889d7 100644 --- a/eng/WpfArcadeSdk/tools/SystemResources.props +++ b/eng/WpfArcadeSdk/tools/SystemResources.props @@ -18,6 +18,7 @@ --> <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='PresentationBuildTasks'">false + <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='PresentationCore'">false <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='PresentationFramework'">false <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='PresentationUI' or '$(AssemblyName)'=='PresentationUI'">false <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='ReachFramework'">false @@ -53,7 +54,7 @@ System.Windows.SR System.Windows.TrustUI.SR System.Windows.SR - MS.Internal.PresentationCore.SRID + MS.Internal.PresentationCore.SR System.SR System.SRID diff --git a/src/Microsoft.DotNet.Wpf/src/Common/Graphics/exports.cs b/src/Microsoft.DotNet.Wpf/src/Common/Graphics/exports.cs index c4bd9518acf..02e812ebef2 100644 --- a/src/Microsoft.DotNet.Wpf/src/Common/Graphics/exports.cs +++ b/src/Microsoft.DotNet.Wpf/src/Common/Graphics/exports.cs @@ -31,7 +31,6 @@ using SafeNativeMethods=MS.Win32.PresentationCore.SafeNativeMethods; using HRESULT=MS.Internal.HRESULT; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using DllImport=MS.Internal.PresentationCore.DllImport; /* diff --git a/src/Microsoft.DotNet.Wpf/src/Common/Graphics/wgx_render.cs b/src/Microsoft.DotNet.Wpf/src/Common/Graphics/wgx_render.cs index edd5e12a1b3..9728b803884 100644 --- a/src/Microsoft.DotNet.Wpf/src/Common/Graphics/wgx_render.cs +++ b/src/Microsoft.DotNet.Wpf/src/Common/Graphics/wgx_render.cs @@ -11,7 +11,6 @@ using System.Windows.Media; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal { @@ -804,163 +803,163 @@ internal static Exception ConvertHRToException(int hr) return new System.OutOfMemoryException(); case (int)WinCodecErrors.WINCODEC_ERR_WRONGSTATE: - return new System.InvalidOperationException(SR.Get(SRID.Image_WrongState), exceptionForHR); + return new System.InvalidOperationException(SR.Image_WrongState, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_VALUEOUTOFRANGE: case (int)WinCodecErrors.WINCODEC_ERR_VALUEOVERFLOW: - return new System.OverflowException(SR.Get(SRID.Image_Overflow), exceptionForHR); + return new System.OverflowException(SR.Image_Overflow, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_UNKNOWNIMAGEFORMAT: - return new System.IO.FileFormatException(null, SR.Get(SRID.Image_UnknownFormat), exceptionForHR); + return new System.IO.FileFormatException(null, SR.Image_UnknownFormat, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_UNSUPPORTEDVERSION: - return new System.IO.FileLoadException(SR.Get(SRID.MilErr_UnsupportedVersion), exceptionForHR); + return new System.IO.FileLoadException(SR.MilErr_UnsupportedVersion, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_NOTINITIALIZED: - return new System.InvalidOperationException(SR.Get(SRID.WIC_NotInitialized), exceptionForHR); + return new System.InvalidOperationException(SR.WIC_NotInitialized, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_PROPERTYNOTFOUND: - return new System.ArgumentException(SR.Get(SRID.Image_PropertyNotFound), exceptionForHR); + return new System.ArgumentException(SR.Image_PropertyNotFound, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_PROPERTYNOTSUPPORTED: - return new System.NotSupportedException(SR.Get(SRID.Image_PropertyNotSupported), exceptionForHR); + return new System.NotSupportedException(SR.Image_PropertyNotSupported, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_PROPERTYSIZE: - return new System.ArgumentException(SR.Get(SRID.Image_PropertySize), exceptionForHR); + return new System.ArgumentException(SR.Image_PropertySize, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_CODECPRESENT: - return new System.InvalidOperationException(SR.Get(SRID.Image_CodecPresent), exceptionForHR); + return new System.InvalidOperationException(SR.Image_CodecPresent, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_CODECNOTHUMBNAIL: - return new System.NotSupportedException(SR.Get(SRID.Image_NoThumbnail), exceptionForHR); + return new System.NotSupportedException(SR.Image_NoThumbnail, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_PALETTEUNAVAILABLE: - return new System.InvalidOperationException(SR.Get(SRID.Image_NoPalette), exceptionForHR); + return new System.InvalidOperationException(SR.Image_NoPalette, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_CODECTOOMANYSCANLINES: - return new System.ArgumentException(SR.Get(SRID.Image_TooManyScanlines), exceptionForHR); + return new System.ArgumentException(SR.Image_TooManyScanlines, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_INTERNALERROR: - return new System.InvalidOperationException(SR.Get(SRID.Image_InternalError), exceptionForHR); + return new System.InvalidOperationException(SR.Image_InternalError, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_SOURCERECTDOESNOTMATCHDIMENSIONS: - return new System.ArgumentException(SR.Get(SRID.Image_BadDimensions), exceptionForHR); + return new System.ArgumentException(SR.Image_BadDimensions, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_COMPONENTINITIALIZEFAILURE: case (int)WinCodecErrors.WINCODEC_ERR_COMPONENTNOTFOUND: - return new System.NotSupportedException(SR.Get(SRID.Image_ComponentNotFound), exceptionForHR); + return new System.NotSupportedException(SR.Image_ComponentNotFound, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_UNEXPECTEDSIZE: case (int)WinCodecErrors.WINCODEC_ERR_BADIMAGE: // error decoding image file - return new System.IO.FileFormatException(null, SR.Get(SRID.Image_DecoderError), exceptionForHR); + return new System.IO.FileFormatException(null, SR.Image_DecoderError, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_BADHEADER: // error decoding header - return new System.IO.FileFormatException(null, SR.Get(SRID.Image_HeaderError), exceptionForHR); + return new System.IO.FileFormatException(null, SR.Image_HeaderError, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_FRAMEMISSING: - return new System.ArgumentException(SR.Get(SRID.Image_FrameMissing), exceptionForHR); + return new System.ArgumentException(SR.Image_FrameMissing, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_BADMETADATAHEADER: - return new System.ArgumentException(SR.Get(SRID.Image_BadMetadataHeader), exceptionForHR); + return new System.ArgumentException(SR.Image_BadMetadataHeader, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_BADSTREAMDATA: - return new System.ArgumentException(SR.Get(SRID.Image_BadStreamData), exceptionForHR); + return new System.ArgumentException(SR.Image_BadStreamData, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_STREAMWRITE: - return new System.InvalidOperationException(SR.Get(SRID.Image_StreamWrite), exceptionForHR); + return new System.InvalidOperationException(SR.Image_StreamWrite, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT: - return new System.NotSupportedException(SR.Get(SRID.Image_UnsupportedPixelFormat), exceptionForHR); + return new System.NotSupportedException(SR.Image_UnsupportedPixelFormat, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_UNSUPPORTEDOPERATION: - return new System.NotSupportedException(SR.Get(SRID.Image_UnsupportedOperation), exceptionForHR); + return new System.NotSupportedException(SR.Image_UnsupportedOperation, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_IMAGESIZEOUTOFRANGE: - return new System.ArgumentException(SR.Get(SRID.Image_SizeOutOfRange), exceptionForHR); + return new System.ArgumentException(SR.Image_SizeOutOfRange, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_STREAMREAD: - return new System.IO.IOException(SR.Get(SRID.Image_StreamRead), exceptionForHR); + return new System.IO.IOException(SR.Image_StreamRead, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_INVALIDQUERYREQUEST: - return new System.IO.IOException(SR.Get(SRID.Image_InvalidQueryRequest), exceptionForHR); + return new System.IO.IOException(SR.Image_InvalidQueryRequest, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_UNEXPECTEDMETADATATYPE: - return new System.IO.FileFormatException(null, SR.Get(SRID.Image_UnexpectedMetadataType), exceptionForHR); + return new System.IO.FileFormatException(null, SR.Image_UnexpectedMetadataType, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_REQUESTONLYVALIDATMETADATAROOT: - return new System.IO.FileFormatException(null, SR.Get(SRID.Image_RequestOnlyValidAtMetadataRoot), exceptionForHR); + return new System.IO.FileFormatException(null, SR.Image_RequestOnlyValidAtMetadataRoot, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_INVALIDQUERYCHARACTER: - return new System.IO.IOException(SR.Get(SRID.Image_InvalidQueryCharacter), exceptionForHR); + return new System.IO.IOException(SR.Image_InvalidQueryCharacter, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_DUPLICATEMETADATAPRESENT: - return new System.IO.FileFormatException(null, SR.Get(SRID.Image_DuplicateMetadataPresent), exceptionForHR); + return new System.IO.FileFormatException(null, SR.Image_DuplicateMetadataPresent, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_PROPERTYUNEXPECTEDTYPE: - return new System.IO.FileFormatException(null, SR.Get(SRID.Image_PropertyUnexpectedType), exceptionForHR); + return new System.IO.FileFormatException(null, SR.Image_PropertyUnexpectedType, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_TOOMUCHMETADATA: - return new System.IO.FileFormatException(null, SR.Get(SRID.Image_TooMuchMetadata), exceptionForHR); + return new System.IO.FileFormatException(null, SR.Image_TooMuchMetadata, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_STREAMNOTAVAILABLE: - return new System.NotSupportedException(SR.Get(SRID.Image_StreamNotAvailable), exceptionForHR); + return new System.NotSupportedException(SR.Image_StreamNotAvailable, exceptionForHR); case (int)WinCodecErrors.WINCODEC_ERR_INSUFFICIENTBUFFER: - return new System.ArgumentException(SR.Get(SRID.Image_InsufficientBuffer), exceptionForHR); + return new System.ArgumentException(SR.Image_InsufficientBuffer, exceptionForHR); case unchecked((int)0x80070057): - return new System.ArgumentException(SR.Get(SRID.Media_InvalidArgument, null), exceptionForHR); + return new System.ArgumentException(SR.Format(SR.Media_InvalidArgument, null), exceptionForHR); case unchecked((int)0x800707db): - return new System.IO.FileFormatException(null, SR.Get(SRID.Image_InvalidColorContext), exceptionForHR); + return new System.IO.FileFormatException(null, SR.Image_InvalidColorContext, exceptionForHR); case (int)MILErrors.WGXERR_DISPLAYSTATEINVALID: - return new System.InvalidOperationException(SR.Get(SRID.Image_DisplayStateInvalid), exceptionForHR); + return new System.InvalidOperationException(SR.Image_DisplayStateInvalid, exceptionForHR); case (int)MILErrors.WGXERR_NONINVERTIBLEMATRIX: - return new System.ArithmeticException(SR.Get(SRID.Image_SingularMatrix), exceptionForHR); + return new System.ArithmeticException(SR.Image_SingularMatrix, exceptionForHR); case (int)MILErrors.WGXERR_AV_INVALIDWMPVERSION: - return new System.Windows.Media.InvalidWmpVersionException(SR.Get(SRID.Media_InvalidWmpVersion, null), exceptionForHR); + return new System.Windows.Media.InvalidWmpVersionException(SR.Format(SR.Media_InvalidWmpVersion, null), exceptionForHR); case (int)MILErrors.WGXERR_AV_INSUFFICIENTVIDEORESOURCES: - return new System.NotSupportedException(SR.Get(SRID.Media_InsufficientVideoResources, null), exceptionForHR); + return new System.NotSupportedException(SR.Format(SR.Media_InsufficientVideoResources, null), exceptionForHR); case (int)MILErrors.WGXERR_AV_VIDEOACCELERATIONNOTAVAILABLE: - return new System.NotSupportedException(SR.Get(SRID.Media_HardwareVideoAccelerationNotAvailable, null), exceptionForHR); + return new System.NotSupportedException(SR.Format(SR.Media_HardwareVideoAccelerationNotAvailable, null), exceptionForHR); case (int)MILErrors.WGXERR_AV_MEDIAPLAYERCLOSED: - return new System.NotSupportedException(SR.Get(SRID.Media_PlayerIsClosed, null), exceptionForHR); + return new System.NotSupportedException(SR.Format(SR.Media_PlayerIsClosed, null), exceptionForHR); case (int)MediaPlayerErrors.NS_E_WMP_URLDOWNLOADFAILED: - return new System.IO.FileNotFoundException(SR.Get(SRID.Media_DownloadFailed, null), exceptionForHR); + return new System.IO.FileNotFoundException(SR.Format(SR.Media_DownloadFailed, null), exceptionForHR); case (int)MediaPlayerErrors.NS_E_WMP_LOGON_FAILURE: - return new System.Security.SecurityException(SR.Get(SRID.Media_LogonFailure), exceptionForHR); + return new System.Security.SecurityException(SR.Media_LogonFailure, exceptionForHR); case (int)MediaPlayerErrors.NS_E_WMP_CANNOT_FIND_FILE: - return new System.IO.FileNotFoundException(SR.Get(SRID.Media_FileNotFound), exceptionForHR); + return new System.IO.FileNotFoundException(SR.Media_FileNotFound, exceptionForHR); case (int)MediaPlayerErrors.NS_E_WMP_UNSUPPORTED_FORMAT: case (int)MediaPlayerErrors.NS_E_WMP_DSHOW_UNSUPPORTED_FORMAT: - return new System.IO.FileFormatException(SR.Get(SRID.Media_FileFormatNotSupported), exceptionForHR); + return new System.IO.FileFormatException(SR.Media_FileFormatNotSupported, exceptionForHR); case (int)MediaPlayerErrors.NS_E_WMP_INVALID_ASX: - return new System.IO.FileFormatException(SR.Get(SRID.Media_PlaylistFormatNotSupported), exceptionForHR); + return new System.IO.FileFormatException(SR.Media_PlaylistFormatNotSupported, exceptionForHR); case (int)MILErrors.WGXERR_BADNUMBER: - return new System.ArithmeticException(SR.Get(SRID.Geometry_BadNumber), exceptionForHR); + return new System.ArithmeticException(SR.Geometry_BadNumber, exceptionForHR); case (int)MILErrors.WGXERR_D3DI_INVALIDSURFACEUSAGE: - return new System.ArgumentException(SR.Get(SRID.D3DImage_InvalidUsage), exceptionForHR); + return new System.ArgumentException(SR.D3DImage_InvalidUsage, exceptionForHR); case (int)MILErrors.WGXERR_D3DI_INVALIDSURFACESIZE: - return new System.ArgumentException(SR.Get(SRID.D3DImage_SurfaceTooBig), exceptionForHR); + return new System.ArgumentException(SR.D3DImage_SurfaceTooBig, exceptionForHR); case (int)MILErrors.WGXERR_D3DI_INVALIDSURFACEPOOL: - return new System.ArgumentException(SR.Get(SRID.D3DImage_InvalidPool), exceptionForHR); + return new System.ArgumentException(SR.D3DImage_InvalidPool, exceptionForHR); case (int)MILErrors.WGXERR_D3DI_INVALIDSURFACEDEVICE: - return new System.ArgumentException(SR.Get(SRID.D3DImage_InvalidDevice), exceptionForHR); + return new System.ArgumentException(SR.D3DImage_InvalidDevice, exceptionForHR); case (int)MILErrors.WGXERR_D3DI_INVALIDANTIALIASINGSETTINGS: - return new System.ArgumentException(SR.Get(SRID.D3DImage_AARequires9Ex), exceptionForHR); + return new System.ArgumentException(SR.D3DImage_AARequires9Ex, exceptionForHR); default: return exceptionForHR; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPenimc.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPenimc.cs index 13e93103062..f394f085831 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPenimc.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/Win32/UnsafeNativeMethodsPenimc.cs @@ -112,7 +112,7 @@ internal static void EnsurePenImcClassesActivated() // succeeds, or IntPtr.Zero if SxS registration fails. if ((_pimcActCtxCookie = RegisterDllForSxSCOM()) == IntPtr.Zero) { - throw new InvalidOperationException(SR.Get(SRID.PenImcSxSRegistrationFailed, ExternDll.Penimc)); + throw new InvalidOperationException(SR.Format(SR.PenImcSxSRegistrationFailed, ExternDll.Penimc)); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementProxy.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementProxy.cs index 4b5a96135d3..011a97eb0a8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementProxy.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementProxy.cs @@ -29,7 +29,6 @@ using MS.Internal.PresentationCore; using MS.Win32; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Automation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementUtil.cs index 702508a2078..d7c8664c5e5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/ElementUtil.cs @@ -28,7 +28,6 @@ using MS.Internal.PresentationCore; // SafeSecurityHelper using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Automation { @@ -241,11 +240,11 @@ internal static object Invoke(AutomationPeer peer, DispatcherOperationCallback w if(dispatcherInShutdown) { - throw new InvalidOperationException(SR.Get(SRID.AutomationDispatcherShutdown)); + throw new InvalidOperationException(SR.AutomationDispatcherShutdown); } else { - throw new TimeoutException(SR.Get(SRID.AutomationTimeout)); + throw new TimeoutException(SR.AutomationTimeout); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs index 8ab9204c622..6681b08e52a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/EventMap.cs @@ -19,7 +19,6 @@ using System.Windows.Threading; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Automation { @@ -122,7 +121,7 @@ private static AutomationEvent GetRegisteredEventObjectHelper(AutomationEvents e case AutomationEvents.ActiveTextPositionChanged: eventObject = AutomationElementIdentifiers.ActiveTextPositionChangedEvent; break; default: - throw new ArgumentException(SR.Get(SRID.Automation_InvalidEventId), "eventId"); + throw new ArgumentException(SR.Automation_InvalidEventId, "eventId"); } if ((eventObject != null) && (!_eventsTable.ContainsKey(eventObject.Id))) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputAdaptor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputAdaptor.cs index 49b72d93128..8a05bf5e1cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputAdaptor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/SynchronizedInputAdaptor.cs @@ -15,7 +15,6 @@ using MS.Internal; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Automation { @@ -47,7 +46,7 @@ void ISynchronizedInputProvider.StartListening(SynchronizedInputType inputType) inputType != SynchronizedInputType.MouseRightButtonDown && inputType != SynchronizedInputType.MouseRightButtonUp) { - throw new ArgumentException(SR.Get(SRID.Automation_InvalidSynchronizedInputType, inputType)); + throw new ArgumentException(SR.Format(SR.Automation_InvalidSynchronizedInputType, inputType)); } UIElement e = _owner as UIElement; @@ -55,7 +54,7 @@ void ISynchronizedInputProvider.StartListening(SynchronizedInputType inputType) { if (!e.StartListeningSynchronizedInput(inputType)) { - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); } } else @@ -65,7 +64,7 @@ void ISynchronizedInputProvider.StartListening(SynchronizedInputType inputType) { if (!ce.StartListeningSynchronizedInput(inputType)) { - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); } } else @@ -73,7 +72,7 @@ void ISynchronizedInputProvider.StartListening(SynchronizedInputType inputType) UIElement3D e3D = (UIElement3D)_owner; if (!e3D.StartListeningSynchronizedInput(inputType)) { - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextProviderWrapper.cs index b6d2a45cae5..4f41a8ff316 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextProviderWrapper.cs @@ -18,7 +18,6 @@ using System.Windows.Automation.Text; using System.Windows.Automation.Peers; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Automation { @@ -64,7 +63,7 @@ public ITextRangeProvider RangeFromChild(IRawElementProviderSimple childElement) { if (!(childElement is ElementProxy)) { - throw new ArgumentException(SR.Get(SRID.TextProvider_InvalidChild, "childElement")); + throw new ArgumentException(SR.Format(SR.TextProvider_InvalidChild, "childElement")); } return (ITextRangeProvider)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(RangeFromChild), childElement); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextRangeProviderWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextRangeProviderWrapper.cs index a53207de974..2bc4e04b7a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextRangeProviderWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Automation/TextRangeProviderWrapper.cs @@ -19,7 +19,6 @@ using System.Windows.Automation.Text; using System.Windows.Automation.Peers; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Automation { @@ -60,7 +59,7 @@ public bool Compare(ITextRangeProvider range) { if (!(range is TextRangeProviderWrapper)) { - throw new ArgumentException(SR.Get(SRID.TextRangeProvider_InvalidRangeProvider, "range")); + throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidRangeProvider, "range")); } return (bool)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Compare), range); @@ -70,7 +69,7 @@ public int CompareEndpoints(TextPatternRangeEndpoint endpoint, ITextRangeProvide { if (!(targetRange is TextRangeProviderWrapper)) { - throw new ArgumentException(SR.Get(SRID.TextRangeProvider_InvalidRangeProvider, "targetRange")); + throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidRangeProvider, "targetRange")); } object[] args = new object[] { endpoint, targetRange, targetEndpoint }; @@ -133,7 +132,7 @@ public void MoveEndpointByRange(TextPatternRangeEndpoint endpoint, ITextRangePro { if (!(targetRange is TextRangeProviderWrapper)) { - throw new ArgumentException(SR.Get(SRID.TextRangeProvider_InvalidRangeProvider, "targetRange")); + throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidRangeProvider, "targetRange")); } object[] args = new object[] { endpoint, targetRange, targetEndpoint }; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CustomCategoryAttribute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CustomCategoryAttribute.cs index 04fef5341bc..cfb42327921 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CustomCategoryAttribute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/CustomCategoryAttribute.cs @@ -29,7 +29,7 @@ internal CustomCategoryAttribute(string category) : base(category) protected override string GetLocalizedString(string value) { - string s = SR.Get(value); + string s = SR.GetResourceString(value); if (s != null) { return s; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/DWriteFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/DWriteFactory.cs index a1cbce3898b..2abd579de1f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/DWriteFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/DWriteFactory.cs @@ -28,8 +28,8 @@ static DWriteFactory() new FontSourceCollectionFactory(), new FontSourceFactory()); - Text.TextInterface.LocalizedErrorMsgs.EnumeratorNotStarted = SR.Get(SRID.Enumerator_NotStarted); - Text.TextInterface.LocalizedErrorMsgs.EnumeratorReachedEnd = SR.Get(SRID.Enumerator_ReachedEnd); + Text.TextInterface.LocalizedErrorMsgs.EnumeratorNotStarted = SR.Enumerator_NotStarted; + Text.TextInterface.LocalizedErrorMsgs.EnumeratorReachedEnd = SR.Enumerator_ReachedEnd; } internal static Text.TextInterface.Factory Instance diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs index 0a6676617bf..9ced7b76bbe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontCacheUtil.cs @@ -514,7 +514,7 @@ internal static void SplitFontFaceIndex(Uri fontUri, out Uri fontSourceUri, out out faceIndex )) { - throw new ArgumentException(SR.Get(SRID.FaceIndexMustBePositiveOrZero), "fontUri"); + throw new ArgumentException(SR.FaceIndexMustBePositiveOrZero, "fontUri"); } // face index was specified in a fragment, we need to strip off fragment from the source Uri @@ -767,19 +767,19 @@ internal static void ThrowWin32Exception(int errorCode, string fileName) switch (errorCode) { case NativeMethods.ERROR_FILE_NOT_FOUND: - throw new FileNotFoundException(SR.Get(SRID.FileNotFoundExceptionWithFileName, fileName), fileName); + throw new FileNotFoundException(SR.Format(SR.FileNotFoundExceptionWithFileName, fileName), fileName); case NativeMethods.ERROR_PATH_NOT_FOUND: - throw new DirectoryNotFoundException(SR.Get(SRID.DirectoryNotFoundExceptionWithFileName, fileName)); + throw new DirectoryNotFoundException(SR.Format(SR.DirectoryNotFoundExceptionWithFileName, fileName)); case NativeMethods.ERROR_ACCESS_DENIED: - throw new UnauthorizedAccessException(SR.Get(SRID.UnauthorizedAccessExceptionWithFileName, fileName)); + throw new UnauthorizedAccessException(SR.Format(SR.UnauthorizedAccessExceptionWithFileName, fileName)); case NativeMethods.ERROR_FILENAME_EXCED_RANGE: - throw new PathTooLongException(SR.Get(SRID.PathTooLongExceptionWithFileName, fileName)); + throw new PathTooLongException(SR.Format(SR.PathTooLongExceptionWithFileName, fileName)); default: - throw new IOException(SR.Get(SRID.IOExceptionWithFileName, fileName), NativeMethods.MakeHRFromErrorCode(errorCode)); + throw new IOException(SR.Format(SR.IOExceptionWithFileName, fileName), NativeMethods.MakeHRFromErrorCode(errorCode)); } } @@ -795,7 +795,7 @@ internal static Exception ConvertInPageException(FontSource fontSource, SEHExcep fileName = fontSource.GetUriString(); } - return new IOException(SR.Get(SRID.IOExceptionWithFileName, fileName), e); + return new IOException(SR.Format(SR.IOExceptionWithFileName, fileName), e); } } @@ -861,7 +861,7 @@ internal void OpenFile(string fileName) UnsafeNativeMethods.LARGE_INTEGER fileSize = new UnsafeNativeMethods.LARGE_INTEGER(); if (!UnsafeNativeMethods.GetFileSizeEx(fileHandle, ref fileSize)) - throw new IOException(SR.Get(SRID.IOExceptionWithFileName, fileName)); + throw new IOException(SR.Format(SR.IOExceptionWithFileName, fileName)); size = (long)fileSize.QuadPart; if (size == 0) @@ -877,11 +877,11 @@ internal void OpenFile(string fileName) } if (_mappingHandle.IsInvalid) - throw new IOException(SR.Get(SRID.IOExceptionWithFileName, fileName)); + throw new IOException(SR.Format(SR.IOExceptionWithFileName, fileName)); _viewHandle = UnsafeNativeMethods.MapViewOfFileEx(_mappingHandle, UnsafeNativeMethods.FILE_MAP_READ, 0, 0, IntPtr.Zero, IntPtr.Zero); if (_viewHandle.IsInvalid) - throw new IOException(SR.Get(SRID.IOExceptionWithFileName, fileName)); + throw new IOException(SR.Format(SR.IOExceptionWithFileName, fileName)); #pragma warning restore 6523 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontFaceLayoutInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontFaceLayoutInfo.cs index a472caf35b2..6d2960e4cc4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontFaceLayoutInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontCache/FontFaceLayoutInfo.cs @@ -734,7 +734,7 @@ public void CopyTo(KeyValuePair[] array, int arrayIndex) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // The extra "arrayIndex >= array.Length" check in because even if _collection.Count diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontInfo.cs index aa5b6cd9b85..2c4712b486e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontInfo.cs @@ -20,7 +20,6 @@ using System.Windows.Media; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.FontFace { @@ -62,7 +61,7 @@ internal void PrepareToAddFamilyMap(FontFamilyMap familyMap) throw new ArgumentNullException("familyMap"); if (string.IsNullOrEmpty(familyMap.Target)) - throw new ArgumentException(SR.Get(SRID.FamilyMap_TargetNotSet)); + throw new ArgumentException(SR.FamilyMap_TargetNotSet); // If it's culture-specific make sure it's in the hash table. if (familyMap.Language != null) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontParser.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontParser.cs index a92aa59c75f..a287ffe9219 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontParser.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/CompositeFontParser.cs @@ -26,7 +26,6 @@ using System.Reflection; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.FontFace { @@ -36,7 +35,7 @@ internal static void VerifyMultiplierOfEm(string propertyName, ref double value) { if (double.IsNaN(value)) { - throw new ArgumentException(SR.Get(SRID.PropertyValueCannotBeNaN, propertyName)); + throw new ArgumentException(SR.Format(SR.PropertyValueCannotBeNaN, propertyName)); } else if (value > Constants.GreatestMutiplierOfEm) { @@ -52,7 +51,7 @@ internal static void VerifyPositiveMultiplierOfEm(string propertyName, ref doubl { if (double.IsNaN(value)) { - throw new ArgumentException(SR.Get(SRID.PropertyValueCannotBeNaN, propertyName)); + throw new ArgumentException(SR.Format(SR.PropertyValueCannotBeNaN, propertyName)); } else if (value > Constants.GreatestMutiplierOfEm) { @@ -60,7 +59,7 @@ internal static void VerifyPositiveMultiplierOfEm(string propertyName, ref doubl } else if (value <= 0) { - throw new ArgumentException(SR.Get(SRID.PropertyMustBeGreaterThanZero, propertyName)); + throw new ArgumentException(SR.Format(SR.PropertyMustBeGreaterThanZero, propertyName)); } } @@ -68,7 +67,7 @@ internal static void VerifyNonNegativeMultiplierOfEm(string propertyName, ref do { if (double.IsNaN(value)) { - throw new ArgumentException(SR.Get(SRID.PropertyValueCannotBeNaN, propertyName)); + throw new ArgumentException(SR.Format(SR.PropertyValueCannotBeNaN, propertyName)); } else if (value > Constants.GreatestMutiplierOfEm) { @@ -76,7 +75,7 @@ internal static void VerifyNonNegativeMultiplierOfEm(string propertyName, ref do } else if (value < 0) { - throw new ArgumentException(SR.Get(SRID.PropertyCannotBeNegative, propertyName)); + throw new ArgumentException(SR.Format(SR.PropertyCannotBeNegative, propertyName)); } } @@ -871,10 +870,10 @@ private bool IsIgnorableAttribute() private void VerifyCompositeFontInfo() { if (_compositeFontInfo.FamilyMaps.Count == 0) - Fail(SR.Get(SRID.CompositeFontMissingElement, FamilyMapElement)); + Fail(SR.Format(SR.CompositeFontMissingElement, FamilyMapElement)); if (_compositeFontInfo.FamilyNames.Count == 0) - Fail(SR.Get(SRID.CompositeFontMissingElement, StringElement)); + Fail(SR.Format(SR.CompositeFontMissingElement, StringElement)); } /// @@ -890,8 +889,8 @@ private void FailNotWellFormed(Exception x) /// private void FailAttributeValue() { - Fail(SR.Get( - SRID.CompositeFontAttributeValue1, + Fail(SR.Format( + SR.CompositeFontAttributeValue1, _reader.LocalName)); } @@ -900,8 +899,8 @@ private void FailAttributeValue() /// private void FailAttributeValue(Exception x) { - Fail(SR.Get( - SRID.CompositeFontAttributeValue2, + Fail(SR.Format( + SR.CompositeFontAttributeValue2, _reader.LocalName, x.Message), x); @@ -912,8 +911,8 @@ private void FailAttributeValue(Exception x) /// private void FailUnknownElement() { - Fail(SR.Get( - SRID.CompositeFontUnknownElement, + Fail(SR.Format( + SR.CompositeFontUnknownElement, _reader.LocalName, _reader.NamespaceURI)); } @@ -923,8 +922,8 @@ private void FailUnknownElement() /// private void FailUnknownAttribute() { - Fail(SR.Get( - SRID.CompositeFontUnknownAttribute, + Fail(SR.Format( + SR.CompositeFontUnknownAttribute, _reader.LocalName, _reader.NamespaceURI)); } @@ -935,7 +934,7 @@ private void FailUnknownAttribute() /// private void FailMissingAttribute(string name) { - Fail(SR.Get(SRID.CompositeFontMissingAttribute, name)); + Fail(SR.Format(SR.CompositeFontMissingAttribute, name)); } /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDriver.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDriver.cs index 44821dd1a45..87995e1f9f5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDriver.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/FontDriver.cs @@ -174,7 +174,7 @@ internal void SetFace(int faceIndex) else { if (faceIndex != 0) - throw new ArgumentOutOfRangeException("faceIndex", SR.Get(SRID.FaceIndexValidOnlyForTTC)); + throw new ArgumentOutOfRangeException("faceIndex", SR.FaceIndexValidOnlyForTTC); } try diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/TypefaceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/TypefaceCollection.cs index e8d91d667b5..845d205c4ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/TypefaceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/FontFace/TypefaceCollection.cs @@ -20,7 +20,6 @@ using System.Security; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.FontFace { @@ -77,7 +76,7 @@ public void CopyTo(Typeface[] array, int arrayIndex) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // The extra "arrayIndex >= array.Length" check in because even if _collection.Count diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IListConverters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IListConverters.cs index 9a6244ce140..e2797372581 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IListConverters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IListConverters.cs @@ -16,7 +16,6 @@ using System.Windows; using MS.Internal; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; namespace System.Windows.Media.Converters @@ -63,7 +62,7 @@ public override object ConvertFrom(ITypeDescriptorContext td, CultureInfo ci, ob if (null == s) { - throw new ArgumentException(SR.Get(SRID.General_BadType, "ConvertFrom"), "value"); + throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value"); } return ConvertFromCore(td, ci, s); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ByteRangeDownloader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ByteRangeDownloader.cs index 117b2794a78..9cb8d37ac94 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ByteRangeDownloader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/ByteRangeDownloader.cs @@ -63,7 +63,7 @@ internal ByteRangeDownloader(Uri requestedUri, string tempFileName, SafeWaitHand if (tempFileName.Length <= 0) { - throw new ArgumentException(SR.Get(SRID.InvalidTempFileName), "tempFileName"); + throw new ArgumentException(SR.InvalidTempFileName, "tempFileName"); } _tempFileStream = File.Open(tempFileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite); @@ -314,7 +314,7 @@ internal IWebProxy Proxy } else // Once first request is made it cannot change { - throw new InvalidOperationException(SR.Get(SRID.RequestAlreadyStarted)); + throw new InvalidOperationException(SR.RequestAlreadyStarted); } } } @@ -345,7 +345,7 @@ internal RequestCachePolicy CachePolicy } else // Once first request is made it cannot cahnge { - throw new InvalidOperationException(SR.Get(SRID.RequestAlreadyStarted)); + throw new InvalidOperationException(SR.RequestAlreadyStarted); } } } @@ -402,7 +402,7 @@ private void CheckDisposed() { if (_disposed) { - throw new ObjectDisposedException(null, SR.Get(SRID.ByteRangeDownloaderDisposed)); + throw new ObjectDisposedException(null, SR.ByteRangeDownloaderDisposed); } } @@ -419,7 +419,7 @@ private ByteRangeDownloader(Uri requestedUri, SafeWaitHandle eventHandle) // Ensure uri is correct scheme (http or https) Do case-sensitive comparison since Uri.Scheme contract is to return in lower case only. if (!string.Equals(requestedUri.Scheme, Uri.UriSchemeHttp, StringComparison.Ordinal) && !string.Equals(requestedUri.Scheme, Uri.UriSchemeHttps, StringComparison.Ordinal)) { - throw new ArgumentException(SR.Get(SRID.InvalidScheme), "requestedUri"); + throw new ArgumentException(SR.InvalidScheme, "requestedUri"); } if (eventHandle == null) @@ -429,7 +429,7 @@ private ByteRangeDownloader(Uri requestedUri, SafeWaitHandle eventHandle) if (eventHandle.IsInvalid || eventHandle.IsClosed) { - throw new ArgumentException(SR.Get(SRID.InvalidEventHandle), "eventHandle"); + throw new ArgumentException(SR.InvalidEventHandle, "eventHandle"); } _requestedUri = requestedUri; @@ -445,7 +445,7 @@ private void CheckErroredOutCondition() { if (_erroredOut) { - throw new InvalidOperationException(SR.Get(SRID.ByteRangeDownloaderErroredOut), _erroredOutException); + throw new InvalidOperationException(SR.ByteRangeDownloaderErroredOut, _erroredOutException); } } @@ -562,7 +562,7 @@ private void ResponseCallback(IAsyncResult ar) else { _erroredOut = true; - _erroredOutException = new NotSupportedException(SR.Get(SRID.ByteRangeRequestIsNotSupported)); + _erroredOutException = new NotSupportedException(SR.ByteRangeRequestIsNotSupported); } } else @@ -716,14 +716,14 @@ static private void CheckOneDimensionalByteRanges(int[] byteRanges) // The byteRanges should never be less; perf optimization if (byteRanges.Length < 2 || (byteRanges.Length % 2) != 0) { - throw new ArgumentException(SR.Get(SRID.InvalidByteRanges, "byteRanges")); + throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges")); } for (int i = 0; i < byteRanges.Length; i++) { if (byteRanges[i] < 0 || byteRanges[i+1] <= 0) { - throw new ArgumentException(SR.Get(SRID.InvalidByteRanges, "byteRanges")); + throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges")); } i++; } @@ -741,14 +741,14 @@ static private void CheckTwoDimensionalByteRanges(int[,] byteRanges) { if (byteRanges.GetLength(0) <= 0 || byteRanges.GetLength(1) != 2) { - throw new ArgumentException(SR.Get(SRID.InvalidByteRanges, "byteRanges")); + throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges")); } for (int i = 0; i < byteRanges.GetLength(0); ++i) { if (byteRanges[i,Offset_Index] < 0 || byteRanges[i,Length_Index] <= 0) { - throw new ArgumentException(SR.Get(SRID.InvalidByteRanges, "byteRanges")); + throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges")); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/DeobfuscatingStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/DeobfuscatingStream.cs index 5d64e916601..5bc0653b3a8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/DeobfuscatingStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/DeobfuscatingStream.cs @@ -72,7 +72,7 @@ public override void Write(byte[] buffer, int offset, int count) { CheckDisposed(); - throw new NotSupportedException(SR.Get(SRID.WriteNotSupported)); + throw new NotSupportedException(SR.WriteNotSupported); } /// @@ -95,7 +95,7 @@ public override void SetLength(long newLength) { CheckDisposed(); - throw new NotSupportedException(SR.Get(SRID.SetLengthNotSupported)); + throw new NotSupportedException(SR.SetLengthNotSupported); } /// @@ -206,7 +206,7 @@ internal DeobfuscatingStream(Stream obfuscatedStream, Uri streamUri, bool leaveO Uri partUri = System.IO.Packaging.PackUriHelper.GetPartUri(streamUri); if (partUri == null) { - throw new InvalidOperationException(SR.Get(SRID.InvalidPartName)); + throw new InvalidOperationException(SR.InvalidPartName); } // Normally we should use PackUriHelper.GetStringForPartUri to get the string representation of part Uri @@ -272,7 +272,7 @@ protected override void Dispose(bool disposing) private void CheckDisposed() { if (_obfuscatedStream == null) - throw new ObjectDisposedException(null, SR.Get(SRID.Media_StreamClosed)); + throw new ObjectDisposedException(null, SR.Media_StreamClosed); } /// @@ -328,7 +328,7 @@ private static byte[] GetGuidByteArray(string guidString) // while XPS spec requires dash'ed format of GUID if (!guidString.Contains('-')) { - throw new ArgumentException(SR.Get(SRID.InvalidPartName)); + throw new ArgumentException(SR.InvalidPartName); } // Use Guid constructor to do error checking in parsing diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/NetStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/NetStream.cs index 8185d072292..138a7546611 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/NetStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/NetStream.cs @@ -145,7 +145,7 @@ public override int Read(byte[] buffer, int offset, int count) checked { if (offset + count > buffer.Length) - throw new ArgumentException(SR.Get(SRID.IOBufferOverflow), "buffer"); + throw new ArgumentException(SR.IOBufferOverflow, "buffer"); // make sure some data is in the stream - block until it is int bytesAvailable = GetData(new Block(_position, count)); @@ -254,13 +254,13 @@ public override long Seek(long offset, SeekOrigin origin) default: { - throw new ArgumentOutOfRangeException("origin", SR.Get(SRID.SeekOriginInvalid)); + throw new ArgumentOutOfRangeException("origin", SR.SeekOriginInvalid); } } } if (temp < 0) { - throw new ArgumentException(SR.Get(SRID.SeekNegative)); + throw new ArgumentException(SR.SeekNegative); } #if DEBUG @@ -287,7 +287,7 @@ public override long Position CheckDisposed(); if (value < 0) - throw new ArgumentException(SR.Get(SRID.SeekNegative)); + throw new ArgumentException(SR.SeekNegative); #if DEBUG if (System.IO.Packaging.PackWebRequestFactory._traceSwitch.Enabled) @@ -305,7 +305,7 @@ public override long Position /// not supported public override void SetLength(long newLength) { - throw new NotSupportedException(SR.Get(SRID.SetLengthNotSupported)); + throw new NotSupportedException(SR.SetLengthNotSupported); } @@ -315,7 +315,7 @@ public override void SetLength(long newLength) /// not supported public override void Write(byte[] buf, int offset, int count) { - throw new NotSupportedException(SR.Get(SRID.WriteNotSupported)); + throw new NotSupportedException(SR.WriteNotSupported); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PreloadedPackages.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PreloadedPackages.cs index 33188884498..96bc3230f17 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PreloadedPackages.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PreloadedPackages.cs @@ -167,7 +167,7 @@ private static void ValidateUriKey(Uri uri) if (!uri.IsAbsoluteUri) { - throw new ArgumentException(SR.Get(SRID.UriMustBeAbsolute), "uri"); + throw new ArgumentException(SR.UriMustBeAbsolute, "uri"); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PseudoWebRequest.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PseudoWebRequest.cs index 62d9e87f5a0..0b2b9db1465 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PseudoWebRequest.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/IO/Packaging/PseudoWebRequest.cs @@ -23,7 +23,7 @@ using System.Diagnostics; // For Assert using MS.Utility; // for EventTrace using MS.Internal.IO.Packaging; // for PackageCacheEntry -using MS.Internal.PresentationCore; // for SRID exception strings +using MS.Internal.PresentationCore; // for SR exception strings using MS.Internal; namespace MS.Internal.IO.Packaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedProperty.cs index 0486c6e0a91..d3cfda99beb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedProperty.cs @@ -14,7 +14,6 @@ using MS.Internal.Ink.InkSerializedFormat; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Ink { @@ -33,7 +32,7 @@ internal ExtendedProperty(Guid id, object value) { if (id == Guid.Empty) { - throw new ArgumentException(SR.Get(SRID.InvalidGuid)); + throw new ArgumentException(SR.InvalidGuid); } _id = id; Value = value; @@ -217,7 +216,7 @@ internal ExtendedProperty Clone() // // we didn't find a type we expect, throw // - throw new InvalidOperationException(SR.Get(SRID.InvalidDataTypeForExtendedProperty)); + throw new InvalidOperationException(SR.InvalidDataTypeForExtendedProperty); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedPropertyCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedPropertyCollection.cs index 9b6d585a93c..3d129e7acdb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedPropertyCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/ExtendedPropertyCollection.cs @@ -16,7 +16,6 @@ using System.Reflection; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Ink { @@ -164,7 +163,7 @@ internal void Add(Guid id, object value) { if (this.Contains(id)) { - throw new ArgumentException(SR.Get(SRID.EPExists), "id"); + throw new ArgumentException(SR.EPExists, "id"); } ExtendedProperty extendedProperty = new ExtendedProperty(id, value); @@ -182,7 +181,7 @@ internal void Remove(Guid id) { if (!Contains(id)) { - throw new ArgumentException(SR.Get(SRID.EPGuidNotFound), "id"); + throw new ArgumentException(SR.EPGuidNotFound, "id"); } ExtendedProperty propertyToRemove = GetExtendedPropertyById(id); @@ -242,7 +241,7 @@ internal object this[Guid attributeId] ExtendedProperty ep = GetExtendedPropertyById(attributeId); if (ep == null) { - throw new ArgumentException(SR.Get(SRID.EPNotFound), "attributeId"); + throw new ArgumentException(SR.EPNotFound, "attributeId"); } return ep.Value; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs index 80ae950af56..1b2aa9b01a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/GestureRecognizer/NativeRecognizer.cs @@ -32,7 +32,6 @@ using MS.Utility; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -71,7 +70,7 @@ private NativeRecognizer() if (HRESULT.Failed(hr)) { //don't throw a com exception here, we don't need to pass out any details - throw new InvalidOperationException(SR.Get(SRID.UnspecifiedGestureConstructionException)); + throw new InvalidOperationException(SR.UnspecifiedGestureConstructionException); } // We add a reference of the recognizer to the context handle. @@ -126,7 +125,7 @@ internal ApplicationGesture[] SetEnabledGestures(IEnumerable if (HRESULT.Failed(hr)) { //don't throw a com exception here, we don't need to pass out any details - throw new InvalidOperationException(SR.Get(SRID.UnspecifiedSetEnabledGesturesException)); + throw new InvalidOperationException(SR.UnspecifiedSetEnabledGesturesException); } return enabledGestures; @@ -154,7 +153,7 @@ internal GestureRecognitionResult[] Recognize(StrokeCollection strokes) } if (strokes.Count > 2) { - throw new ArgumentException(SR.Get(SRID.StrokeCollectionCountTooBig), "strokes"); + throw new ArgumentException(SR.StrokeCollectionCountTooBig, "strokes"); } // Create an empty result. @@ -207,7 +206,7 @@ internal GestureRecognitionResult[] Recognize(StrokeCollection strokes) if ( HRESULT.Failed(hr) ) { //don't throw a com exception here, we don't need to pass out any details - throw new InvalidOperationException(SR.Get(SRID.UnspecifiedGestureException)); + throw new InvalidOperationException(SR.UnspecifiedGestureException); } } @@ -242,7 +241,7 @@ internal static ApplicationGesture[] GetApplicationGestureArrayAndVerify(IEnumer if (count == 0) { // An empty array is not allowed. - throw new ArgumentException(SR.Get(SRID.ApplicationGestureArrayLengthIsZero), "applicationGestures"); + throw new ArgumentException(SR.ApplicationGestureArrayLengthIsZero, "applicationGestures"); } bool foundAllGestures = false; @@ -251,7 +250,7 @@ internal static ApplicationGesture[] GetApplicationGestureArrayAndVerify(IEnumer { if (!ApplicationGestureHelper.IsDefined(gesture)) { - throw new ArgumentException(SR.Get(SRID.ApplicationGestureIsInvalid), "applicationGestures"); + throw new ArgumentException(SR.ApplicationGestureIsInvalid, "applicationGestures"); } //check for allgestures @@ -263,7 +262,7 @@ internal static ApplicationGesture[] GetApplicationGestureArrayAndVerify(IEnumer //check for dupes if (gestures.Contains(gesture)) { - throw new ArgumentException(SR.Get(SRID.DuplicateApplicationGestureFound), "applicationGestures"); + throw new ArgumentException(SR.DuplicateApplicationGestureFound, "applicationGestures"); } gestures.Add(gesture); @@ -273,7 +272,7 @@ internal static ApplicationGesture[] GetApplicationGestureArrayAndVerify(IEnumer if (foundAllGestures && gestures.Count != 1) { // no dupes allowed - throw new ArgumentException(SR.Get(SRID.AllGesturesMustExistAlone), "applicationGestures"); + throw new ArgumentException(SR.AllGesturesMustExistAlone, "applicationGestures"); } return gestures.ToArray(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/AlgoModule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/AlgoModule.cs index dca757fc894..3a366069fd6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/AlgoModule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/AlgoModule.cs @@ -15,7 +15,6 @@ using System.Diagnostics; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Codec.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Codec.cs index 73309a987e7..f12c595547b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Codec.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Codec.cs @@ -14,7 +14,6 @@ using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Compress.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Compress.cs index 483a00201ae..9b2c04bd3c8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Compress.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/Compress.cs @@ -16,7 +16,6 @@ using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { @@ -47,7 +46,7 @@ internal Compressor(byte[] data, ref uint size) //we don't raise any information that could be used to attack our ISF code //a simple 'ISF Operation Failed' is sufficient since the user can't do //anything to fix bogus ISF - throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.Get(SRID.InitializingCompressorFailed))); + throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.InitializingCompressorFailed)); } _compressorHandle = MS.Win32.Penimc.UnsafeNativeMethods.IsfLoadCompressor(data, ref size); @@ -56,7 +55,7 @@ internal Compressor(byte[] data, ref uint size) //we don't raise any information that could be used to attack our ISF code //a simple 'ISF Operation Failed' is sufficient since the user can't do //anything to fix bogus ISF - throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.Get(SRID.InitializingCompressorFailed))); + throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.InitializingCompressorFailed)); } } /// @@ -101,7 +100,7 @@ internal static void DecompressPacketData( //we don't raise any information that could be used to attack our ISF code //a simple 'ISF Operation Failed' is sufficient since the user can't do //anything to fix bogus ISF - throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.Get(SRID.DecompressPacketDataFailed))); + throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.DecompressPacketDataFailed)); } #if OLD_ISF uint size2 = size; @@ -170,7 +169,7 @@ internal static byte[] DecompressPropertyData(byte[] input) //we don't raise any information that could be used to attack our ISF code //a simple 'ISF Operation Failed' is sufficient since the user can't do //anything to fix bogus ISF - throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.Get(SRID.DecompressPropertyFailed))); + throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.DecompressPropertyFailed)); } byte[] data = AlgoModule.DecompressPropertyData(input); @@ -238,7 +237,7 @@ internal static void CompressPropertyData(byte[] data, ref byte algorithm, ref u //we don't raise any information that could be used to attack our ISF code //a simple 'ISF Operation Failed' is sufficient since the user can't do //anything to fix bogus ISF - throw new InvalidOperationException(SR.Get(SRID.IsfOperationFailed)); + throw new InvalidOperationException(SR.IsfOperationFailed); } int hr = MS.Win32.Penimc.UnsafeNativeMethods.IsfCompressPropertyData(data, (uint)data.Length, ref algorithm, ref outputSize, output); if (0 != hr) @@ -306,7 +305,7 @@ internal static byte[] CompressPacketData( //we don't raise any information that could be used to attack our ISF code //a simple 'ISF Operation Failed' is sufficient since the user can't do //anything to fix bogus ISF - throw new InvalidOperationException(SR.Get(SRID.IsfOperationFailed)); + throw new InvalidOperationException(SR.IsfOperationFailed); } byte[] data = AlgoModule.CompressPacketData(input, algorithm); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/CustomAttributeSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/CustomAttributeSerializer.cs index 3eb63161e4c..552d1bc7946 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/CustomAttributeSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/CustomAttributeSerializer.cs @@ -20,7 +20,6 @@ using System.Windows.Media; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { @@ -305,7 +304,7 @@ internal static void EncodeAttribute(Guid guid, object value, VarEnum type, Stre } default: { - throw new InvalidOperationException(SR.Get(SRID.InvalidEpInIsf)); + throw new InvalidOperationException(SR.InvalidEpInIsf); } } #pragma warning restore 6518 @@ -426,7 +425,7 @@ internal static uint DecodeAsISF(Stream stream, uint cbSize, GuidList guidList, if (0 == cbSize) { - throw new InvalidOperationException(SR.Get(SRID.EmptyDataToLoad)); + throw new InvalidOperationException(SR.EmptyDataToLoad); } if (0 == tag) // no tag is passed, it must be embedded in the data @@ -435,7 +434,7 @@ internal static uint DecodeAsISF(Stream stream, uint cbSize, GuidList guidList, cb = SerializationHelper.Decode(stream, out uiTag); tag = (KnownTagCache.KnownTagIndex)uiTag; if (cb > cbTotal) - throw new ArgumentException(SR.Get(SRID.InvalidSizeSpecified), "cbSize"); + throw new ArgumentException(SR.InvalidSizeSpecified, "cbSize"); cbTotal -= cb; cbRead += cb; @@ -452,7 +451,7 @@ internal static uint DecodeAsISF(Stream stream, uint cbSize, GuidList guidList, uint size = GuidList.GetDataSizeIfKnownGuid(guid); if (size > cbTotal) - throw new ArgumentException(SR.Get(SRID.InvalidSizeSpecified), "cbSize"); + throw new ArgumentException(SR.InvalidSizeSpecified, "cbSize"); // if the size is 0 if (0 == size) @@ -701,7 +700,7 @@ internal static object DecodeAttribute(Guid guid, Stream memStream, out VarEnum } default: { - throw new InvalidOperationException(SR.Get(SRID.InvalidEpInIsf)); + throw new InvalidOperationException(SR.InvalidEpInIsf); } } } @@ -788,14 +787,14 @@ internal static void Validate(Guid id, object value) { if (id == Guid.Empty) { - throw new ArgumentException(SR.Get(SRID.InvalidGuid)); + throw new ArgumentException(SR.InvalidGuid); } if (id == KnownIds.Color) { if (!(value is System.Windows.Media.Color)) { - throw new ArgumentException(SR.Get(SRID.InvalidValueType, typeof(System.Windows.Media.Color)), "value"); + throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(System.Windows.Media.Color)), "value"); } } // int attributes @@ -803,7 +802,7 @@ internal static void Validate(Guid id, object value) { if (!(value.GetType() == typeof(int))) { - throw new ArgumentException(SR.Get(SRID.InvalidValueType, typeof(int)), "value"); + throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(int)), "value"); } } else if (id == KnownIds.DrawingFlags) @@ -811,7 +810,7 @@ internal static void Validate(Guid id, object value) // ignore validation of flags if (value.GetType() != typeof(DrawingFlags)) { - throw new ArgumentException(SR.Get(SRID.InvalidValueType, typeof(DrawingFlags)), "value"); + throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(DrawingFlags)), "value"); } } else if (id == KnownIds.StylusTip) @@ -822,11 +821,11 @@ internal static void Validate(Guid id, object value) if ( !fStylusTipType && !fIntType ) { - throw new ArgumentException(SR.Get(SRID.InvalidValueType1, typeof(StylusTip), typeof(int)), "value"); + throw new ArgumentException(SR.Format(SR.InvalidValueType1, typeof(StylusTip), typeof(int)), "value"); } else if ( !StylusTipHelper.IsDefined((StylusTip)value) ) { - throw new ArgumentException(SR.Get(SRID.InvalidValueOfType, value, typeof(StylusTip)), "value"); + throw new ArgumentException(SR.Format(SR.InvalidValueOfType, value, typeof(StylusTip)), "value"); } } else if (id == KnownIds.StylusTipTransform) @@ -837,22 +836,22 @@ internal static void Validate(Guid id, object value) Type t = value.GetType(); if ( t != typeof(String) && t != typeof(Matrix) ) { - throw new ArgumentException(SR.Get(SRID.InvalidValueType1, typeof(String), typeof(Matrix)), "value"); + throw new ArgumentException(SR.Format(SR.InvalidValueType1, typeof(String), typeof(Matrix)), "value"); } else if ( t == typeof(Matrix) ) { Matrix matrix = (Matrix)value; if ( !matrix.HasInverse ) { - throw new ArgumentException(SR.Get(SRID.MatrixNotInvertible), "value"); + throw new ArgumentException(SR.MatrixNotInvertible, "value"); } if ( MatrixHelper.ContainsNaN(matrix)) { - throw new ArgumentException(SR.Get(SRID.InvalidMatrixContainsNaN), "value"); + throw new ArgumentException(SR.InvalidMatrixContainsNaN, "value"); } if ( MatrixHelper.ContainsInfinity(matrix)) { - throw new ArgumentException(SR.Get(SRID.InvalidMatrixContainsInfinity), "value"); + throw new ArgumentException(SR.InvalidMatrixContainsInfinity, "value"); } } } @@ -860,14 +859,14 @@ internal static void Validate(Guid id, object value) { if ( value.GetType() != typeof(bool)) { - throw new ArgumentException(SR.Get(SRID.InvalidValueType, typeof(bool)), "value"); + throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(bool)), "value"); } } else if ( id == KnownIds.StylusHeight || id == KnownIds.StylusWidth ) { if ( value.GetType() != typeof(double) ) { - throw new ArgumentException(SR.Get(SRID.InvalidValueType, typeof(double)), "value"); + throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(double)), "value"); } double dVal = (double)value; @@ -876,14 +875,14 @@ internal static void Validate(Guid id, object value) { if ( Double.IsNaN(dVal) || dVal < DrawingAttributes.MinHeight || dVal > DrawingAttributes.MaxHeight) { - throw new ArgumentOutOfRangeException("value", SR.Get(SRID.InvalidDrawingAttributesHeight)); + throw new ArgumentOutOfRangeException("value", SR.InvalidDrawingAttributesHeight); } } else { if (Double.IsNaN(dVal) || dVal < DrawingAttributes.MinWidth || dVal > DrawingAttributes.MaxWidth) { - throw new ArgumentOutOfRangeException("value", SR.Get(SRID.InvalidDrawingAttributesWidth)); + throw new ArgumentOutOfRangeException("value", SR.InvalidDrawingAttributesWidth); } } } @@ -891,7 +890,7 @@ internal static void Validate(Guid id, object value) { if ( value.GetType() != typeof(byte) ) { - throw new ArgumentException(SR.Get(SRID.InvalidValueType, typeof(byte)), "value"); + throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(byte)), "value"); } double dVal = (double)value; @@ -904,7 +903,7 @@ internal static void Validate(Guid id, object value) // then it doesn't include embedded type information (it's always a byte array) if ( value.GetType() != typeof(byte[]) ) { - throw new ArgumentException(SR.Get(SRID.InvalidValueType, typeof(byte[])), "value"); + throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(byte[])), "value"); } } else @@ -964,12 +963,12 @@ internal static void Validate(Guid id, object value) catch (ArgumentException ex) { //catches bad char & char[] - throw new ArgumentException(SR.Get(SRID.InvalidDataInISF), ex); + throw new ArgumentException(SR.InvalidDataInISF, ex); } catch (OverflowException ex) { //catches bad DateTime - throw new ArgumentException(SR.Get(SRID.InvalidDataInISF), ex); + throw new ArgumentException(SR.InvalidDataInISF, ex); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GorillaCodec.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GorillaCodec.cs index 5a6ecb24308..266a98e27ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GorillaCodec.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/GorillaCodec.cs @@ -16,7 +16,6 @@ using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffCodec.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffCodec.cs index 1ae73d9fbcd..dcf50fffb72 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffCodec.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffCodec.cs @@ -16,7 +16,6 @@ using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffModule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffModule.cs index e8f2f420a94..2512f27fd10 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffModule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/HuffModule.cs @@ -15,7 +15,6 @@ using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/InkSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/InkSerializer.cs index fdb62ec318d..8fec30aa336 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/InkSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/InkSerializer.cs @@ -22,7 +22,6 @@ using MS.Internal.IO.Packaging; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { @@ -145,57 +144,57 @@ internal void DecodeISF(Stream inkData) catch (ArgumentException ex) { //only include an inner exception in debug builds - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), ex); + throw new ArgumentException(SR.IsfOperationFailed, ex); } catch (InvalidOperationException ex) { //only include an inner exception in debug builds - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), ex); + throw new ArgumentException(SR.IsfOperationFailed, ex); } catch (IndexOutOfRangeException ex) { //only include an inner exception in debug builds - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), ex); + throw new ArgumentException(SR.IsfOperationFailed, ex); } catch (NullReferenceException ex) { //only include an inner exception in debug builds - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), ex); + throw new ArgumentException(SR.IsfOperationFailed, ex); } catch (EndOfStreamException ex) { //only include an inner exception in debug builds - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), ex); + throw new ArgumentException(SR.IsfOperationFailed, ex); } catch (OverflowException ex) { //only include an inner exception in debug builds - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), ex); + throw new ArgumentException(SR.IsfOperationFailed, ex); } #else catch (ArgumentException) { - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), "stream");//stream comes from StrokeCollection.ctor() + throw new ArgumentException(SR.IsfOperationFailed, "stream");//stream comes from StrokeCollection.ctor() } catch (InvalidOperationException) { - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), "stream");//stream comes from StrokeCollection.ctor() + throw new ArgumentException(SR.IsfOperationFailed, "stream");//stream comes from StrokeCollection.ctor() } catch (IndexOutOfRangeException) { - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), "stream");//stream comes from StrokeCollection.ctor() + throw new ArgumentException(SR.IsfOperationFailed, "stream");//stream comes from StrokeCollection.ctor() } catch (NullReferenceException) { - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), "stream");//stream comes from StrokeCollection.ctor() + throw new ArgumentException(SR.IsfOperationFailed, "stream");//stream comes from StrokeCollection.ctor() } catch (EndOfStreamException) { - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), "stream");//stream comes from StrokeCollection.ctor() + throw new ArgumentException(SR.IsfOperationFailed, "stream");//stream comes from StrokeCollection.ctor() } catch (OverflowException) { - throw new ArgumentException(SR.Get(SRID.IsfOperationFailed), "stream");//stream comes from StrokeCollection.ctor() + throw new ArgumentException(SR.IsfOperationFailed, "stream");//stream comes from StrokeCollection.ctor() } #endif } @@ -355,7 +354,7 @@ private void DecodeRawISF(Stream inputStream) uint uiTag; uint localBytesDecoded = SerializationHelper.Decode(inputStream, out uiTag); if (0x00 != uiTag) - throw new ArgumentException(SR.Get(SRID.InvalidStream)); + throw new ArgumentException(SR.InvalidStream); // Now read the size of the stream localBytesDecoded = SerializationHelper.Decode(inputStream, out remainingBytesInStream); @@ -2700,7 +2699,7 @@ internal static string ISFDebugMessage(string debugMessage) #if DEBUG return debugMessage; #else - return SR.Get(SRID.IsfOperationFailed); + return SR.IsfOperationFailed; #endif } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/LZCodec.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/LZCodec.cs index f631d6451d0..8a34fcae217 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/LZCodec.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/LZCodec.cs @@ -17,7 +17,6 @@ using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MultiByteCodec.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MultiByteCodec.cs index eee670788d2..6296c7f3f95 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MultiByteCodec.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/MultiByteCodec.cs @@ -15,7 +15,6 @@ using System.Diagnostics; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/SerializationHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/SerializationHelper.cs index b8f9b02e28b..24c89d4cde4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/SerializationHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/SerializationHelper.cs @@ -9,7 +9,6 @@ using System.Windows; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink.InkSerializedFormat { @@ -326,7 +325,7 @@ public static VarEnum ConvertToVarEnum(Type type, bool throwOnError) { if (throwOnError) { - throw new ArgumentException(SR.Get(SRID.InvalidDataTypeForExtendedProperty)); + throw new ArgumentException(SR.InvalidDataTypeForExtendedProperty); } else { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Quad.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Quad.cs index ab7aa42575f..f1bd973b4a7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Quad.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Quad.cs @@ -12,7 +12,6 @@ using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Renderer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Renderer.cs index 3d8c4e18368..83181698e26 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Renderer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/Renderer.cs @@ -308,7 +308,7 @@ internal void AttachIncrementalRendering(Visual visual, DrawingAttributes drawin if (visual == alreadyAttachedVisual) { exceptionRaised = true; - throw new System.InvalidOperationException(SR.Get(SRID.CannotAttachVisualTwice)); + throw new System.InvalidOperationException(SR.CannotAttachVisualTwice); } } } @@ -347,7 +347,7 @@ internal void DetachIncrementalRendering(Visual visual) // Remove the visual in the list of attached via AttachIncrementalRendering if ((_attachedVisuals == null) || (_attachedVisuals.Remove(visual) == false)) { - throw new System.InvalidOperationException(SR.Get(SRID.VisualCannotBeDetached)); + throw new System.InvalidOperationException(SR.VisualCannotBeDetached); } // Detach it from the tree @@ -458,7 +458,7 @@ private void OnStrokesChanged(object sender, StrokeCollectionChangedEventArgs ev // Verify that it's not a dupe if (_visuals.ContainsKey(stroke)) { - throw new System.ArgumentException(SR.Get(SRID.DuplicateStrokeAdded)); + throw new System.ArgumentException(SR.DuplicateStrokeAdded); } // Create a visual for the new stroke and add it to the dictionary @@ -486,7 +486,7 @@ private void OnStrokesChanged(object sender, StrokeCollectionChangedEventArgs ev } else { - throw new System.ArgumentException(SR.Get(SRID.UnknownStroke3)); + throw new System.ArgumentException(SR.UnknownStroke3); } } } @@ -503,7 +503,7 @@ private void OnStrokeInvalidated(object sender, EventArgs eventArgs) Stroke stroke = (Stroke)sender; if (_visuals.TryGetValue(stroke, out visual) == false) { - throw new System.ArgumentException(SR.Get(SRID.UnknownStroke1)); + throw new System.ArgumentException(SR.UnknownStroke1); } // The original value of IsHighligher and Color are cached in StrokeVisual. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeFIndices.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeFIndices.cs index 0eb125a71d6..ce284adff90 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeFIndices.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeFIndices.cs @@ -11,7 +11,6 @@ using System.Globalization; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeEnumerator.cs index eb0606296e0..b55c017642c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeNodeEnumerator.cs @@ -13,7 +13,6 @@ using MS.Internal.Ink; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeRenderer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeRenderer.cs index 8a0687e21b5..b4ca0419db5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeRenderer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StrokeRenderer.cs @@ -13,7 +13,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal; using MS.Internal.PresentationCore; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StylusShape.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StylusShape.cs index a45485cc3c8..50b76c8614b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StylusShape.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/StylusShape.cs @@ -12,7 +12,6 @@ using MS.Internal.Ink; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Ink { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/VisualTreeUtils.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/VisualTreeUtils.cs index 4c7af80e49b..b9ff4a6e6db 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/VisualTreeUtils.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/VisualTreeUtils.cs @@ -11,7 +11,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Media { @@ -224,7 +223,7 @@ private static void EnsureVisual(DependencyObject element, bool allowNull) // Would DTypes be faster? if (!(element is Visual || element is Visual3D)) { - throw new ArgumentException(SR.Get(SRID.Visual_NotAVisual)); + throw new ArgumentException(SR.Visual_NotAVisual); } element.VerifyAccess(); @@ -261,7 +260,7 @@ internal static void AsVisual(DependencyObject element, out Visual visual, out V { if (!castSucceeded) { - throw new System.InvalidOperationException(SR.Get(SRID.Visual_NotAVisual, element.GetType())); + throw new System.InvalidOperationException(SR.Format(SR.Visual_NotAVisual, element.GetType())); } Debug.Assert(castSucceeded && ((visual == null) != (visual3D == null)), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/XamlSerializationHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/XamlSerializationHelper.cs index 50c4b4be675..e9d3b4a2d29 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/XamlSerializationHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media/XamlSerializationHelper.cs @@ -354,7 +354,7 @@ internal static double ReadDouble( BinaryReader reader ) return reader.ReadDouble(); default: - throw new ArgumentException(SR.Get(SRID.FloatUnknownBamlType)); + throw new ArgumentException(SR.FloatUnknownBamlType); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform2DTo3DTo2D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform2DTo3DTo2D.cs index 10c78ef9972..b429a97505c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform2DTo3DTo2D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Media3D/GeneralTransform2DTo3DTo2D.cs @@ -23,7 +23,6 @@ using MS.Internal.PresentationCore; using MS.Internal.Media3D; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/PartialArray.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/PartialArray.cs index b67dfdd01fd..faaf711424e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/PartialArray.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/PartialArray.cs @@ -17,7 +17,6 @@ using System.Collections.Generic; using System.Diagnostics; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal { @@ -74,12 +73,12 @@ public bool IsFixedSize public bool Remove(T item) { - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } public void RemoveAt(int index) { - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } public void Clear() @@ -89,12 +88,12 @@ public void Clear() public void Add(T item) { - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } public void Insert(int index, T item) { - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } public T this[int index] @@ -145,7 +144,7 @@ public void CopyTo(T[] array, int arrayIndex) if (array.Rank != 1) { throw new ArgumentException( - SR.Get(SRID.Collection_CopyTo_ArrayCannotBeMultidimensional), + SR.Collection_CopyTo_ArrayCannotBeMultidimensional, "array"); } @@ -157,8 +156,8 @@ public void CopyTo(T[] array, int arrayIndex) if (arrayIndex >= array.Length) { throw new ArgumentException( - SR.Get( - SRID.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, + SR.Format( + SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "arrayIndex", "array"), "arrayIndex"); @@ -167,8 +166,8 @@ public void CopyTo(T[] array, int arrayIndex) if ((array.Length - Count - arrayIndex) < 0) { throw new ArgumentException( - SR.Get( - SRID.Collection_CopyTo_NumberOfElementsExceedsArrayLength, + SR.Format( + SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, "arrayIndex", "array")); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeFontFamily.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeFontFamily.cs index dd4312b2db7..15c090346f0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeFontFamily.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Shaping/CompositeFontFamily.cs @@ -25,7 +25,6 @@ using MS.Internal.TextFormatting; using FontFamily = System.Windows.Media.FontFamily; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Shaping { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextBreakpoint.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextBreakpoint.cs index 49dcd3df01d..6af0c11e1bf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextBreakpoint.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextBreakpoint.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.TextFormatting @@ -118,7 +117,7 @@ out bestFitIndex else { // throw with LS error codes - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.CreateBreaksFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.CreateBreaksFailure, lserr), lserr); } } @@ -236,7 +235,7 @@ public override TextLineBreak GetTextLineBreak() { if (_isDisposed) { - throw new ObjectDisposedException(SR.Get(SRID.TextBreakpointHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextBreakpointHasBeenDisposed); } return _metrics.GetTextLineBreak(_ploline.Value); } @@ -254,13 +253,13 @@ internal override SecurityCriticalDataForSet GetTextPenaltyResource() { if (_isDisposed) { - throw new ObjectDisposedException(SR.Get(SRID.TextBreakpointHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextBreakpointHasBeenDisposed); } LsErr lserr = UnsafeNativeMethods.LoRelievePenaltyResource(_ploline.Value); if (lserr != LsErr.None) { - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.RelievePenaltyResourceFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.RelievePenaltyResourceFailure, lserr), lserr); } return _penaltyResource; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextLine.cs index 13f66f965cd..01428970d95 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/FullTextLine.cs @@ -23,7 +23,6 @@ using MS.Internal.Shaping; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.TextFormatting @@ -320,7 +319,7 @@ out lineWidths else { // throw with LS error codes - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.CreateLineFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.CreateLineFailure, lserr), lserr); } } @@ -554,7 +553,7 @@ InvertAxes inversion if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } MatrixTransform antiInversion = TextFormatterImp.CreateAntiInversionTransform( @@ -642,7 +641,7 @@ ref rect else { // throw with LS error codes - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.CreateLineFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.CreateLineFailure, lserr), lserr); } } @@ -715,7 +714,7 @@ params TextCollapsingProperties[] collapsingPropertiesList { if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } if ( !HasOverflowed @@ -829,7 +828,7 @@ public override IList GetTextCollapsedRanges() { if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } if (_collapsedRange == null) @@ -853,7 +852,7 @@ double distance { if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } return CharacterHitFromDistance(ParagraphUToLSLineU(TextFormatterImp.RealToIdeal(distance))); @@ -986,7 +985,7 @@ CharacterHit characterHit { if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } TextFormatterImp.VerifyCaretCharacterHit(characterHit, _cpFirst, _metrics._cchLength); @@ -1146,7 +1145,7 @@ CharacterHit characterHit { if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } TextFormatterImp.VerifyCaretCharacterHit(characterHit, _cpFirst, _metrics._cchLength); @@ -1239,7 +1238,7 @@ CaretDirection direction if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } TextFormatterImp.VerifyCaretCharacterHit(characterHit, _cpFirst, _metrics._cchLength); @@ -1499,12 +1498,12 @@ int textLength { if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } if(textLength == 0) { - throw new ArgumentOutOfRangeException("textLength", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("textLength", SR.ParameterMustBeGreaterThanZero); } if(textLength < 0) @@ -2071,7 +2070,7 @@ public override IList> GetTextRunSpans() { if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } if (_plsrunVector == null) @@ -2131,7 +2130,7 @@ public override IEnumerable GetIndexedGlyphRuns() { if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } IEnumerable result = null; @@ -2176,7 +2175,7 @@ ref point // starting point else { // throw with LS error codes - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.EnumLineFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.EnumLineFailure, lserr), lserr); } } } @@ -2195,7 +2194,7 @@ public override TextLineBreak GetTextLineBreak() { if ((_statusFlags & StatusFlags.IsDisposed) != 0) { - throw new ObjectDisposedException(SR.Get(SRID.TextLineHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextLineHasBeenDisposed); } if ((_statusFlags & StatusFlags.HasCollapsed) != 0) @@ -2481,7 +2480,7 @@ out lsTextCell if(lserr != LsErr.None) { - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.QueryLineFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.QueryLineFailure, lserr), lserr); } if (lsTextCell.lscpEndCell < lsTextCell.lscpStartCell) @@ -2538,7 +2537,7 @@ out lsTextCell if(lserr != LsErr.None) { - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.QueryLineFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.QueryLineFailure, lserr), lserr); } if (lsTextCell.lscpEndCell < lsTextCell.lscpStartCell) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesCallbacks.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesCallbacks.cs index b388f5a3ed1..100be53606b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesCallbacks.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesCallbacks.cs @@ -26,7 +26,6 @@ using MS.Internal.FontCache; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.Text.TextInterface; @@ -3418,7 +3417,7 @@ private void SaveException(Exception e, Plsrun plsrun, LSRun lsrun) private void SaveNonCLSException(string methodName, Plsrun plsrun, LSRun lsrun) { - Exception e = new System.Exception(SR.Get(SRID.NonCLSException)); + Exception e = new System.Exception(SR.NonCLSException); e.Data[ExceptionContext.Key] = new ExceptionContext(null, methodName, plsrun, lsrun); _exception = e; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesRun.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesRun.cs index 36ab300c777..8240b40b61d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesRun.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/LineServicesRun.cs @@ -19,7 +19,6 @@ using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.Text.TextInterface; @@ -931,7 +930,7 @@ out uint[] fontFeatureRanges { if (lsruns[i].RunProp.TypographyProperties != null) { - throw new ArgumentException(SR.Get(SRID.CompileFeatureSet_InvalidTypographyProperties)); + throw new ArgumentException(SR.CompileFeatureSet_InvalidTypographyProperties); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/SimpleTextLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/SimpleTextLine.cs index ece3562a11c..a73c2660014 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/SimpleTextLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/SimpleTextLine.cs @@ -22,7 +22,6 @@ using MS.Internal.FontCache; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.TextFormatting { @@ -813,7 +812,7 @@ int textLength { if (textLength == 0) { - throw new ArgumentOutOfRangeException("textLength", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("textLength", SR.ParameterMustBeGreaterThanZero); } if (textLength < 0) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextFormatterImp.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextFormatterImp.cs index 94a4e74de23..67968e84ecb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextFormatterImp.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextFormatterImp.cs @@ -23,7 +23,6 @@ using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.Shaping; using MS.Internal.Text.TextInterface; using MS.Internal.FontCache; @@ -398,7 +397,7 @@ TextRunCache textRunCache if (!settings.Pap.Wrap && settings.Pap.OptimalBreak) { // Optimal paragraph must wrap. - throw new ArgumentException(SR.Get(SRID.OptimalParagraphMustWrap)); + throw new ArgumentException(SR.OptimalParagraphMustWrap); } // create paragraph content cache object @@ -482,15 +481,15 @@ TextRunCache textRunCache throw new ArgumentNullException("paragraphProperties.DefaultTextRunProperties.Typeface"); if (double.IsNaN(paragraphWidth)) - throw new ArgumentOutOfRangeException("paragraphWidth", SR.Get(SRID.ParameterValueCannotBeNaN)); + throw new ArgumentOutOfRangeException("paragraphWidth", SR.ParameterValueCannotBeNaN); if (double.IsInfinity(paragraphWidth)) - throw new ArgumentOutOfRangeException("paragraphWidth", SR.Get(SRID.ParameterValueCannotBeInfinity)); + throw new ArgumentOutOfRangeException("paragraphWidth", SR.ParameterValueCannotBeInfinity); if ( paragraphWidth < 0 || paragraphWidth > Constants.RealInfiniteWidth) { - throw new ArgumentOutOfRangeException("paragraphWidth", SR.Get(SRID.ParameterMustBeBetween, 0, Constants.RealInfiniteWidth)); + throw new ArgumentOutOfRangeException("paragraphWidth", SR.Format(SR.ParameterMustBeBetween, 0, Constants.RealInfiniteWidth)); } double realMaxFontRenderingEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm; @@ -498,19 +497,19 @@ TextRunCache textRunCache if ( paragraphProperties.DefaultTextRunProperties.FontRenderingEmSize < 0 || paragraphProperties.DefaultTextRunProperties.FontRenderingEmSize > realMaxFontRenderingEmSize) { - throw new ArgumentOutOfRangeException("paragraphProperties.DefaultTextRunProperties.FontRenderingEmSize", SR.Get(SRID.ParameterMustBeBetween, 0, realMaxFontRenderingEmSize)); + throw new ArgumentOutOfRangeException("paragraphProperties.DefaultTextRunProperties.FontRenderingEmSize", SR.Format(SR.ParameterMustBeBetween, 0, realMaxFontRenderingEmSize)); } if (paragraphProperties.Indent > Constants.RealInfiniteWidth) - throw new ArgumentOutOfRangeException("paragraphProperties.Indent", SR.Get(SRID.ParameterCannotBeGreaterThan, Constants.RealInfiniteWidth)); + throw new ArgumentOutOfRangeException("paragraphProperties.Indent", SR.Format(SR.ParameterCannotBeGreaterThan, Constants.RealInfiniteWidth)); if (paragraphProperties.LineHeight > Constants.RealInfiniteWidth) - throw new ArgumentOutOfRangeException("paragraphProperties.LineHeight", SR.Get(SRID.ParameterCannotBeGreaterThan, Constants.RealInfiniteWidth)); + throw new ArgumentOutOfRangeException("paragraphProperties.LineHeight", SR.Format(SR.ParameterCannotBeGreaterThan, Constants.RealInfiniteWidth)); if ( paragraphProperties.DefaultIncrementalTab < 0 || paragraphProperties.DefaultIncrementalTab > Constants.RealInfiniteWidth) { - throw new ArgumentOutOfRangeException("paragraphProperties.DefaultIncrementalTab", SR.Get(SRID.ParameterMustBeBetween, 0, Constants.RealInfiniteWidth)); + throw new ArgumentOutOfRangeException("paragraphProperties.DefaultIncrementalTab", SR.Format(SR.ParameterMustBeBetween, 0, Constants.RealInfiniteWidth)); } } @@ -527,12 +526,12 @@ int cchLength if ( characterHit.FirstCharacterIndex < cpFirst || characterHit.FirstCharacterIndex > cpFirst + cchLength) { - throw new ArgumentOutOfRangeException("cpFirst", SR.Get(SRID.ParameterMustBeBetween, cpFirst, cpFirst + cchLength)); + throw new ArgumentOutOfRangeException("cpFirst", SR.Format(SR.ParameterMustBeBetween, cpFirst, cpFirst + cchLength)); } if (characterHit.TrailingLength < 0) { - throw new ArgumentOutOfRangeException("cchLength", SR.Get(SRID.ParameterCannotBeNegative)); + throw new ArgumentOutOfRangeException("cchLength", SR.ParameterCannotBeNegative); } } @@ -598,7 +597,7 @@ IntPtr ploc // This requirement is currently enforced only during optimal break computation. // Client implementing nesting of optimal break content inside another must create // a separate TextFormatter instance for each content in different nesting level. - throw new InvalidOperationException(SR.Get(SRID.TextFormatterReentranceProhibited)); + throw new InvalidOperationException(SR.TextFormatterReentranceProhibited); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMarkerSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMarkerSource.cs index 4e021426bbb..3704c0f3558 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMarkerSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMarkerSource.cs @@ -22,7 +22,6 @@ using MS.Internal; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMetrics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMetrics.cs index ffd53c5233c..ee70a789e2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMetrics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextMetrics.cs @@ -18,7 +18,6 @@ using MS.Internal.FontCache; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.TextFormatting @@ -309,7 +308,7 @@ internal TextLineBreak GetTextLineBreak(IntPtr ploline) if (lserr != LsErr.None) { - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.AcquireBreakRecordFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.AcquireBreakRecordFailure, lserr), lserr); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextPenaltyModule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextPenaltyModule.cs index a9c470e1f0e..c4c68cf782a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextPenaltyModule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextPenaltyModule.cs @@ -21,7 +21,6 @@ using MS.Internal.PresentationCore; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace MS.Internal.TextFormatting @@ -48,7 +47,7 @@ internal TextPenaltyModule(SecurityCriticalDataForSet ploc) LsErr lserr = UnsafeNativeMethods.LoAcquirePenaltyModule(ploc.Value, out ploPenaltyModule); if (lserr != LsErr.None) { - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.AcquirePenaltyModuleFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.AcquirePenaltyModuleFailure, lserr), lserr); } _ploPenaltyModule.Value = ploPenaltyModule; @@ -95,14 +94,14 @@ internal IntPtr DangerousGetHandle() { if (_isDisposed) { - throw new ObjectDisposedException(SR.Get(SRID.TextPenaltyModuleHasBeenDisposed)); + throw new ObjectDisposedException(SR.TextPenaltyModuleHasBeenDisposed); } IntPtr penaltyModuleInternalHandle; LsErr lserr = UnsafeNativeMethods.LoGetPenaltyModuleInternalHandle(_ploPenaltyModule.Value, out penaltyModuleInternalHandle); if (lserr != LsErr.None) - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.GetPenaltyModuleHandleFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.GetPenaltyModuleHandleFailure, lserr), lserr); GC.KeepAlive(this); return penaltyModuleInternalHandle; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextRunCacheImp.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextRunCacheImp.cs index 18b0a96edcd..d0db716c9eb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextRunCacheImp.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextRunCacheImp.cs @@ -18,7 +18,6 @@ using System.Windows.Media.TextFormatting; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.TextFormatting { @@ -121,7 +120,7 @@ out int runLength if (textRun.Length < 1) { - throw new ArgumentOutOfRangeException("textRun.Length", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("textRun.Length", SR.ParameterMustBeGreaterThanZero); } Plsrun plsrun = TextRunInfo.GetRunType(textRun); @@ -131,23 +130,23 @@ out int runLength TextRunProperties properties = textRun.Properties; if (properties == null) - throw new ArgumentException(SR.Get(SRID.TextRunPropertiesCannotBeNull)); + throw new ArgumentException(SR.TextRunPropertiesCannotBeNull); if (properties.FontRenderingEmSize <= 0) - throw new ArgumentException(SR.Get(SRID.PropertyOfClassMustBeGreaterThanZero, "FontRenderingEmSize", "TextRunProperties")); + throw new ArgumentException(SR.Format(SR.PropertyOfClassMustBeGreaterThanZero, "FontRenderingEmSize", "TextRunProperties")); double realMaxFontRenderingEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm; if (properties.FontRenderingEmSize > realMaxFontRenderingEmSize) - throw new ArgumentException(SR.Get(SRID.PropertyOfClassCannotBeGreaterThan, "FontRenderingEmSize", "TextRunProperties", realMaxFontRenderingEmSize)); + throw new ArgumentException(SR.Format(SR.PropertyOfClassCannotBeGreaterThan, "FontRenderingEmSize", "TextRunProperties", realMaxFontRenderingEmSize)); CultureInfo culture = CultureMapper.GetSpecificCulture(properties.CultureInfo); if (culture == null) - throw new ArgumentException(SR.Get(SRID.PropertyOfClassCannotBeNull, "CultureInfo", "TextRunProperties")); + throw new ArgumentException(SR.Format(SR.PropertyOfClassCannotBeNull, "CultureInfo", "TextRunProperties")); if (properties.Typeface == null) - throw new ArgumentException(SR.Get(SRID.PropertyOfClassCannotBeNull, "Typeface", "TextRunProperties")); + throw new ArgumentException(SR.Format(SR.PropertyOfClassCannotBeNull, "Typeface", "TextRunProperties")); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextStore.cs index 43adce81eed..60062c0925c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/TextStore.cs @@ -24,7 +24,6 @@ using MS.Internal.Generic; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.TextFormatting { @@ -2376,7 +2375,7 @@ int rightMargin else if (metrics.Width > _settings.Formatter.IdealToReal((Constants.IdealInfiniteWidth - currentPosition), _settings.TextSource.PixelsPerDip)) { // LS cannot compute value greater than its maximum computable value - throw new ArgumentException(SR.Get(SRID.TextObjectMetrics_WidthOutOfRange)); + throw new ArgumentException(SR.TextObjectMetrics_WidthOutOfRange); } _textObjectMetricsVector.SetReference(cpFirst, textObject.Length, metrics); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealDoubles.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealDoubles.cs index 362a0aa4ff8..a6e71c186fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealDoubles.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealDoubles.cs @@ -16,7 +16,6 @@ using System.Windows; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.TextFormatting { @@ -187,7 +186,7 @@ public void CopyTo(double[] array, int arrayIndex) if (array.Rank != 1) { throw new ArgumentException( - SR.Get(SRID.Collection_CopyTo_ArrayCannotBeMultidimensional), + SR.Collection_CopyTo_ArrayCannotBeMultidimensional, "array"); } @@ -199,8 +198,8 @@ public void CopyTo(double[] array, int arrayIndex) if (arrayIndex >= array.Length) { throw new ArgumentException( - SR.Get( - SRID.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, + SR.Format( + SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "arrayIndex", "array"), "arrayIndex"); @@ -209,8 +208,8 @@ public void CopyTo(double[] array, int arrayIndex) if ((array.Length - Count - arrayIndex) < 0) { throw new ArgumentException( - SR.Get( - SRID.Collection_CopyTo_NumberOfElementsExceedsArrayLength, + SR.Format( + SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, "arrayIndex", "array")); } @@ -240,25 +239,25 @@ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() public void Add(double value) { // not supported, same as double[] - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } public void Insert(int index, double item) { // not supported, same as double[] - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } public bool Remove(double item) { // not supported, same as double[] - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } public void RemoveAt(int index) { // not supported, same as double[] - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } //--------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealPoints.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealPoints.cs index cd6598787b4..d6560ca44af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealPoints.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/TextFormatting/ThousandthOfEmRealPoints.cs @@ -16,7 +16,6 @@ using System.Windows; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.TextFormatting { @@ -130,7 +129,7 @@ public void CopyTo(Point[] array, int arrayIndex) if (array.Rank != 1) { throw new ArgumentException( - SR.Get(SRID.Collection_CopyTo_ArrayCannotBeMultidimensional), + SR.Collection_CopyTo_ArrayCannotBeMultidimensional, "array"); } @@ -142,8 +141,8 @@ public void CopyTo(Point[] array, int arrayIndex) if (arrayIndex >= array.Length) { throw new ArgumentException( - SR.Get( - SRID.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, + SR.Format( + SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "arrayIndex", "array"), "arrayIndex"); @@ -152,8 +151,8 @@ public void CopyTo(Point[] array, int arrayIndex) if ((array.Length - Count - arrayIndex) < 0) { throw new ArgumentException( - SR.Get( - SRID.Collection_CopyTo_NumberOfElementsExceedsArrayLength, + SR.Format( + SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, "arrayIndex", "array")); } @@ -182,25 +181,25 @@ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() public void Add(Point value) { // not supported, same as Point[] - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } public void Insert(int index, Point item) { // not supported, same as Point[] - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } public bool Remove(Point item) { // not supported, same as Point[] - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } public void RemoveAt(int index) { // not supported, same as Point[] - throw new NotSupportedException(SR.Get(SRID.CollectionIsFixedSize)); + throw new NotSupportedException(SR.CollectionIsFixedSize); } //--------------------------------------------- diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WpfWebRequestHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WpfWebRequestHelper.cs index 2a7773ca647..51cd58b3f9e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WpfWebRequestHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/WpfWebRequestHelper.cs @@ -86,7 +86,7 @@ internal static WebRequest CreateRequest(Uri uri) // occurred. This is the default value for Status." Uri requestUri = BaseUriHelper.PackAppBaseUri.MakeRelativeUri(uri); throw new WebException(requestUri.ToString(), WebExceptionStatus.RequestCanceled); - //throw new IOException(SR.Get(SRID.GetResponseFailed, requestUri.ToString())); + //throw new IOException(SR.Format(SR.GetResponseFailed, requestUri.ToString())); } HttpWebRequest httpRequest = request as HttpWebRequest; @@ -209,7 +209,7 @@ internal static WebResponse GetResponse(WebRequest request) if (response == null) { Uri requestUri = BaseUriHelper.PackAppBaseUri.MakeRelativeUri(request.RequestUri); - throw new IOException(SR.Get(SRID.GetResponseFailed, requestUri.ToString())); + throw new IOException(SR.Format(SR.GetResponseFailed, requestUri.ToString())); } HandleWebResponse(response); @@ -226,7 +226,7 @@ internal static WebResponse EndGetResponse(WebRequest request, IAsyncResult ar) if (response == null) { Uri requestUri = BaseUriHelper.PackAppBaseUri.MakeRelativeUri(request.RequestUri); - throw new IOException(SR.Get(SRID.GetResponseFailed, requestUri.ToString())); + throw new IOException(SR.Format(SR.GetResponseFailed, requestUri.ToString())); } HandleWebResponse(response); return response; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj b/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj index 1a6371bc31f..113551ddcc2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/PresentationCore.csproj @@ -102,7 +102,6 @@ - diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/SR.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/SR.cs deleted file mode 100644 index e4f031db000..00000000000 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/SR.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Resources; - -namespace MS.Internal.PresentationCore -{ - internal static partial class SR - { - public static string Get(string name) - { - return GetResourceString(name, null); - } - - public static string Get(string name, params object[] args) - { - return Format(GetResourceString(name, null), args); - } - - // Remove properties below when this project uses properties for resources. - - /// MC3098: Unexpected token '{0}' at position '{1}'. - internal static string @Parser_UnexpectedToken => GetResourceString("Parser_UnexpectedToken"); - /// MC3096: Token is not valid. - internal static string @Parsers_IllegalToken => GetResourceString("Parsers_IllegalToken"); - /// Unknown path operation attempted. - internal static string @UnknownPathOperationType => GetResourceString("UnknownPathOperationType"); - } -} diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequest.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequest.cs index fabfc8457a7..dd23d52db77 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequest.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequest.cs @@ -20,7 +20,7 @@ using System.Diagnostics; // For Assert using MS.Utility; // for EventTrace using MS.Internal.IO.Packaging; // for PackageCacheEntry -using MS.Internal.PresentationCore; // for SRID exception strings +using MS.Internal.PresentationCore; // for SR exception strings using System.Security; // for SecurityCritical using MS.Internal; @@ -137,7 +137,7 @@ public override WebResponse GetResponse() { // only use cached value if (!cachedPackageAvailable) - throw new WebException(SR.Get(SRID.ResourceNotFoundUnderCacheOnlyPolicy)); + throw new WebException(SR.ResourceNotFoundUnderCacheOnlyPolicy); } break; case RequestCacheLevel.CacheIfAvailable: @@ -147,7 +147,7 @@ public override WebResponse GetResponse() default: { - throw new WebException(SR.Get(SRID.PackWebRequestCachePolicyIllegal)); + throw new WebException(SR.PackWebRequestCachePolicyIllegal); } } } @@ -168,7 +168,7 @@ public override WebResponse GetResponse() // only return a real WebRequest instance - throw on a PseudoWebRequest WebRequest request = GetRequest(false); if (_webRequest == null || _webRequest is PseudoWebRequest) - throw new InvalidOperationException(SR.Get(SRID.SchemaInvalidForTransport)); + throw new InvalidOperationException(SR.SchemaInvalidForTransport); #if DEBUG if (PackWebRequestFactory._traceSwitch.Enabled) @@ -213,7 +213,7 @@ public override RequestCachePolicy CachePolicy case RequestCacheLevel.CacheOnly: break; case RequestCacheLevel.CacheIfAvailable: break; default: - throw new WebException(SR.Get(SRID.PackWebRequestCachePolicyIllegal)); + throw new WebException(SR.PackWebRequestCachePolicyIllegal); } _cachePolicy = value; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequestFactory.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequestFactory.cs index 7fa6736511d..f72b4f95fff 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequestFactory.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebRequestFactory.cs @@ -57,12 +57,12 @@ WebRequest IWebRequestCreate.Create(Uri uri) // Ensure uri is absolute - if we don't check now, the get_Scheme property will throw // InvalidOperationException which would be misleading to the caller. if (!uri.IsAbsoluteUri) - throw new ArgumentException(SR.Get(SRID.UriMustBeAbsolute), "uri"); + throw new ArgumentException(SR.UriMustBeAbsolute, "uri"); // Ensure uri is correct scheme because we can be called directly. Case sensitive // is fine because Uri.Scheme contract is to return in lower case only. if (!string.Equals(uri.Scheme, PackUriHelper.UriSchemePack, StringComparison.Ordinal)) - throw new ArgumentException(SR.Get(SRID.UriSchemeMismatch, PackUriHelper.UriSchemePack), "uri"); + throw new ArgumentException(SR.Format(SR.UriSchemeMismatch, PackUriHelper.UriSchemePack), "uri"); #if DEBUG if (_traceSwitch.Enabled) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebResponse.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebResponse.cs index 1856eb5c896..d03d2f17a7f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebResponse.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackWebResponse.cs @@ -247,7 +247,7 @@ public override Stream GetResponseStream() // open container on netStream Package c = Package.Open(_responseStream); if (!c.PartExists(_partName)) - throw new WebException(SR.Get(SRID.WebResponsePartNotFound)); + throw new WebException(SR.WebResponsePartNotFound); PackagePart p = c.GetPart(_partName); @@ -868,7 +868,7 @@ private void WaitForResponse() if (_responseError) { if (_responseException == null) - throw new WebException(SR.Get(SRID.WebResponseFailure)); + throw new WebException(SR.WebResponseFailure); else throw _responseException; // throw literal exception if there is one } @@ -906,7 +906,7 @@ private void TimeoutCallback(Object stateInfo) // create exception to be thrown on client thread, then unblock the caller // thread will be discovered and re-thrown in WaitForResponse() method _responseError = true; - _responseException = new WebException(SR.Get(SRID.WebRequestTimeout, null), WebExceptionStatus.Timeout); + _responseException = new WebException(SR.Format(SR.WebRequestTimeout, null), WebExceptionStatus.Timeout); } #if DEBUG else diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackageStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackageStore.cs index 5fa28c27d67..109f134485c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackageStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/IO/Packaging/PackageStore.cs @@ -99,7 +99,7 @@ public static void AddPackage(Uri uri, Package package) if (PackUriHelper.ComparePackUri(packUri, BaseUriHelper.PackAppBaseUri) == 0 || PackUriHelper.ComparePackUri(packUri, BaseUriHelper.SiteOfOriginBaseUri) == 0) { - throw new ArgumentException(SR.Get(SRID.NotAllowedPackageUri), nameof(uri)); + throw new ArgumentException(SR.NotAllowedPackageUri, nameof(uri)); } if (package == null) @@ -116,7 +116,7 @@ public static void AddPackage(Uri uri, Package package) if (_packages.Contains(uri)) { - throw new InvalidOperationException(SR.Get(SRID.PackageAlreadyExists)); + throw new InvalidOperationException(SR.PackageAlreadyExists); } _packages.Add(uri, package); @@ -157,7 +157,7 @@ private static void ValidatePackageUri(Uri uri) if (!uri.IsAbsoluteUri) { - throw new ArgumentException(SR.Get(SRID.UriMustBeAbsolute), "uri"); + throw new ArgumentException(SR.UriMustBeAbsolute, "uri"); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs index fb7854bc8f8..2b275cb0653 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/AutomationPeer.cs @@ -23,7 +23,6 @@ using MS.Win32; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Automation.Peers { @@ -756,7 +755,7 @@ virtual internal Rect GetVisibleBoundingRectCore() public Rect GetBoundingRectangle() { if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -774,7 +773,7 @@ public Rect GetBoundingRectangle() public bool IsOffscreen() { if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -794,7 +793,7 @@ public AutomationOrientation GetOrientation() AutomationOrientation result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -814,7 +813,7 @@ public string GetItemType() string result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -834,7 +833,7 @@ public string GetClassName() string result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -852,7 +851,7 @@ public string GetClassName() public string GetItemStatus() { if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -872,7 +871,7 @@ public bool IsRequiredForForm() bool result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -892,7 +891,7 @@ public bool IsKeyboardFocusable() bool result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -911,7 +910,7 @@ public bool HasKeyboardFocus() { bool result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -929,7 +928,7 @@ public bool HasKeyboardFocus() public bool IsEnabled() { if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -949,7 +948,7 @@ public bool IsPassword() bool result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -969,7 +968,7 @@ public string GetAutomationId() string result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -987,7 +986,7 @@ public string GetAutomationId() public string GetName() { if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1007,7 +1006,7 @@ public AutomationControlType GetAutomationControlType() AutomationControlType result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1027,7 +1026,7 @@ public string GetLocalizedControlType() string result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1047,7 +1046,7 @@ public bool IsContentElement() bool result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1071,7 +1070,7 @@ public bool IsControlElement() bool result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1096,7 +1095,7 @@ public AutomationPeer GetLabeledBy() AutomationPeer result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1116,7 +1115,7 @@ public string GetHelpText() string result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1136,7 +1135,7 @@ public string GetAcceleratorKey() string result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1156,7 +1155,7 @@ public string GetAccessKey() string result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1176,7 +1175,7 @@ public Point GetClickablePoint() Point result; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1201,7 +1200,7 @@ public Point GetClickablePoint() public void SetFocus() { if (_publicSetFocusInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1219,7 +1218,7 @@ public AutomationLiveSetting GetLiveSetting() { AutomationLiveSetting result = AutomationLiveSetting.Off; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1243,7 +1242,7 @@ public List GetControlledPeers() { List result = null; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1295,7 +1294,7 @@ public int GetSizeOfSet() int result = AutomationProperties.AutomationSizeOfSetDefault; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1323,7 +1322,7 @@ public AutomationHeadingLevel GetHeadingLevel() AutomationHeadingLevel result = AutomationHeadingLevel.None; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1393,7 +1392,7 @@ public bool IsDialog() { bool result = false; if(_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1421,7 +1420,7 @@ public int GetPositionInSet() int result = AutomationProperties.AutomationPositionInSetDefault; if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { @@ -1445,7 +1444,7 @@ public AutomationPeer GetParent() public List GetChildren() { if (_publicCallInProgress) - throw new InvalidOperationException(SR.Get(SRID.Automation_RecursivePublicCall)); + throw new InvalidOperationException(SR.Automation_RecursivePublicCall); try { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/ContentElementAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/ContentElementAutomationPeer.cs index 95441e38450..8f003936154 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/ContentElementAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/ContentElementAutomationPeer.cs @@ -318,7 +318,7 @@ override protected Point GetClickablePointCore() override protected void SetFocusCore() { if (!_owner.Focus()) - throw new InvalidOperationException(SR.Get(SRID.SetFocusFailed)); + throw new InvalidOperationException(SR.SetFocusFailed); } /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElement3DAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElement3DAutomationPeer.cs index e8727abeb04..42868d50c02 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElement3DAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElement3DAutomationPeer.cs @@ -12,7 +12,6 @@ using MS.Internal; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Automation; using System.Windows.Automation.Provider; using MS.Internal.Automation; @@ -425,7 +424,7 @@ override protected Point GetClickablePointCore() override protected void SetFocusCore() { if (!_owner.Focus()) - throw new InvalidOperationException(SR.Get(SRID.SetFocusFailed)); + throw new InvalidOperationException(SR.SetFocusFailed); } /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElementAutomationPeer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElementAutomationPeer.cs index baab86741a9..0d9d83d67bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElementAutomationPeer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Automation/Peers/UIElementAutomationPeer.cs @@ -15,7 +15,6 @@ using MS.Internal; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Automation.Peers { @@ -537,7 +536,7 @@ override protected Point GetClickablePointCore() override protected void SetFocusCore() { if (!_owner.Focus()) - throw new InvalidOperationException(SR.Get(SRID.SetFocusFailed)); + throw new InvalidOperationException(SR.SetFocusFailed); } private UIElement _owner; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ContentElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ContentElement.cs index 756a0462029..e545841820e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ContentElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/ContentElement.cs @@ -22,7 +22,6 @@ using System.Windows.Threading; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CoreCompatibilityPreferences.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CoreCompatibilityPreferences.cs index e024c097b6d..8e083bbbc46 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CoreCompatibilityPreferences.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/CoreCompatibilityPreferences.cs @@ -67,7 +67,7 @@ public static bool IsAltKeyRequiredInAccessKeyDefaultScope { if (_isSealed) { - throw new InvalidOperationException(SR.Get(SRID.CompatibilityPreferencesSealed, "IsAltKeyRequiredInAccessKeyDefaultScope", "CoreCompatibilityPreferences")); + throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "IsAltKeyRequiredInAccessKeyDefaultScope", "CoreCompatibilityPreferences")); } _isAltKeyRequiredInAccessKeyDefaultScope = value; @@ -107,7 +107,7 @@ internal static bool IncludeAllInkInBoundingBox { if (_isSealed) { - throw new InvalidOperationException(SR.Get(SRID.CompatibilityPreferencesSealed, "IncludeAllInkInBoundingBox", "CoreCompatibilityPreferences")); + throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "IncludeAllInkInBoundingBox", "CoreCompatibilityPreferences")); } _includeAllInkInBoundingBox = value; @@ -148,7 +148,7 @@ public static bool? EnableMultiMonitorDisplayClipping { if(_isSealed) { - throw new InvalidOperationException(SR.Get(SRID.CompatibilityPreferencesSealed, "DisableMultimonDisplayClipping", "CoreCompatibilityPreferences")); + throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "DisableMultimonDisplayClipping", "CoreCompatibilityPreferences")); } _enableMultiMonitorDisplayClipping = value; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormat.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormat.cs index 10c8228f3df..805d614bf24 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormat.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormat.cs @@ -41,7 +41,7 @@ public DataFormat(string name, int id) if (name.Length == 0) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } this._name = name; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormats.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormats.cs index ce009a905f9..634516dc92d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormats.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataFormats.cs @@ -61,7 +61,7 @@ public static DataFormat GetDataFormat(string format) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } // Ensures the predefined Win32 data formats into our format list. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectPastingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectPastingEventArgs.cs index c34a459d1ad..608744fb1a5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectPastingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DataObjectPastingEventArgs.cs @@ -10,7 +10,6 @@ using System; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -69,12 +68,12 @@ public DataObjectPastingEventArgs(IDataObject dataObject, bool isDragDrop, strin if (formatToApply == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } if (!dataObject.GetDataPresent(formatToApply)) { - throw new ArgumentException(SR.Get(SRID.DataObject_DataFormatNotPresentOnDataObject, formatToApply)); + throw new ArgumentException(SR.Format(SR.DataObject_DataFormatNotPresentOnDataObject, formatToApply)); } _originalDataObject = dataObject; @@ -145,7 +144,7 @@ public IDataObject DataObject availableFormats = value.GetFormats(/*autoConvert:*/false); if (availableFormats == null || availableFormats.Length == 0) { - throw new ArgumentException(SR.Get(SRID.DataObject_DataObjectMustHaveAtLeastOneFormat)); + throw new ArgumentException(SR.DataObject_DataObjectMustHaveAtLeastOneFormat); } _dataObject = value; @@ -177,7 +176,7 @@ public string FormatToApply if (!_dataObject.GetDataPresent(value)) { - throw new ArgumentException(SR.Get(SRID.DataObject_DataFormatNotPresentOnDataObject, value)); + throw new ArgumentException(SR.Format(SR.DataObject_DataFormatNotPresentOnDataObject, value)); } _formatToApply = value; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualDiagnostics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualDiagnostics.cs index 582610a7d47..ba00a439c7c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualDiagnostics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Diagnostics/VisualDiagnostics.cs @@ -15,7 +15,6 @@ using System.Windows.Media; using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Diagnostics { @@ -217,7 +216,7 @@ private static void VerifyVisualTreeChangeCore(DependencyObject d) { if (!EnableHelper.AllowChangesDuringVisualTreeChanged(d)) { - throw new InvalidOperationException(SR.Get(SRID.ReentrantVisualTreeChangeError, nameof(VisualTreeChanged))); + throw new InvalidOperationException(SR.Format(SR.ReentrantVisualTreeChangeError, nameof(VisualTreeChanged))); } } } @@ -258,7 +257,7 @@ static EnableHelper() internal static void EnableVisualTreeChanged() { if (!IsEnableVisualTreeChangedAllowed) - throw new InvalidOperationException(SR.Get(SRID.MethodCallNotAllowed, nameof(VisualDiagnostics.EnableVisualTreeChanged))); + throw new InvalidOperationException(SR.Format(SR.MethodCallNotAllowed, nameof(VisualDiagnostics.EnableVisualTreeChanged))); s_IsVisualTreeChangedEnabled = true; } @@ -292,7 +291,7 @@ internal static bool AllowChangesDuringVisualTreeChanged(DependencyObject d) { // user wants to allow re-entrant changes, and this is the first one. // Issue a warning to debug output - System.Diagnostics.Debug.WriteLine(SR.Get(SRID.ReentrantVisualTreeChangeWarning, nameof(VisualTreeChanged))); + System.Diagnostics.Debug.WriteLine(SR.Format(SR.ReentrantVisualTreeChangeWarning, nameof(VisualTreeChanged))); } return (s_AllowChangesDuringVisualTreeChanged == true); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DocumentPaginator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DocumentPaginator.cs index 1d3fb81a1f3..53b88fdb51d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DocumentPaginator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DocumentPaginator.cs @@ -13,7 +13,7 @@ using System.ComponentModel; // AsyncCompletedEventArgs using System.Windows.Media; // Visual -using MS.Internal.PresentationCore; // SR, SRID +using MS.Internal.PresentationCore; // SR namespace System.Windows.Documents { @@ -76,7 +76,7 @@ public virtual void GetPageAsync(int pageNumber, object userState) // Page number cannot be negative. if (pageNumber < 0) { - throw new ArgumentOutOfRangeException("pageNumber", SR.Get(SRID.PaginatorNegativePageNumber)); + throw new ArgumentOutOfRangeException("pageNumber", SR.PaginatorNegativePageNumber); } page = GetPage(pageNumber); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DynamicDocumentPaginator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DynamicDocumentPaginator.cs index e0cd4441835..5c854519bf7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DynamicDocumentPaginator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Documents/DynamicDocumentPaginator.cs @@ -12,7 +12,7 @@ // using System.ComponentModel; // AsyncCompletedEventArgs -using MS.Internal.PresentationCore; // SR, SRID +using MS.Internal.PresentationCore; // SR namespace System.Windows.Documents { @@ -78,7 +78,7 @@ public virtual void GetPageNumberAsync(ContentPosition contentPosition, object u // Content position cannot be Missing. if (contentPosition == ContentPosition.Missing) { - throw new ArgumentException(SR.Get(SRID.PaginatorMissingContentPosition), "contentPosition"); + throw new ArgumentException(SR.PaginatorMissingContentPosition, "contentPosition"); } pageNumber = GetPageNumber(contentPosition); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDrop.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDrop.cs index f0e98bc0f5c..91ac79be791 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDrop.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragDrop.cs @@ -25,7 +25,6 @@ using System.Windows.Media; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; namespace System.Windows @@ -405,7 +404,7 @@ public static DragDropEffects DoDragDrop(DependencyObject dragSource, object dat } else { - throw new ArgumentException(SR.Get(SRID.ScopeMustBeUIElementOrContent), "dragSource"); + throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "dragSource"); } dataObject = data as DataObject; @@ -436,7 +435,7 @@ public static DragDropEffects DoDragDrop(DependencyObject dragSource, object dat } else { - throw new ArgumentException(SR.Get(SRID.ScopeMustBeUIElementOrContent), "dragSource"); + throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "dragSource"); } return ret; @@ -721,7 +720,7 @@ private void RaiseQueryContinueDragEvent(QueryContinueDragEventArgs args) } else { - throw new ArgumentException(SR.Get(SRID.ScopeMustBeUIElementOrContent), "scope"); + throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); } // Set QueryContinueDrag(Bubble). @@ -744,7 +743,7 @@ private void RaiseQueryContinueDragEvent(QueryContinueDragEventArgs args) } else { - throw new ArgumentException(SR.Get(SRID.ScopeMustBeUIElementOrContent), "scope"); + throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); } } @@ -778,7 +777,7 @@ private void RaiseGiveFeedbackEvent(GiveFeedbackEventArgs args) } else { - throw new ArgumentException(SR.Get(SRID.ScopeMustBeUIElementOrContent), "scope"); + throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); } // Set GiveFeedback event ID(Bubble). @@ -801,7 +800,7 @@ private void RaiseGiveFeedbackEvent(GiveFeedbackEventArgs args) } else { - throw new ArgumentException(SR.Get(SRID.ScopeMustBeUIElementOrContent), "scope"); + throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); } } @@ -1180,7 +1179,7 @@ private void RaiseDragEvent(RoutedEvent dragEvent, int dragDropKeyStates, ref in } else { - throw new ArgumentException(SR.Get(SRID.ScopeMustBeUIElementOrContent), "scope"); + throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); } // Raise the bubble DragEvent event if the preview DragEvent isn't handled. @@ -1204,7 +1203,7 @@ private void RaiseDragEvent(RoutedEvent dragEvent, int dragDropKeyStates, ref in } else { - throw new ArgumentException(SR.Get(SRID.ScopeMustBeUIElementOrContent), "scope"); + throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventArgs.cs index 3c08eb15419..7d4080ca3a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/DragEventArgs.cs @@ -16,7 +16,6 @@ using System.Windows.Input; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -162,7 +161,7 @@ public DragDropEffects Effects { if (!DragDrop.IsValidDragDropEffects(value)) { - throw new ArgumentException(SR.Get(SRID.DragDrop_DragDropEffectsInvalid, "value")); + throw new ArgumentException(SR.Format(SR.DragDrop_DragDropEffectsInvalid, "value")); } _effects = value; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Duration.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Duration.cs index 0af60acbdbe..f9bb9bc046c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Duration.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Duration.cs @@ -10,7 +10,6 @@ using System.ComponentModel; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -32,7 +31,7 @@ public Duration(TimeSpan timeSpan) { if (timeSpan < TimeSpan.Zero) { - throw new ArgumentException(SR.Get(SRID.Timing_InvalidArgNonNegative), "timeSpan"); + throw new ArgumentException(SR.Timing_InvalidArgNonNegative, "timeSpan"); } _durationType = DurationType.TimeSpan; _timeSpan = timeSpan; @@ -58,7 +57,7 @@ public static implicit operator Duration(TimeSpan timeSpan) { if (timeSpan < TimeSpan.Zero) { - throw new ArgumentException(SR.Get(SRID.Timing_InvalidArgNonNegative), "timeSpan"); + throw new ArgumentException(SR.Timing_InvalidArgNonNegative, "timeSpan"); } return new Duration(timeSpan); } @@ -404,7 +403,7 @@ public TimeSpan TimeSpan else { #pragma warning suppress 56503 // Suppress presharp warning: Follows a pattern similar to Nullable. - throw new InvalidOperationException(SR.Get(SRID.Timing_NotTimeSpan, this)); + throw new InvalidOperationException(SR.Format(SR.Timing_NotTimeSpan, this)); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventHandlersStore.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventHandlersStore.cs index f2d72a257da..f31b0916b0c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventHandlersStore.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventHandlersStore.cs @@ -11,7 +11,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -176,7 +175,7 @@ public void AddRoutedEventHandler( } if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } // Create a new RoutedEventHandler @@ -216,7 +215,7 @@ public void RemoveRoutedEventHandler(RoutedEvent routedEvent, Delegate handler) } if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } // Get the entry corresponding to the given RoutedEvent diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventManager.cs index 25c0654ed11..353c625bde5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventManager.cs @@ -7,7 +7,6 @@ using MS.Internal.PresentationCore; using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -84,7 +83,7 @@ public static RoutedEvent RegisterRoutedEvent( if (GlobalEventManager.GetRoutedEventFromName(name, ownerType, false) != null) { - throw new ArgumentException(SR.Get(SRID.DuplicateEventName, name, ownerType)); + throw new ArgumentException(SR.Format(SR.DuplicateEventName, name, ownerType)); } return GlobalEventManager.RegisterRoutedEvent(name, routingStrategy, handlerType, ownerType); @@ -182,12 +181,12 @@ public static void RegisterClassHandler( !typeof(ContentElement).IsAssignableFrom(classType) && !typeof(UIElement3D).IsAssignableFrom(classType)) { - throw new ArgumentException(SR.Get(SRID.ClassTypeIllegal)); + throw new ArgumentException(SR.ClassTypeIllegal); } if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } GlobalEventManager.RegisterClassHandler(classType, routedEvent, handler, handledEventsToo); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs index b10e199e26f..31419b022c7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/EventRoute.cs @@ -9,7 +9,6 @@ using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal; namespace System.Windows @@ -147,12 +146,12 @@ private void InvokeHandlersImpl(object source, RoutedEventArgs args, bool reRais if (args.Source == null) { - throw new ArgumentException(SR.Get(SRID.SourceNotSet)); + throw new ArgumentException(SR.SourceNotSet); } if (args.RoutedEvent != _routedEvent) { - throw new ArgumentException(SR.Get(SRID.Mismatched_RoutedEvent)); + throw new ArgumentException(SR.Mismatched_RoutedEvent); } // Check RoutingStrategy to know the order of invocation diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretch.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretch.cs index 9789351e78d..b9ea67325a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretch.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretch.cs @@ -14,7 +14,6 @@ using MS.Internal; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -45,7 +44,7 @@ internal FontStretch(int stretch) public static FontStretch FromOpenTypeStretch(int stretchValue) { if (stretchValue < 1 || stretchValue > 9) - throw new ArgumentOutOfRangeException("stretchValue", SR.Get(SRID.ParameterMustBeBetween, 1, 9)); + throw new ArgumentOutOfRangeException("stretchValue", SR.Format(SR.ParameterMustBeBetween, 1, 9)); return new FontStretch(stretchValue); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretchConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretchConverter.cs index 1c2056c9f22..0cf03004841 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretchConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStretchConverter.cs @@ -21,7 +21,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -79,12 +78,12 @@ public override object ConvertFrom(ITypeDescriptorContext td, CultureInfo ci, ob if (null == s) { - throw new ArgumentException(SR.Get(SRID.General_BadType, "ConvertFrom"), "value"); + throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value"); } FontStretch fontStretch = new FontStretch(); if (!FontStretches.FontStretchStringToKnownStretch(s, ci, ref fontStretch)) - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); return fontStretch; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyleConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyleConverter.cs index b535d5c18a6..9b3a3979982 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyleConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontStyleConverter.cs @@ -21,7 +21,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -79,12 +78,12 @@ public override object ConvertFrom(ITypeDescriptorContext td, CultureInfo ci, ob if (null == s) { - throw new ArgumentException(SR.Get(SRID.General_BadType, "ConvertFrom"), "value"); + throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value"); } FontStyle fontStyle = new FontStyle(); if (!FontStyles.FontStyleStringToKnownStyle(s, ci, ref fontStyle)) - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); return fontStyle; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeight.cs index fa94b8c647c..d3a550d5fef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeight.cs @@ -13,7 +13,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -43,7 +42,7 @@ internal FontWeight(int weight) public static FontWeight FromOpenTypeWeight(int weightValue) { if (weightValue < 1 || weightValue > 999) - throw new ArgumentOutOfRangeException("weightValue", SR.Get(SRID.ParameterMustBeBetween, 1, 999)); + throw new ArgumentOutOfRangeException("weightValue", SR.Format(SR.ParameterMustBeBetween, 1, 999)); return new FontWeight(weightValue); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeightConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeightConverter.cs index a6334656867..4aeb36215ec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeightConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FontWeightConverter.cs @@ -21,7 +21,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -79,12 +78,12 @@ public override object ConvertFrom(ITypeDescriptorContext td, CultureInfo ci, ob if (null == s) { - throw new ArgumentException(SR.Get(SRID.General_BadType, "ConvertFrom"), "value"); + throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value"); } FontWeight fontWeight = new FontWeight(); if (!FontWeights.FontWeightStringToKnownWeight(s, ci, ref fontWeight)) - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); return fontWeight; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FreezableCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FreezableCollection.cs index 6f00961b46d..04ff51446aa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FreezableCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/FreezableCollection.cs @@ -37,7 +37,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -107,7 +106,7 @@ public FreezableCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); @@ -224,7 +223,7 @@ public void Insert(int index, T value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } CheckReentrancy(); @@ -341,7 +340,7 @@ public T this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } CheckReentrancy(); @@ -522,7 +521,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -537,7 +536,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -683,7 +682,7 @@ private T Cast(object value) if (!(value is T)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "T")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "T")); } return (T) value; @@ -739,7 +738,7 @@ internal int AddWithoutFiringPublicEvents(T value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); T newValue = value; @@ -798,7 +797,7 @@ private void OnCollectionChanged(NotifyCollectionChangedAction action, args = new NotifyCollectionChangedEventArgs(action, newValue, oldValue, newIndex); break; default: - throw new InvalidOperationException(SR.Get(SRID.Freezable_UnexpectedChange)); + throw new InvalidOperationException(SR.Freezable_UnexpectedChange); } OnCollectionChanged(args); @@ -870,7 +869,7 @@ private void CloneCommon(FreezableCollection source, if (newValue == null) { - throw new InvalidOperationException(SR.Get(SRID.Freezable_CloneInvalidType, typeof(T).Name)); + throw new InvalidOperationException(SR.Format(SR.Freezable_CloneInvalidType, typeof(T).Name)); } } @@ -977,7 +976,7 @@ private void CheckReentrancy() { if (_monitor.Busy) { - throw new InvalidOperationException(SR.Get(SRID.Freezable_Reentrant)); + throw new InvalidOperationException(SR.Freezable_Reentrant); } } @@ -1066,7 +1065,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -1084,7 +1083,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -1118,12 +1117,12 @@ public T Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/ContentElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/ContentElement.cs index d0116fd1d88..45e9cba609c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/ContentElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/ContentElement.cs @@ -80,7 +80,7 @@ public void ApplyAnimationClock( if (!AnimationStorage.IsPropertyAnimatable(this, dp)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); + throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); #pragma warning restore 56506 } @@ -88,18 +88,18 @@ public void ApplyAnimationClock( && !AnimationStorage.IsAnimationValid(dp, clock.Timeline)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); + throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); #pragma warning restore 56506 } if (!HandoffBehaviorEnum.IsDefined(handoffBehavior)) { - throw new ArgumentException(SR.Get(SRID.Animation_UnrecognizedHandoffBehavior)); + throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); } if (IsSealed) { - throw new InvalidOperationException(SR.Get(SRID.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); + throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); } AnimationStorage.ApplyAnimationClock(this, dp, clock, handoffBehavior); @@ -152,24 +152,24 @@ public void BeginAnimation(DependencyProperty dp, AnimationTimeline animation, H if (!AnimationStorage.IsPropertyAnimatable(this, dp)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); + throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); #pragma warning restore 56506 } if ( animation != null && !AnimationStorage.IsAnimationValid(dp, animation)) { - throw new ArgumentException(SR.Get(SRID.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); + throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); } if (!HandoffBehaviorEnum.IsDefined(handoffBehavior)) { - throw new ArgumentException(SR.Get(SRID.Animation_UnrecognizedHandoffBehavior)); + throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); } if (IsSealed) { - throw new InvalidOperationException(SR.Get(SRID.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); + throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); } AnimationStorage.BeginAnimation(this, dp, animation, handoffBehavior); @@ -559,7 +559,7 @@ public void AddHandler( if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } EnsureEventHandlersStore(); @@ -620,7 +620,7 @@ public void RemoveHandler(RoutedEvent routedEvent, Delegate handler) if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } EventHandlersStore store = EventHandlersStore; @@ -2095,7 +2095,7 @@ protected internal virtual void OnDrop(DragEventArgs e) {} /// /// Event reporting a finger touched the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler PreviewTouchDown { add { AddHandler(Touch.PreviewTouchDownEvent, value, false); } @@ -2115,7 +2115,7 @@ protected internal virtual void OnPreviewTouchDown(TouchEventArgs e) {} /// /// Event reporting a finger touched the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchDown { add { AddHandler(Touch.TouchDownEvent, value, false); } @@ -2135,7 +2135,7 @@ protected internal virtual void OnTouchDown(TouchEventArgs e) {} /// /// Event reporting a finger moved across the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler PreviewTouchMove { add { AddHandler(Touch.PreviewTouchMoveEvent, value, false); } @@ -2155,7 +2155,7 @@ protected internal virtual void OnPreviewTouchMove(TouchEventArgs e) {} /// /// Event reporting a finger moved across the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchMove { add { AddHandler(Touch.TouchMoveEvent, value, false); } @@ -2175,7 +2175,7 @@ protected internal virtual void OnTouchMove(TouchEventArgs e) {} /// /// Event reporting a finger lifted off the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler PreviewTouchUp { add { AddHandler(Touch.PreviewTouchUpEvent, value, false); } @@ -2195,7 +2195,7 @@ protected internal virtual void OnPreviewTouchUp(TouchEventArgs e) {} /// /// Event reporting a finger lifted off the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchUp { add { AddHandler(Touch.TouchUpEvent, value, false); } @@ -2215,7 +2215,7 @@ protected internal virtual void OnTouchUp(TouchEventArgs e) {} /// /// Event reporting a finger was captured to an element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler GotTouchCapture { add { AddHandler(Touch.GotTouchCaptureEvent, value, false); } @@ -2235,7 +2235,7 @@ protected internal virtual void OnGotTouchCapture(TouchEventArgs e) {} /// /// Event reporting a finger is no longer captured to an element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler LostTouchCapture { add { AddHandler(Touch.LostTouchCaptureEvent, value, false); } @@ -2255,7 +2255,7 @@ protected internal virtual void OnLostTouchCapture(TouchEventArgs e) {} /// /// Event reporting the mouse entered this element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchEnter { add { AddHandler(Touch.TouchEnterEvent, value, false); } @@ -2275,7 +2275,7 @@ protected internal virtual void OnTouchEnter(TouchEventArgs e) {} /// /// Event reporting the mouse left this element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchLeave { add { AddHandler(Touch.TouchLeaveEvent, value, false); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs index 8549f191749..39bd0722435 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecoration.cs @@ -27,7 +27,6 @@ using MS.Internal.Collections; using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs index 1fd707ad495..39360ea2532 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationCollection.cs @@ -27,7 +27,6 @@ using MS.Internal.Collections; using MS.Utility; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -137,7 +136,7 @@ public void Insert(int index, TextDecoration value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -245,7 +244,7 @@ public TextDecoration this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -418,7 +417,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -433,7 +432,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -525,7 +524,7 @@ private TextDecoration Cast(object value) if (!(value is TextDecoration)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextDecoration")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextDecoration")); } return (TextDecoration)value; @@ -551,7 +550,7 @@ internal int AddWithoutFiringPublicEvents(TextDecoration value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); TextDecoration newValue = value; @@ -807,7 +806,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -825,7 +824,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -859,12 +858,12 @@ public TextDecoration Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -942,7 +941,7 @@ public TextDecorationCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } TextDecoration newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -959,7 +958,7 @@ public TextDecorationCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationLocation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationLocation.cs index f0edba9efe0..d22be2d038b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationLocation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationLocation.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationUnit.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationUnit.cs index 8544a25e2db..bcaea933dad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationUnit.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/TextDecorationUnit.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement.cs index dffc1af620d..0da8e87d600 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement.cs @@ -80,7 +80,7 @@ public void ApplyAnimationClock( if (!AnimationStorage.IsPropertyAnimatable(this, dp)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); + throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); #pragma warning restore 56506 } @@ -88,18 +88,18 @@ public void ApplyAnimationClock( && !AnimationStorage.IsAnimationValid(dp, clock.Timeline)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); + throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); #pragma warning restore 56506 } if (!HandoffBehaviorEnum.IsDefined(handoffBehavior)) { - throw new ArgumentException(SR.Get(SRID.Animation_UnrecognizedHandoffBehavior)); + throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); } if (IsSealed) { - throw new InvalidOperationException(SR.Get(SRID.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); + throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); } AnimationStorage.ApplyAnimationClock(this, dp, clock, handoffBehavior); @@ -152,24 +152,24 @@ public void BeginAnimation(DependencyProperty dp, AnimationTimeline animation, H if (!AnimationStorage.IsPropertyAnimatable(this, dp)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); + throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); #pragma warning restore 56506 } if ( animation != null && !AnimationStorage.IsAnimationValid(dp, animation)) { - throw new ArgumentException(SR.Get(SRID.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); + throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); } if (!HandoffBehaviorEnum.IsDefined(handoffBehavior)) { - throw new ArgumentException(SR.Get(SRID.Animation_UnrecognizedHandoffBehavior)); + throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); } if (IsSealed) { - throw new InvalidOperationException(SR.Get(SRID.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); + throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); } AnimationStorage.BeginAnimation(this, dp, animation, handoffBehavior); @@ -559,7 +559,7 @@ public void AddHandler( if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } EnsureEventHandlersStore(); @@ -620,7 +620,7 @@ public void RemoveHandler(RoutedEvent routedEvent, Delegate handler) if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } EventHandlersStore store = EventHandlersStore; @@ -4048,7 +4048,7 @@ protected virtual void OnDrop(DragEventArgs e) {} /// /// Event reporting a finger touched the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler PreviewTouchDown { add { AddHandler(Touch.PreviewTouchDownEvent, value, false); } @@ -4068,7 +4068,7 @@ protected virtual void OnPreviewTouchDown(TouchEventArgs e) {} /// /// Event reporting a finger touched the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchDown { add { AddHandler(Touch.TouchDownEvent, value, false); } @@ -4088,7 +4088,7 @@ protected virtual void OnTouchDown(TouchEventArgs e) {} /// /// Event reporting a finger moved across the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler PreviewTouchMove { add { AddHandler(Touch.PreviewTouchMoveEvent, value, false); } @@ -4108,7 +4108,7 @@ protected virtual void OnPreviewTouchMove(TouchEventArgs e) {} /// /// Event reporting a finger moved across the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchMove { add { AddHandler(Touch.TouchMoveEvent, value, false); } @@ -4128,7 +4128,7 @@ protected virtual void OnTouchMove(TouchEventArgs e) {} /// /// Event reporting a finger lifted off the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler PreviewTouchUp { add { AddHandler(Touch.PreviewTouchUpEvent, value, false); } @@ -4148,7 +4148,7 @@ protected virtual void OnPreviewTouchUp(TouchEventArgs e) {} /// /// Event reporting a finger lifted off the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchUp { add { AddHandler(Touch.TouchUpEvent, value, false); } @@ -4168,7 +4168,7 @@ protected virtual void OnTouchUp(TouchEventArgs e) {} /// /// Event reporting a finger was captured to an element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler GotTouchCapture { add { AddHandler(Touch.GotTouchCaptureEvent, value, false); } @@ -4188,7 +4188,7 @@ protected virtual void OnGotTouchCapture(TouchEventArgs e) {} /// /// Event reporting a finger is no longer captured to an element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler LostTouchCapture { add { AddHandler(Touch.LostTouchCaptureEvent, value, false); } @@ -4208,7 +4208,7 @@ protected virtual void OnLostTouchCapture(TouchEventArgs e) {} /// /// Event reporting the mouse entered this element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchEnter { add { AddHandler(Touch.TouchEnterEvent, value, false); } @@ -4228,7 +4228,7 @@ protected virtual void OnTouchEnter(TouchEventArgs e) {} /// /// Event reporting the mouse left this element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchLeave { add { AddHandler(Touch.TouchLeaveEvent, value, false); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement3D.cs index 618b635fcdc..4cccd03a164 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Generated/UIElement3D.cs @@ -347,7 +347,7 @@ public void AddHandler( if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } EnsureEventHandlersStore(); @@ -408,7 +408,7 @@ public void RemoveHandler(RoutedEvent routedEvent, Delegate handler) if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } EventHandlersStore store = EventHandlersStore; @@ -1807,7 +1807,7 @@ protected internal virtual void OnDrop(DragEventArgs e) {} /// /// Event reporting a finger touched the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler PreviewTouchDown { add { AddHandler(Touch.PreviewTouchDownEvent, value, false); } @@ -1827,7 +1827,7 @@ protected internal virtual void OnPreviewTouchDown(TouchEventArgs e) {} /// /// Event reporting a finger touched the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchDown { add { AddHandler(Touch.TouchDownEvent, value, false); } @@ -1847,7 +1847,7 @@ protected internal virtual void OnTouchDown(TouchEventArgs e) {} /// /// Event reporting a finger moved across the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler PreviewTouchMove { add { AddHandler(Touch.PreviewTouchMoveEvent, value, false); } @@ -1867,7 +1867,7 @@ protected internal virtual void OnPreviewTouchMove(TouchEventArgs e) {} /// /// Event reporting a finger moved across the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchMove { add { AddHandler(Touch.TouchMoveEvent, value, false); } @@ -1887,7 +1887,7 @@ protected internal virtual void OnTouchMove(TouchEventArgs e) {} /// /// Event reporting a finger lifted off the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler PreviewTouchUp { add { AddHandler(Touch.PreviewTouchUpEvent, value, false); } @@ -1907,7 +1907,7 @@ protected internal virtual void OnPreviewTouchUp(TouchEventArgs e) {} /// /// Event reporting a finger lifted off the screen /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchUp { add { AddHandler(Touch.TouchUpEvent, value, false); } @@ -1927,7 +1927,7 @@ protected internal virtual void OnTouchUp(TouchEventArgs e) {} /// /// Event reporting a finger was captured to an element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler GotTouchCapture { add { AddHandler(Touch.GotTouchCaptureEvent, value, false); } @@ -1947,7 +1947,7 @@ protected internal virtual void OnGotTouchCapture(TouchEventArgs e) {} /// /// Event reporting a finger is no longer captured to an element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler LostTouchCapture { add { AddHandler(Touch.LostTouchCaptureEvent, value, false); } @@ -1967,7 +1967,7 @@ protected internal virtual void OnLostTouchCapture(TouchEventArgs e) {} /// /// Event reporting the mouse entered this element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchEnter { add { AddHandler(Touch.TouchEnterEvent, value, false); } @@ -1987,7 +1987,7 @@ protected internal virtual void OnTouchEnter(TouchEventArgs e) {} /// /// Event reporting the mouse left this element /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler TouchLeave { add { AddHandler(Touch.TouchLeaveEvent, value, false); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GlobalEventManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GlobalEventManager.cs index d5443863c40..b81b067b173 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GlobalEventManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/GlobalEventManager.cs @@ -8,7 +8,6 @@ using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -438,7 +437,7 @@ internal static int GetNextAvailableGlobalIndex(object value) // overflow. This check will explicitly catch this error, instead of silently malfuntioning. if (_globalIndexToEventMap.Count >= Int32.MaxValue) { - throw new InvalidOperationException(SR.Get(SRID.TooManyRoutedEvents)); + throw new InvalidOperationException(SR.TooManyRoutedEvents); } index = _globalIndexToEventMap.Add(value); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/DrawingAttributes.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/DrawingAttributes.cs index fe271d580bf..b779122745d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/DrawingAttributes.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/DrawingAttributes.cs @@ -17,7 +17,6 @@ using MS.Internal.Ink.InkSerializedFormat; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Ink { @@ -143,7 +142,7 @@ public Matrix StylusTipTransform Matrix m = (Matrix) value; if (m.OffsetX != 0 || m.OffsetY != 0) { - throw new ArgumentException(SR.Get(SRID.InvalidSttValue), "value"); + throw new ArgumentException(SR.InvalidSttValue, "value"); } //no need to raise change events, they will bubble up from the EPC //underneath us @@ -171,7 +170,7 @@ public double Height { if (double.IsNaN(value) || value < MinHeight || value > MaxHeight) { - throw new ArgumentOutOfRangeException("Height", SR.Get(SRID.InvalidDrawingAttributesHeight)); + throw new ArgumentOutOfRangeException("Height", SR.InvalidDrawingAttributesHeight); } //no need to raise change events, they will bubble up from the EPC //underneath us @@ -198,7 +197,7 @@ public double Width { if (double.IsNaN(value) || value < MinWidth || value > MaxWidth) { - throw new ArgumentOutOfRangeException("Width", SR.Get(SRID.InvalidDrawingAttributesWidth)); + throw new ArgumentOutOfRangeException("Width", SR.InvalidDrawingAttributesWidth); } //no need to raise change events, they will bubble up from the EPC //underneath us @@ -600,7 +599,7 @@ protected virtual void OnAttributeChanged(PropertyDataChangedEventArgs e) { if (null == e) { - throw new ArgumentNullException("e", SR.Get(SRID.EventArgIsNull)); + throw new ArgumentNullException("e", SR.EventArgIsNull); } try @@ -629,7 +628,7 @@ protected virtual void OnPropertyDataChanged(PropertyDataChangedEventArgs e) { if (null == e) { - throw new ArgumentNullException("e", SR.Get(SRID.EventArgIsNull)); + throw new ArgumentNullException("e", SR.EventArgIsNull); } if (this.PropertyDataChanged != null) @@ -720,7 +719,7 @@ internal static void ValidateStylusTipTransform(Guid propertyDataId, object prop Type t = propertyData.GetType(); if (t == typeof(String)) { - throw new ArgumentException(SR.Get(SRID.InvalidValueType, typeof(Matrix)), "propertyData"); + throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(Matrix)), "propertyData"); } } } @@ -955,7 +954,7 @@ private object GetExtendedPropertyBackedProperty(Guid id) { return DrawingAttributes.GetDefaultDrawingAttributeValue(id); } - throw new ArgumentException(SR.Get(SRID.EPGuidNotFound), "id"); + throw new ArgumentException(SR.EPGuidNotFound, "id"); } else { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Events.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Events.cs index 9eb9a3bac46..e199aaf421b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Events.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Events.cs @@ -9,7 +9,6 @@ using System.Collections.ObjectModel; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Ink { @@ -42,7 +41,7 @@ public StrokeCollectionChangedEventArgs(StrokeCollection added, StrokeCollection { if ( added == null && removed == null ) { - throw new ArgumentException(SR.Get(SRID.CannotBothBeNull, "added", "removed")); + throw new ArgumentException(SR.Format(SR.CannotBothBeNull, "added", "removed")); } _added = ( added == null ) ? null : new StrokeCollection.ReadOnlyStrokeCollection(added); _removed = ( removed == null ) ? null : new StrokeCollection.ReadOnlyStrokeCollection(removed); @@ -108,7 +107,7 @@ public PropertyDataChangedEventArgs(Guid propertyGuid, { if ( newValue == null && previousValue == null ) { - throw new ArgumentException(SR.Get(SRID.CannotBothBeNull, "newValue", "previousValue")); + throw new ArgumentException(SR.Format(SR.CannotBothBeNull, "newValue", "previousValue")); } _propertyGuid = propertyGuid; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognizer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognizer.cs index b6fbd4f06e6..8c4c89c4ac8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognizer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/GestureRecognizer.cs @@ -17,7 +17,6 @@ using System.Security; using SecurityHelper=MS.Internal.SecurityHelper; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Ink { @@ -179,7 +178,7 @@ private ReadOnlyCollection RecognizeImpl(StrokeCollect } if (strokes.Count > 2) { - throw new ArgumentException(SR.Get(SRID.StrokeCollectionCountTooBig), "strokes"); + throw new ArgumentException(SR.StrokeCollectionCountTooBig, "strokes"); } VerifyAccess(); VerifyDisposed(); @@ -268,7 +267,7 @@ private void VerifyRecognizerAvailable() { if (_nativeRecognizer == null) { - throw new InvalidOperationException(SR.Get(SRID.GestureRecognizerNotAvailable)); + throw new InvalidOperationException(SR.GestureRecognizerNotAvailable); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/IncrementalHitTester.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/IncrementalHitTester.cs index 2c991174dd0..cbb2d8f78a3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/IncrementalHitTester.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/IncrementalHitTester.cs @@ -16,7 +16,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Ink { @@ -52,12 +51,12 @@ public void AddPoints(IEnumerable points) if (IEnumerablePointHelper.GetCount(points) == 0) { - throw new System.ArgumentException(SR.Get(SRID.EmptyArrayNotAllowedAsArgument), "points"); + throw new System.ArgumentException(SR.EmptyArrayNotAllowedAsArgument, "points"); } if (false == _fValid) { - throw new System.InvalidOperationException(SR.Get(SRID.EndHitTestingCalled)); + throw new System.InvalidOperationException(SR.EndHitTestingCalled); } System.Diagnostics.Debug.Assert(_strokes != null); @@ -78,12 +77,12 @@ public void AddPoints(StylusPointCollection stylusPoints) if (stylusPoints.Count == 0) { - throw new System.ArgumentException(SR.Get(SRID.EmptyArrayNotAllowedAsArgument), "stylusPoints"); + throw new System.ArgumentException(SR.EmptyArrayNotAllowedAsArgument, "stylusPoints"); } if (false == _fValid) { - throw new System.InvalidOperationException(SR.Get(SRID.EndHitTestingCalled)); + throw new System.InvalidOperationException(SR.EndHitTestingCalled); } System.Diagnostics.Debug.Assert(_strokes != null); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke.cs index fd181b5be54..d46842b52e9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke.cs @@ -23,7 +23,6 @@ using System.Windows.Input; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // Primary root namespace for TabletPC/Ink/Handwriting/Recognition in .NET @@ -67,7 +66,7 @@ internal Stroke(StylusPointCollection stylusPoints, DrawingAttributes drawingAtt } if (stylusPoints.Count == 0) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointCollectionZeroCount), "stylusPoints"); + throw new ArgumentException(SR.InvalidStylusPointCollectionZeroCount, "stylusPoints"); } if (drawingAttributes == null) { @@ -164,15 +163,15 @@ public virtual void Transform(Matrix transformMatrix, bool applyToStylusTip) if (!transformMatrix.HasInverse) { - throw new ArgumentException(SR.Get(SRID.MatrixNotInvertible), "transformMatrix"); + throw new ArgumentException(SR.MatrixNotInvertible, "transformMatrix"); } else if ( MatrixHelper.ContainsNaN(transformMatrix)) { - throw new ArgumentException(SR.Get(SRID.InvalidMatrixContainsNaN), "transformMatrix"); + throw new ArgumentException(SR.InvalidMatrixContainsNaN, "transformMatrix"); } else if ( MatrixHelper.ContainsInfinity(transformMatrix)) { - throw new ArgumentException(SR.Get(SRID.InvalidMatrixContainsInfinity), "transformMatrix"); + throw new ArgumentException(SR.InvalidMatrixContainsInfinity, "transformMatrix"); } else { @@ -532,7 +531,7 @@ public StylusPointCollection StylusPoints if (value.Count == 0) { //we don't allow this - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointCollectionZeroCount)); + throw new ArgumentException(SR.InvalidStylusPointCollectionZeroCount); } // Force a recaculation of the cached path geometry @@ -612,7 +611,7 @@ protected virtual void OnDrawingAttributesChanged(PropertyDataChangedEventArgs e { if (null == e) { - throw new ArgumentNullException("e", SR.Get(SRID.EventArgIsNull)); + throw new ArgumentNullException("e", SR.EventArgIsNull); } if (DrawingAttributesChanged != null) @@ -646,7 +645,7 @@ protected virtual void OnStylusPointsReplaced(StylusPointsReplacedEventArgs e) { if (null == e) { - throw new ArgumentNullException("e", SR.Get(SRID.EventArgIsNull)); + throw new ArgumentNullException("e", SR.EventArgIsNull); } if (StylusPointsReplaced != null) @@ -661,7 +660,7 @@ protected virtual void OnStylusPointsChanged(EventArgs e) { if (null == e) { - throw new ArgumentNullException("e", SR.Get(SRID.EventArgIsNull)); + throw new ArgumentNullException("e", SR.EventArgIsNull); } if (StylusPointsChanged != null) @@ -678,7 +677,7 @@ protected virtual void OnPropertyDataChanged(PropertyDataChangedEventArgs e) { if (null == e) { - throw new ArgumentNullException("e", SR.Get(SRID.EventArgIsNull)); + throw new ArgumentNullException("e", SR.EventArgIsNull); } if (PropertyDataChanged != null) @@ -696,7 +695,7 @@ protected virtual void OnInvalidated(EventArgs e) { if (null == e) { - throw new ArgumentNullException("e", SR.Get(SRID.EventArgIsNull)); + throw new ArgumentNullException("e", SR.EventArgIsNull); } if (Invalidated != null) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke2.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke2.cs index d7e48e59e15..3d11036202c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke2.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/Stroke2.cs @@ -17,7 +17,6 @@ using MS.Internal.Ink; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; // Primary root namespace for TabletPC/Ink/Handwriting/Recognition in .NET @@ -140,7 +139,7 @@ public StrokeCollection GetClipResult(IEnumerable lassoPoints) if (IEnumerablePointHelper.GetCount(lassoPoints) == 0) { - throw new ArgumentException(SR.Get(SRID.EmptyArray)); + throw new ArgumentException(SR.EmptyArray); } Lasso lasso = new SingleLoopLasso(); @@ -174,7 +173,7 @@ public StrokeCollection GetEraseResult(IEnumerable lassoPoints) if (IEnumerablePointHelper.GetCount(lassoPoints) == 0) { - throw new ArgumentException(SR.Get(SRID.EmptyArray)); + throw new ArgumentException(SR.EmptyArray); } Lasso lasso = new SingleLoopLasso(); @@ -224,7 +223,7 @@ public bool HitTest(Point point, double diameter) { if (Double.IsNaN(diameter) || diameter < DrawingAttributes.MinWidth || diameter > DrawingAttributes.MaxWidth) { - throw new ArgumentOutOfRangeException("diameter", SR.Get(SRID.InvalidDiameter)); + throw new ArgumentOutOfRangeException("diameter", SR.InvalidDiameter); } return HitTest(new Point[]{point}, new EllipseStylusShape(diameter, diameter, TapHitRotation)); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection.cs index d222a124c36..4a38f3480bf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection.cs @@ -21,7 +21,6 @@ using MS.Internal.Ink; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; // Primary root namespace for TabletPC/Ink/Handwriting/Recognition in .NET @@ -61,7 +60,7 @@ public StrokeCollection(IEnumerable strokes) { //clear and throw items.Clear(); - throw new ArgumentException(SR.Get(SRID.StrokeIsDuplicated), "strokes"); + throw new ArgumentException(SR.StrokeIsDuplicated, "strokes"); } items.Add(stroke); } @@ -77,13 +76,13 @@ public StrokeCollection(Stream stream) } if ( !stream.CanRead ) { - throw new ArgumentException(SR.Get(SRID.Image_StreamRead), "stream"); + throw new ArgumentException(SR.Image_StreamRead, "stream"); } Stream seekableStream = GetSeekableStream(stream); if (seekableStream == null) { - throw new ArgumentException(SR.Get(SRID.Invalid_isfData_Length), "stream"); + throw new ArgumentException(SR.Invalid_isfData_Length, "stream"); } //this will init our stroke collection @@ -104,7 +103,7 @@ public virtual void Save(Stream stream, bool compress) } if ( !stream.CanWrite ) { - throw new ArgumentException(SR.Get(SRID.Image_StreamWrite), "stream"); + throw new ArgumentException(SR.Image_StreamWrite, "stream"); } SaveIsf(stream, compress); } @@ -205,7 +204,7 @@ public object GetPropertyData(Guid propertyDataId) { if ( propertyDataId == Guid.Empty ) { - throw new ArgumentException(SR.Get(SRID.InvalidGuid), "propertyDataId"); + throw new ArgumentException(SR.InvalidGuid, "propertyDataId"); } return this.ExtendedProperties[propertyDataId]; @@ -243,7 +242,7 @@ public void Transform(Matrix transformMatrix, bool applyToStylusTip) { // Ensure that the transformMatrix is invertible. if ( false == transformMatrix.HasInverse ) - throw new ArgumentException(SR.Get(SRID.MatrixNotInvertible), "transformMatrix"); + throw new ArgumentException(SR.MatrixNotInvertible, "transformMatrix"); // if transformMatrix is identity or the StrokeCollection is empty // then no change will occur anyway @@ -338,7 +337,7 @@ protected override sealed void InsertItem(int index, Stroke stroke) } if ( this.IndexOf(stroke) != -1 ) { - throw new ArgumentException(SR.Get(SRID.StrokeIsDuplicated), "stroke"); + throw new ArgumentException(SR.StrokeIsDuplicated, "stroke"); } base.InsertItem(index, stroke); @@ -359,7 +358,7 @@ protected override sealed void SetItem(int index, Stroke stroke) } if ( IndexOf(stroke) != -1 ) { - throw new ArgumentException(SR.Get(SRID.StrokeIsDuplicated), "stroke"); + throw new ArgumentException(SR.StrokeIsDuplicated, "stroke"); } Stroke removedStroke = this[index]; @@ -418,7 +417,7 @@ public void Remove(StrokeCollection strokes) if ( indexes == null ) { // At least one stroke doesn't exist in our collection. We throw. - ArgumentException ae = new ArgumentException(SR.Get(SRID.InvalidRemovedStroke), "strokes"); + ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, "strokes"); // // we add a tag here so we can check for this in EraserBehavior.OnPointEraseResultChanged // to determine if this method is the origin of an ArgumentException we harden against @@ -465,7 +464,7 @@ public void Add(StrokeCollection strokes) Stroke stroke = strokes[x]; if ( this.IndexOf(stroke) != -1 ) { - throw new ArgumentException(SR.Get(SRID.StrokeIsDuplicated), "strokes"); + throw new ArgumentException(SR.StrokeIsDuplicated, "strokes"); } } @@ -486,7 +485,7 @@ public void Replace(Stroke strokeToReplace, StrokeCollection strokesToReplaceWit { if ( strokeToReplace == null ) { - throw new ArgumentNullException(SR.Get(SRID.EmptyScToReplace)); + throw new ArgumentNullException(SR.EmptyScToReplace); } StrokeCollection strokesToReplace = new StrokeCollection(); @@ -503,17 +502,17 @@ public void Replace(StrokeCollection strokesToReplace, StrokeCollection strokesT { if ( strokesToReplace == null ) { - throw new ArgumentNullException(SR.Get(SRID.EmptyScToReplace)); + throw new ArgumentNullException(SR.EmptyScToReplace); } if ( strokesToReplaceWith == null ) { - throw new ArgumentNullException(SR.Get(SRID.EmptyScToReplaceWith)); + throw new ArgumentNullException(SR.EmptyScToReplaceWith); } int replaceCount = strokesToReplace.Count; if ( replaceCount == 0 ) { - ArgumentException ae = new ArgumentException(SR.Get(SRID.EmptyScToReplace), "strokesToReplace"); + ArgumentException ae = new ArgumentException(SR.EmptyScToReplace, "strokesToReplace"); // // we add a tag here so we can check for this in EraserBehavior.OnPointEraseResultChanged // to determine if this method is the origin of an ArgumentException we harden against @@ -526,7 +525,7 @@ public void Replace(StrokeCollection strokesToReplace, StrokeCollection strokesT if ( indexes == null ) { // At least one stroke doesn't exist in our collection. We throw. - ArgumentException ae = new ArgumentException(SR.Get(SRID.InvalidRemovedStroke), "strokesToReplace"); + ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, "strokesToReplace"); // // we add a tag here so we can check for this in EraserBehavior.OnPointEraseResultChanged // to determine if this method is the origin of an ArgumentException we harden against @@ -542,7 +541,7 @@ public void Replace(StrokeCollection strokesToReplace, StrokeCollection strokesT Stroke stroke = strokesToReplaceWith[x]; if ( this.IndexOf(stroke) != -1 ) { - throw new ArgumentException(SR.Get(SRID.StrokeIsDuplicated), "strokesToReplaceWith"); + throw new ArgumentException(SR.StrokeIsDuplicated, "strokesToReplaceWith"); } } @@ -655,7 +654,7 @@ protected virtual void OnStrokesChanged(StrokeCollectionChangedEventArgs e) { if ( null == e ) { - throw new ArgumentNullException("e", SR.Get(SRID.EventArgIsNull)); + throw new ArgumentNullException("e", SR.EventArgIsNull); } //raise our internal event first. This is used by @@ -712,7 +711,7 @@ protected virtual void OnPropertyDataChanged(PropertyDataChangedEventArgs e) { if ( null == e ) { - throw new ArgumentNullException("e", SR.Get(SRID.EventArgIsNull)); + throw new ArgumentNullException("e", SR.EventArgIsNull); } if ( this.PropertyDataChanged != null ) @@ -896,7 +895,7 @@ internal ReadOnlyStrokeCollection(StrokeCollection strokeCollection) /// protected override void OnStrokesChanged(StrokeCollectionChangedEventArgs e) { - throw new NotSupportedException(SR.Get(SRID.StrokeCollectionIsReadOnly)); + throw new NotSupportedException(SR.StrokeCollectionIsReadOnly); } /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection2.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection2.cs index e5189e461a9..d28fe19bd55 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection2.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollection2.cs @@ -16,7 +16,6 @@ using MS.Internal.Ink; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Ink { @@ -76,7 +75,7 @@ public StrokeCollection HitTest(Point point, double diameter) { if (Double.IsNaN(diameter) || diameter < DrawingAttributes.MinWidth || diameter > DrawingAttributes.MaxWidth) { - throw new ArgumentOutOfRangeException("diameter", SR.Get(SRID.InvalidDiameter)); + throw new ArgumentOutOfRangeException("diameter", SR.InvalidDiameter); } return PointHitTest(point, new EllipseStylusShape(diameter, diameter)); } @@ -258,7 +257,7 @@ public void Clip(IEnumerable lassoPoints) int length = IEnumerablePointHelper.GetCount(lassoPoints); if (length == 0) { - throw new ArgumentException(SR.Get(SRID.EmptyArray)); + throw new ArgumentException(SR.EmptyArray); } if (length < 3) @@ -311,7 +310,7 @@ public void Erase(IEnumerable lassoPoints) int length = IEnumerablePointHelper.GetCount(lassoPoints); if (length == 0) { - throw new ArgumentException(SR.Get(SRID.EmptyArray)); + throw new ArgumentException(SR.EmptyArray); } if (length < 3) @@ -354,11 +353,11 @@ public void Erase(IEnumerable eraserPath, StylusShape eraserShape) // Check the input parameters if (eraserShape == null) { - throw new System.ArgumentNullException(SR.Get(SRID.SCEraseShape)); + throw new System.ArgumentNullException(SR.SCEraseShape); } if (eraserPath == null) { - throw new System.ArgumentNullException(SR.Get(SRID.SCErasePath)); + throw new System.ArgumentNullException(SR.SCErasePath); } if (IEnumerablePointHelper.GetCount(eraserPath) == 0) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollectionConverter.cs index 51db21c9a9c..e1f3ecda149 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Ink/StrokeCollectionConverter.cs @@ -20,7 +20,6 @@ using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AccessKeyManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AccessKeyManager.cs index c1ac94d4a41..e79f6d33114 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AccessKeyManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/AccessKeyManager.cs @@ -18,7 +18,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -145,7 +144,7 @@ private static string NormalizeKey(string key) if (key != firstCharacter) { - throw new ArgumentException(SR.Get(SRID.AccessKeyManager_NotAUnicodeCharacter, "key")); + throw new ArgumentException(SR.Format(SR.AccessKeyManager_NotAUnicodeCharacter, "key")); } return firstCharacter.ToUpperInvariant(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ApplicationCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ApplicationCommands.cs index 89cfe542d18..16d47de0688 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ApplicationCommands.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ApplicationCommands.cs @@ -21,7 +21,6 @@ using System.ComponentModel; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal; // CommandHelper namespace System.Windows.Input @@ -275,29 +274,29 @@ internal static string GetUIText(byte commandId) switch ((CommandId)commandId) { - case CommandId.Cut: uiText = SR.Get(SRID.CutText); break; - case CommandId.Copy: uiText = SR.Get(SRID.CopyText);break; - case CommandId.Paste: uiText = SR.Get(SRID.PasteText);break; - case CommandId.Undo: uiText = SR.Get(SRID.UndoText);break; - case CommandId.Redo: uiText = SR.Get(SRID.RedoText); break; - case CommandId.Delete: uiText = SR.Get(SRID.DeleteText); break; - case CommandId.Find: uiText = SR.Get(SRID.FindText); break; - case CommandId.Replace: uiText = SR.Get(SRID.ReplaceText); break; - case CommandId.SelectAll: uiText = SR.Get(SRID.SelectAllText); break; - case CommandId.Help: uiText = SR.Get(SRID.HelpText); break; - case CommandId.New: uiText = SR.Get(SRID.NewText); break; - case CommandId.Open: uiText = SR.Get(SRID.OpenText); break; - case CommandId.Save: uiText = SR.Get(SRID.SaveText); break; - case CommandId.SaveAs: uiText = SR.Get(SRID.SaveAsText); break; - case CommandId.Print: uiText = SR.Get(SRID.PrintText); break; - case CommandId.CancelPrint: uiText = SR.Get(SRID.CancelPrintText); break; - case CommandId.PrintPreview: uiText = SR.Get(SRID.PrintPreviewText); break; - case CommandId.Close: uiText = SR.Get(SRID.CloseText); break; - case CommandId.ContextMenu: uiText = SR.Get(SRID.ContextMenuText); break; - case CommandId.CorrectionList: uiText = SR.Get(SRID.CorrectionListText); break; - case CommandId.Properties: uiText = SR.Get(SRID.PropertiesText); break; - case CommandId.Stop: uiText = SR.Get(SRID.StopText); break; - case CommandId.NotACommand: uiText = SR.Get(SRID.NotACommandText); break; + case CommandId.Cut: uiText = SR.CutText; break; + case CommandId.Copy: uiText = SR.CopyText;break; + case CommandId.Paste: uiText = SR.PasteText;break; + case CommandId.Undo: uiText = SR.UndoText;break; + case CommandId.Redo: uiText = SR.RedoText; break; + case CommandId.Delete: uiText = SR.DeleteText; break; + case CommandId.Find: uiText = SR.FindText; break; + case CommandId.Replace: uiText = SR.ReplaceText; break; + case CommandId.SelectAll: uiText = SR.SelectAllText; break; + case CommandId.Help: uiText = SR.HelpText; break; + case CommandId.New: uiText = SR.NewText; break; + case CommandId.Open: uiText = SR.OpenText; break; + case CommandId.Save: uiText = SR.SaveText; break; + case CommandId.SaveAs: uiText = SR.SaveAsText; break; + case CommandId.Print: uiText = SR.PrintText; break; + case CommandId.CancelPrint: uiText = SR.CancelPrintText; break; + case CommandId.PrintPreview: uiText = SR.PrintPreviewText; break; + case CommandId.Close: uiText = SR.CloseText; break; + case CommandId.ContextMenu: uiText = SR.ContextMenuText; break; + case CommandId.CorrectionList: uiText = SR.CorrectionListText; break; + case CommandId.Properties: uiText = SR.PropertiesText; break; + case CommandId.Stop: uiText = SR.StopText; break; + case CommandId.NotACommand: uiText = SR.NotACommandText; break; } return uiText; @@ -313,79 +312,79 @@ internal static InputGestureCollection LoadDefaultGestureFromResource(byte comma case CommandId.Cut: KeyGesture.AddGesturesFromResourceStrings( CutKey, - SR.Get(SRID.CutKeyDisplayString), + SR.CutKeyDisplayString, gestures); break; case CommandId.Copy: KeyGesture.AddGesturesFromResourceStrings( CopyKey, - SR.Get(SRID.CopyKeyDisplayString), + SR.CopyKeyDisplayString, gestures); break; case CommandId.Paste: KeyGesture.AddGesturesFromResourceStrings( PasteKey, - SR.Get(SRID.PasteKeyDisplayString), + SR.PasteKeyDisplayString, gestures); break; case CommandId.Undo: KeyGesture.AddGesturesFromResourceStrings( UndoKey, - SR.Get(SRID.UndoKeyDisplayString), + SR.UndoKeyDisplayString, gestures); break; case CommandId.Redo: KeyGesture.AddGesturesFromResourceStrings( RedoKey, - SR.Get(SRID.RedoKeyDisplayString), + SR.RedoKeyDisplayString, gestures); break; case CommandId.Delete: KeyGesture.AddGesturesFromResourceStrings( DeleteKey, - SR.Get(SRID.DeleteKeyDisplayString), + SR.DeleteKeyDisplayString, gestures); break; case CommandId.Find: KeyGesture.AddGesturesFromResourceStrings( FindKey, - SR.Get(SRID.FindKeyDisplayString), + SR.FindKeyDisplayString, gestures); break; case CommandId.Replace: KeyGesture.AddGesturesFromResourceStrings( ReplaceKey, - SR.Get(SRID.ReplaceKeyDisplayString), + SR.ReplaceKeyDisplayString, gestures); break; case CommandId.SelectAll: KeyGesture.AddGesturesFromResourceStrings( SelectAllKey, - SR.Get(SRID.SelectAllKeyDisplayString), + SR.SelectAllKeyDisplayString, gestures); break; case CommandId.Help: KeyGesture.AddGesturesFromResourceStrings( HelpKey, - SR.Get(SRID.HelpKeyDisplayString), + SR.HelpKeyDisplayString, gestures); break; case CommandId.New: KeyGesture.AddGesturesFromResourceStrings( NewKey, - SR.Get(SRID.NewKeyDisplayString), + SR.NewKeyDisplayString, gestures); break; case CommandId.Open: KeyGesture.AddGesturesFromResourceStrings( OpenKey, - SR.Get(SRID.OpenKeyDisplayString), + SR.OpenKeyDisplayString, gestures); break; case CommandId.Save: KeyGesture.AddGesturesFromResourceStrings( SaveKey, - SR.Get(SRID.SaveKeyDisplayString), + SR.SaveKeyDisplayString, gestures); break; case CommandId.SaveAs: @@ -393,7 +392,7 @@ internal static InputGestureCollection LoadDefaultGestureFromResource(byte comma case CommandId.Print: KeyGesture.AddGesturesFromResourceStrings( PrintKey, - SR.Get(SRID.PrintKeyDisplayString), + SR.PrintKeyDisplayString, gestures); break; case CommandId.CancelPrint: @@ -401,7 +400,7 @@ internal static InputGestureCollection LoadDefaultGestureFromResource(byte comma case CommandId.PrintPreview: KeyGesture.AddGesturesFromResourceStrings( PrintPreviewKey, - SR.Get(SRID.PrintPreviewKeyDisplayString), + SR.PrintPreviewKeyDisplayString, gestures); break; case CommandId.Close: @@ -409,25 +408,25 @@ internal static InputGestureCollection LoadDefaultGestureFromResource(byte comma case CommandId.ContextMenu: KeyGesture.AddGesturesFromResourceStrings( ContextMenuKey, - SR.Get(SRID.ContextMenuKeyDisplayString), + SR.ContextMenuKeyDisplayString, gestures); break; case CommandId.CorrectionList: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.CorrectionListKey), - SR.Get(SRID.CorrectionListKeyDisplayString), + SR.CorrectionListKey, + SR.CorrectionListKeyDisplayString, gestures); break; case CommandId.Properties: KeyGesture.AddGesturesFromResourceStrings( PropertiesKey, - SR.Get(SRID.PropertiesKeyDisplayString), + SR.PropertiesKeyDisplayString, gestures); break; case CommandId.Stop: KeyGesture.AddGesturesFromResourceStrings( StopKey, - SR.Get(SRID.StopKeyDisplayString), + SR.StopKeyDisplayString, gestures); break; case CommandId.NotACommand: diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBindingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBindingCollection.cs index 8adf9e4d232..cbcd5898aea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBindingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandBindingCollection.cs @@ -21,7 +21,6 @@ using System.Windows.Input; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -142,7 +141,7 @@ object IList.this[int index] set { if (value is not CommandBinding commandBinding) - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsCommandBindings)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsCommandBindings); this[index] = commandBinding; } @@ -181,7 +180,7 @@ public int Add(CommandBinding commandBinding) } else { - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsCommandBindings)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsCommandBindings); } } @@ -208,7 +207,7 @@ public void AddRange(ICollection collection) } else { - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsCommandBindings)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsCommandBindings); } } } @@ -226,7 +225,7 @@ public void Insert(int index, CommandBinding commandBinding) } else { - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsCommandBindings)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsCommandBindings); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandManager.cs index 3a0454e3212..44944d17675 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/CommandManager.cs @@ -18,7 +18,6 @@ using MS.Internal; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ComponentCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ComponentCommands.cs index ad28c3cbf66..ed8dab6d742 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ComponentCommands.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/ComponentCommands.cs @@ -19,7 +19,6 @@ using System.ComponentModel; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -304,33 +303,33 @@ internal static string GetUIText(byte commandId) switch ((CommandId)commandId) { - case CommandId.ScrollPageUp: uiText = SR.Get(SRID.ScrollPageUpText); break; - case CommandId.ScrollPageDown: uiText = SR.Get(SRID.ScrollPageDownText); break; - case CommandId.ScrollPageLeft: uiText = SR.Get(SRID.ScrollPageLeftText); break; - case CommandId.ScrollPageRight: uiText = SR.Get(SRID.ScrollPageRightText); break; - case CommandId.ScrollByLine: uiText = SR.Get(SRID.ScrollByLineText); break; - case CommandId.MoveLeft:uiText = SR.Get(SRID.MoveLeftText);break; - case CommandId.MoveRight:uiText = SR.Get(SRID.MoveRightText);break; - case CommandId.MoveUp: uiText = SR.Get(SRID.MoveUpText); break; - case CommandId.MoveDown: uiText = SR.Get(SRID.MoveDownText); break; - case CommandId.ExtendSelectionUp: uiText = SR.Get(SRID.ExtendSelectionUpText); break; - case CommandId.ExtendSelectionDown: uiText = SR.Get(SRID.ExtendSelectionDownText); break; - case CommandId.ExtendSelectionLeft: uiText = SR.Get(SRID.ExtendSelectionLeftText); break; - case CommandId.ExtendSelectionRight: uiText = SR.Get(SRID.ExtendSelectionRightText); break; - case CommandId.MoveToHome: uiText = SR.Get(SRID.MoveToHomeText); break; - case CommandId.MoveToEnd: uiText = SR.Get(SRID.MoveToEndText); break; - case CommandId.MoveToPageUp: uiText = SR.Get(SRID.MoveToPageUpText); break; - case CommandId.MoveToPageDown: uiText = SR.Get(SRID.MoveToPageDownText); break; - case CommandId.SelectToHome: uiText = SR.Get(SRID.SelectToHomeText); break; - case CommandId.SelectToEnd: uiText = SR.Get(SRID.SelectToEndText); break; - case CommandId.SelectToPageDown: uiText = SR.Get(SRID.SelectToPageDownText); break; - case CommandId.SelectToPageUp: uiText = SR.Get(SRID.SelectToPageUpText); break; - case CommandId.MoveFocusUp: uiText = SR.Get(SRID.MoveFocusUpText); break; - case CommandId.MoveFocusDown: uiText = SR.Get(SRID.MoveFocusDownText); break; - case CommandId.MoveFocusBack: uiText = SR.Get(SRID.MoveFocusBackText); break; - case CommandId.MoveFocusForward: uiText = SR.Get(SRID.MoveFocusForwardText); break; - case CommandId.MoveFocusPageUp: uiText = SR.Get(SRID.MoveFocusPageUpText); break; - case CommandId.MoveFocusPageDown: uiText = SR.Get(SRID.MoveFocusPageDownText); break; + case CommandId.ScrollPageUp: uiText = SR.ScrollPageUpText; break; + case CommandId.ScrollPageDown: uiText = SR.ScrollPageDownText; break; + case CommandId.ScrollPageLeft: uiText = SR.ScrollPageLeftText; break; + case CommandId.ScrollPageRight: uiText = SR.ScrollPageRightText; break; + case CommandId.ScrollByLine: uiText = SR.ScrollByLineText; break; + case CommandId.MoveLeft:uiText = SR.MoveLeftText;break; + case CommandId.MoveRight:uiText = SR.MoveRightText;break; + case CommandId.MoveUp: uiText = SR.MoveUpText; break; + case CommandId.MoveDown: uiText = SR.MoveDownText; break; + case CommandId.ExtendSelectionUp: uiText = SR.ExtendSelectionUpText; break; + case CommandId.ExtendSelectionDown: uiText = SR.ExtendSelectionDownText; break; + case CommandId.ExtendSelectionLeft: uiText = SR.ExtendSelectionLeftText; break; + case CommandId.ExtendSelectionRight: uiText = SR.ExtendSelectionRightText; break; + case CommandId.MoveToHome: uiText = SR.MoveToHomeText; break; + case CommandId.MoveToEnd: uiText = SR.MoveToEndText; break; + case CommandId.MoveToPageUp: uiText = SR.MoveToPageUpText; break; + case CommandId.MoveToPageDown: uiText = SR.MoveToPageDownText; break; + case CommandId.SelectToHome: uiText = SR.SelectToHomeText; break; + case CommandId.SelectToEnd: uiText = SR.SelectToEndText; break; + case CommandId.SelectToPageDown: uiText = SR.SelectToPageDownText; break; + case CommandId.SelectToPageUp: uiText = SR.SelectToPageUpText; break; + case CommandId.MoveFocusUp: uiText = SR.MoveFocusUpText; break; + case CommandId.MoveFocusDown: uiText = SR.MoveFocusDownText; break; + case CommandId.MoveFocusBack: uiText = SR.MoveFocusBackText; break; + case CommandId.MoveFocusForward: uiText = SR.MoveFocusForwardText; break; + case CommandId.MoveFocusPageUp: uiText = SR.MoveFocusPageUpText; break; + case CommandId.MoveFocusPageDown: uiText = SR.MoveFocusPageDownText; break; } return uiText; @@ -346,163 +345,163 @@ internal static InputGestureCollection LoadDefaultGestureFromResource(byte comma case CommandId.ScrollPageUp: KeyGesture.AddGesturesFromResourceStrings( ScrollPageUpKey, - SR.Get(SRID.ScrollPageUpKeyDisplayString), + SR.ScrollPageUpKeyDisplayString, gestures); break; case CommandId.ScrollPageDown: KeyGesture.AddGesturesFromResourceStrings( ScrollPageDownKey, - SR.Get(SRID.ScrollPageDownKeyDisplayString), + SR.ScrollPageDownKeyDisplayString, gestures); break; case CommandId.ScrollPageLeft: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.ScrollPageLeftKey), - SR.Get(SRID.ScrollPageLeftKeyDisplayString), + SR.ScrollPageLeftKey, + SR.ScrollPageLeftKeyDisplayString, gestures); break; case CommandId.ScrollPageRight: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.ScrollPageRightKey), - SR.Get(SRID.ScrollPageRightKeyDisplayString), + SR.ScrollPageRightKey, + SR.ScrollPageRightKeyDisplayString, gestures); break; case CommandId.ScrollByLine: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.ScrollByLineKey), - SR.Get(SRID.ScrollByLineKeyDisplayString), + SR.ScrollByLineKey, + SR.ScrollByLineKeyDisplayString, gestures); break; case CommandId.MoveLeft: KeyGesture.AddGesturesFromResourceStrings( MoveLeftKey, - SR.Get(SRID.MoveLeftKeyDisplayString), + SR.MoveLeftKeyDisplayString, gestures); break; case CommandId.MoveRight: KeyGesture.AddGesturesFromResourceStrings( MoveRightKey, - SR.Get(SRID.MoveRightKeyDisplayString), + SR.MoveRightKeyDisplayString, gestures); break; case CommandId.MoveUp: KeyGesture.AddGesturesFromResourceStrings( MoveUpKey, - SR.Get(SRID.MoveUpKeyDisplayString), + SR.MoveUpKeyDisplayString, gestures); break; case CommandId.MoveDown: KeyGesture.AddGesturesFromResourceStrings( MoveDownKey, - SR.Get(SRID.MoveDownKeyDisplayString), + SR.MoveDownKeyDisplayString, gestures); break; case CommandId.ExtendSelectionUp: KeyGesture.AddGesturesFromResourceStrings( ExtendSelectionUpKey, - SR.Get(SRID.ExtendSelectionUpKeyDisplayString), + SR.ExtendSelectionUpKeyDisplayString, gestures); break; case CommandId.ExtendSelectionDown: KeyGesture.AddGesturesFromResourceStrings( ExtendSelectionDownKey, - SR.Get(SRID.ExtendSelectionDownKeyDisplayString), + SR.ExtendSelectionDownKeyDisplayString, gestures); break; case CommandId.ExtendSelectionLeft: KeyGesture.AddGesturesFromResourceStrings( ExtendSelectionLeftKey, - SR.Get(SRID.ExtendSelectionLeftKeyDisplayString), + SR.ExtendSelectionLeftKeyDisplayString, gestures); break; case CommandId.ExtendSelectionRight: KeyGesture.AddGesturesFromResourceStrings( ExtendSelectionRightKey, - SR.Get(SRID.ExtendSelectionRightKeyDisplayString), + SR.ExtendSelectionRightKeyDisplayString, gestures); break; case CommandId.MoveToHome: KeyGesture.AddGesturesFromResourceStrings( MoveToHomeKey, - SR.Get(SRID.MoveToHomeKeyDisplayString), + SR.MoveToHomeKeyDisplayString, gestures); break; case CommandId.MoveToEnd: KeyGesture.AddGesturesFromResourceStrings( MoveToEndKey, - SR.Get(SRID.MoveToEndKeyDisplayString), + SR.MoveToEndKeyDisplayString, gestures); break; case CommandId.MoveToPageUp: KeyGesture.AddGesturesFromResourceStrings( MoveToPageUpKey, - SR.Get(SRID.MoveToPageUpKeyDisplayString), + SR.MoveToPageUpKeyDisplayString, gestures); break; case CommandId.MoveToPageDown: KeyGesture.AddGesturesFromResourceStrings( MoveToPageDownKey, - SR.Get(SRID.MoveToPageDownKeyDisplayString), + SR.MoveToPageDownKeyDisplayString, gestures); break; case CommandId.SelectToHome: KeyGesture.AddGesturesFromResourceStrings( SelectToHomeKey, - SR.Get(SRID.SelectToHomeKeyDisplayString), + SR.SelectToHomeKeyDisplayString, gestures); break; case CommandId.SelectToEnd: KeyGesture.AddGesturesFromResourceStrings( SelectToEndKey, - SR.Get(SRID.SelectToEndKeyDisplayString), + SR.SelectToEndKeyDisplayString, gestures); break; case CommandId.SelectToPageDown: KeyGesture.AddGesturesFromResourceStrings( SelectToPageDownKey, - SR.Get(SRID.SelectToPageDownKeyDisplayString), + SR.SelectToPageDownKeyDisplayString, gestures); break; case CommandId.SelectToPageUp: KeyGesture.AddGesturesFromResourceStrings( SelectToPageUpKey, - SR.Get(SRID.SelectToPageUpKeyDisplayString), + SR.SelectToPageUpKeyDisplayString, gestures); break; case CommandId.MoveFocusUp: KeyGesture.AddGesturesFromResourceStrings( MoveFocusUpKey, - SR.Get(SRID.MoveFocusUpKeyDisplayString), + SR.MoveFocusUpKeyDisplayString, gestures); break; case CommandId.MoveFocusDown: KeyGesture.AddGesturesFromResourceStrings( MoveFocusDownKey, - SR.Get(SRID.MoveFocusDownKeyDisplayString), + SR.MoveFocusDownKeyDisplayString, gestures); break; case CommandId.MoveFocusBack: KeyGesture.AddGesturesFromResourceStrings( MoveFocusBackKey, - SR.Get(SRID.MoveFocusBackKeyDisplayString), + SR.MoveFocusBackKeyDisplayString, gestures); break; case CommandId.MoveFocusForward: KeyGesture.AddGesturesFromResourceStrings( MoveFocusForwardKey, - SR.Get(SRID.MoveFocusForwardKeyDisplayString), + SR.MoveFocusForwardKeyDisplayString, gestures); break; case CommandId.MoveFocusPageUp: KeyGesture.AddGesturesFromResourceStrings( MoveFocusPageUpKey, - SR.Get(SRID.MoveFocusPageUpKeyDisplayString), + SR.MoveFocusPageUpKeyDisplayString, gestures); break; case CommandId.MoveFocusPageDown: KeyGesture.AddGesturesFromResourceStrings( MoveFocusPageDownKey, - SR.Get(SRID.MoveFocusPageDownKeyDisplayString), + SR.MoveFocusPageDownKeyDisplayString, gestures); break; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBindingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBindingCollection.cs index fc785f040c2..1ab3a369461 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBindingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputBindingCollection.cs @@ -23,7 +23,6 @@ using MS.Internal; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -158,7 +157,7 @@ object IList.this[int index] { InputBinding inputBinding = value as InputBinding; if (inputBinding == null) - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsInputBindings)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsInputBindings); this[index] = inputBinding; } @@ -230,7 +229,7 @@ public int Add(InputBinding inputBinding) } else { - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsInputBindings)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsInputBindings); } } @@ -287,7 +286,7 @@ public void AddRange(ICollection collection) } else { - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsInputBindings)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsInputBindings); } } } @@ -302,7 +301,7 @@ public void Insert(int index, InputBinding inputBinding) { if (inputBinding == null) { - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsInputBindings)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsInputBindings); } if (_innerBindingList != null) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGestureCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGestureCollection.cs index 51881b047fc..20aa74f2f70 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGestureCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/InputGestureCollection.cs @@ -18,7 +18,6 @@ using System.Windows; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -109,7 +108,7 @@ int IList.IndexOf(object value) void IList.Insert(int index, object value) { if (IsReadOnly) - throw new NotSupportedException(SR.Get(SRID.ReadOnlyInputGesturesCollection)); + throw new NotSupportedException(SR.ReadOnlyInputGesturesCollection); this.Insert(index, value as InputGesture); } @@ -121,7 +120,7 @@ void IList.Insert(int index, object value) int IList.Add(object inputGesture) { if (IsReadOnly) - throw new NotSupportedException(SR.Get(SRID.ReadOnlyInputGesturesCollection)); + throw new NotSupportedException(SR.ReadOnlyInputGesturesCollection); return this.Add(inputGesture as InputGesture); } @@ -133,7 +132,7 @@ int IList.Add(object inputGesture) void IList.Remove(object inputGesture) { if (IsReadOnly) - throw new NotSupportedException(SR.Get(SRID.ReadOnlyInputGesturesCollection)); + throw new NotSupportedException(SR.ReadOnlyInputGesturesCollection); this.Remove(inputGesture as InputGesture); } @@ -151,7 +150,7 @@ object IList.this[int index] { InputGesture inputGesture = value as InputGesture; if (inputGesture == null) - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsInputGestures)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsInputGestures); this[index] = inputGesture; } @@ -184,7 +183,7 @@ public InputGesture this[int index] set { if (IsReadOnly) - throw new NotSupportedException(SR.Get(SRID.ReadOnlyInputGesturesCollection)); + throw new NotSupportedException(SR.ReadOnlyInputGesturesCollection); EnsureList(); @@ -237,7 +236,7 @@ public int IndexOf(InputGesture value) public void RemoveAt(int index) { if (IsReadOnly) - throw new NotSupportedException(SR.Get(SRID.ReadOnlyInputGesturesCollection)); + throw new NotSupportedException(SR.ReadOnlyInputGesturesCollection); if (_innerGestureList != null) _innerGestureList.RemoveAt(index); @@ -262,7 +261,7 @@ public int Add(InputGesture inputGesture) { if (IsReadOnly) { - throw new NotSupportedException(SR.Get(SRID.ReadOnlyInputGesturesCollection)); + throw new NotSupportedException(SR.ReadOnlyInputGesturesCollection); } if (inputGesture == null) @@ -285,7 +284,7 @@ public void AddRange(ICollection collection) { if (IsReadOnly) { - throw new NotSupportedException(SR.Get(SRID.ReadOnlyInputGesturesCollection)); + throw new NotSupportedException(SR.ReadOnlyInputGesturesCollection); } if (collection == null) @@ -306,7 +305,7 @@ public void AddRange(ICollection collection) } else { - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsInputGestures)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsInputGestures); } } } @@ -320,10 +319,10 @@ public void AddRange(ICollection collection) public void Insert(int index, InputGesture inputGesture) { if (IsReadOnly) - throw new NotSupportedException(SR.Get(SRID.ReadOnlyInputGesturesCollection)); + throw new NotSupportedException(SR.ReadOnlyInputGesturesCollection); if (inputGesture == null) - throw new NotSupportedException(SR.Get(SRID.CollectionOnlyAcceptsInputGestures)); + throw new NotSupportedException(SR.CollectionOnlyAcceptsInputGestures); if (_innerGestureList != null) _innerGestureList.Insert(index, inputGesture); @@ -348,7 +347,7 @@ public void Remove(InputGesture inputGesture) { if (IsReadOnly) { - throw new NotSupportedException(SR.Get(SRID.ReadOnlyInputGesturesCollection)); + throw new NotSupportedException(SR.ReadOnlyInputGesturesCollection); } if (inputGesture == null) @@ -380,7 +379,7 @@ public void Clear() { if (IsReadOnly) { - throw new NotSupportedException(SR.Get(SRID.ReadOnlyInputGesturesCollection)); + throw new NotSupportedException(SR.ReadOnlyInputGesturesCollection); } if (_innerGestureList != null) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyBinding.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyBinding.cs index a78351a88d2..62244f9a004 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyBinding.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyBinding.cs @@ -17,7 +17,6 @@ using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -95,7 +94,7 @@ public override InputGesture Gesture } else { - throw new ArgumentException(SR.Get(SRID.InputBinding_ExpectedInputGesture, typeof(KeyGesture))); + throw new ArgumentException(SR.Format(SR.InputBinding_ExpectedInputGesture, typeof(KeyGesture))); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGesture.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGesture.cs index 6610e1b5287..2356134b2ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGesture.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGesture.cs @@ -102,7 +102,7 @@ private KeyGesture(Key key, ModifierKeys modifiers, string displayString, bool v if(validateGesture && !IsValid(key, modifiers)) { - throw new NotSupportedException(SR.Get(SRID.KeyGesture_Invalid, modifiers, key)); + throw new NotSupportedException(SR.Format(SR.KeyGesture_Invalid, modifiers, key)); } _modifiers = modifiers; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MediaCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MediaCommands.cs index 165cc81e7ea..c381b4a5cc7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MediaCommands.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MediaCommands.cs @@ -19,7 +19,6 @@ using System.ComponentModel; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -265,30 +264,30 @@ internal static string GetUIText(byte commandId) switch ((CommandId)commandId) { - case CommandId.Play: uiText = SR.Get(SRID.MediaPlayText); break; - case CommandId.Pause: uiText = SR.Get(SRID.MediaPauseText); break; - case CommandId.Stop: uiText = SR.Get(SRID.MediaStopText); break; - case CommandId.Record: uiText = SR.Get(SRID.MediaRecordText); break; - case CommandId.NextTrack: uiText = SR.Get(SRID.MediaNextTrackText); break; - case CommandId.PreviousTrack: uiText = SR.Get(SRID.MediaPreviousTrackText); break; - case CommandId.FastForward: uiText = SR.Get(SRID.MediaFastForwardText); break; - case CommandId.Rewind: uiText = SR.Get(SRID.MediaRewindText); break; - case CommandId.ChannelUp: uiText = SR.Get(SRID.MediaChannelUpText); break; - case CommandId.ChannelDown: uiText = SR.Get(SRID.MediaChannelDownText); break; - case CommandId.TogglePlayPause: uiText = SR.Get(SRID.MediaTogglePlayPauseText); break; - case CommandId.IncreaseVolume: uiText = SR.Get(SRID.MediaIncreaseVolumeText); break; - case CommandId.DecreaseVolume: uiText = SR.Get(SRID.MediaDecreaseVolumeText); break; - case CommandId.MuteVolume: uiText = SR.Get(SRID.MediaMuteVolumeText); break; - case CommandId.IncreaseTreble: uiText = SR.Get(SRID.MediaIncreaseTrebleText); break; - case CommandId.DecreaseTreble: uiText = SR.Get(SRID.MediaDecreaseTrebleText); break; - case CommandId.IncreaseBass: uiText = SR.Get(SRID.MediaIncreaseBassText); break; - case CommandId.DecreaseBass: uiText = SR.Get(SRID.MediaDecreaseBassText); break; - case CommandId.BoostBass: uiText = SR.Get(SRID.MediaBoostBassText); break; - case CommandId.IncreaseMicrophoneVolume: uiText = SR.Get(SRID.MediaIncreaseMicrophoneVolumeText); break; - case CommandId.DecreaseMicrophoneVolume: uiText = SR.Get(SRID.MediaDecreaseMicrophoneVolumeText); break; - case CommandId.MuteMicrophoneVolume: uiText = SR.Get(SRID.MediaMuteMicrophoneVolumeText); break; - case CommandId.ToggleMicrophoneOnOff: uiText = SR.Get(SRID.MediaToggleMicrophoneOnOffText); break; - case CommandId.Select:uiText = SR.Get(SRID.MediaSelectText);break; + case CommandId.Play: uiText = SR.MediaPlayText; break; + case CommandId.Pause: uiText = SR.MediaPauseText; break; + case CommandId.Stop: uiText = SR.MediaStopText; break; + case CommandId.Record: uiText = SR.MediaRecordText; break; + case CommandId.NextTrack: uiText = SR.MediaNextTrackText; break; + case CommandId.PreviousTrack: uiText = SR.MediaPreviousTrackText; break; + case CommandId.FastForward: uiText = SR.MediaFastForwardText; break; + case CommandId.Rewind: uiText = SR.MediaRewindText; break; + case CommandId.ChannelUp: uiText = SR.MediaChannelUpText; break; + case CommandId.ChannelDown: uiText = SR.MediaChannelDownText; break; + case CommandId.TogglePlayPause: uiText = SR.MediaTogglePlayPauseText; break; + case CommandId.IncreaseVolume: uiText = SR.MediaIncreaseVolumeText; break; + case CommandId.DecreaseVolume: uiText = SR.MediaDecreaseVolumeText; break; + case CommandId.MuteVolume: uiText = SR.MediaMuteVolumeText; break; + case CommandId.IncreaseTreble: uiText = SR.MediaIncreaseTrebleText; break; + case CommandId.DecreaseTreble: uiText = SR.MediaDecreaseTrebleText; break; + case CommandId.IncreaseBass: uiText = SR.MediaIncreaseBassText; break; + case CommandId.DecreaseBass: uiText = SR.MediaDecreaseBassText; break; + case CommandId.BoostBass: uiText = SR.MediaBoostBassText; break; + case CommandId.IncreaseMicrophoneVolume: uiText = SR.MediaIncreaseMicrophoneVolumeText; break; + case CommandId.DecreaseMicrophoneVolume: uiText = SR.MediaDecreaseMicrophoneVolumeText; break; + case CommandId.MuteMicrophoneVolume: uiText = SR.MediaMuteMicrophoneVolumeText; break; + case CommandId.ToggleMicrophoneOnOff: uiText = SR.MediaToggleMicrophoneOnOffText; break; + case CommandId.Select:uiText = SR.MediaSelectText;break; } return uiText; } @@ -302,146 +301,146 @@ internal static InputGestureCollection LoadDefaultGestureFromResource(byte comma { case CommandId.Play: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaPlayKey), - SR.Get(SRID.MediaPlayKeyDisplayString), + SR.MediaPlayKey, + SR.MediaPlayKeyDisplayString, gestures); break; case CommandId.Pause: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaPauseKey), - SR.Get(SRID.MediaPauseKeyDisplayString), + SR.MediaPauseKey, + SR.MediaPauseKeyDisplayString, gestures); break; case CommandId.Stop: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaStopKey), - SR.Get(SRID.MediaStopKeyDisplayString), + SR.MediaStopKey, + SR.MediaStopKeyDisplayString, gestures); break; case CommandId.Record: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaRecordKey), - SR.Get(SRID.MediaRecordKeyDisplayString), + SR.MediaRecordKey, + SR.MediaRecordKeyDisplayString, gestures); break; case CommandId.NextTrack: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaNextTrackKey), - SR.Get(SRID.MediaNextTrackKeyDisplayString), + SR.MediaNextTrackKey, + SR.MediaNextTrackKeyDisplayString, gestures); break; case CommandId.PreviousTrack: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaPreviousTrackKey), - SR.Get(SRID.MediaPreviousTrackKeyDisplayString), + SR.MediaPreviousTrackKey, + SR.MediaPreviousTrackKeyDisplayString, gestures); break; case CommandId.FastForward: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaFastForwardKey), - SR.Get(SRID.MediaFastForwardKeyDisplayString), + SR.MediaFastForwardKey, + SR.MediaFastForwardKeyDisplayString, gestures); break; case CommandId.Rewind: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaRewindKey), - SR.Get(SRID.MediaRewindKeyDisplayString), + SR.MediaRewindKey, + SR.MediaRewindKeyDisplayString, gestures); break; case CommandId.ChannelUp: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaChannelUpKey), - SR.Get(SRID.MediaChannelUpKeyDisplayString), + SR.MediaChannelUpKey, + SR.MediaChannelUpKeyDisplayString, gestures); break; case CommandId.ChannelDown: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaChannelDownKey), - SR.Get(SRID.MediaChannelDownKeyDisplayString), + SR.MediaChannelDownKey, + SR.MediaChannelDownKeyDisplayString, gestures); break; case CommandId.TogglePlayPause: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaTogglePlayPauseKey), - SR.Get(SRID.MediaTogglePlayPauseKeyDisplayString), + SR.MediaTogglePlayPauseKey, + SR.MediaTogglePlayPauseKeyDisplayString, gestures); break; case CommandId.IncreaseVolume: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaIncreaseVolumeKey), - SR.Get(SRID.MediaIncreaseVolumeKeyDisplayString), + SR.MediaIncreaseVolumeKey, + SR.MediaIncreaseVolumeKeyDisplayString, gestures); break; case CommandId.DecreaseVolume: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaDecreaseVolumeKey), - SR.Get(SRID.MediaDecreaseVolumeKeyDisplayString), + SR.MediaDecreaseVolumeKey, + SR.MediaDecreaseVolumeKeyDisplayString, gestures); break; case CommandId.MuteVolume: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaMuteVolumeKey), - SR.Get(SRID.MediaMuteVolumeKeyDisplayString), + SR.MediaMuteVolumeKey, + SR.MediaMuteVolumeKeyDisplayString, gestures); break; case CommandId.IncreaseTreble: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaIncreaseTrebleKey), - SR.Get(SRID.MediaIncreaseTrebleKeyDisplayString), + SR.MediaIncreaseTrebleKey, + SR.MediaIncreaseTrebleKeyDisplayString, gestures); break; case CommandId.DecreaseTreble: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaDecreaseTrebleKey), - SR.Get(SRID.MediaDecreaseTrebleKeyDisplayString), + SR.MediaDecreaseTrebleKey, + SR.MediaDecreaseTrebleKeyDisplayString, gestures); break; case CommandId.IncreaseBass: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaIncreaseBassKey), - SR.Get(SRID.MediaIncreaseBassKeyDisplayString), + SR.MediaIncreaseBassKey, + SR.MediaIncreaseBassKeyDisplayString, gestures); break; case CommandId.DecreaseBass: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaDecreaseBassKey), - SR.Get(SRID.MediaDecreaseBassKeyDisplayString), + SR.MediaDecreaseBassKey, + SR.MediaDecreaseBassKeyDisplayString, gestures); break; case CommandId.BoostBass: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaBoostBassKey), - SR.Get(SRID.MediaBoostBassKeyDisplayString), + SR.MediaBoostBassKey, + SR.MediaBoostBassKeyDisplayString, gestures); break; case CommandId.IncreaseMicrophoneVolume: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaIncreaseMicrophoneVolumeKey), - SR.Get(SRID.MediaIncreaseMicrophoneVolumeKeyDisplayString), + SR.MediaIncreaseMicrophoneVolumeKey, + SR.MediaIncreaseMicrophoneVolumeKeyDisplayString, gestures); break; case CommandId.DecreaseMicrophoneVolume: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaDecreaseMicrophoneVolumeKey), - SR.Get(SRID.MediaDecreaseMicrophoneVolumeKeyDisplayString), + SR.MediaDecreaseMicrophoneVolumeKey, + SR.MediaDecreaseMicrophoneVolumeKeyDisplayString, gestures); break; case CommandId.MuteMicrophoneVolume: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaMuteMicrophoneVolumeKey), - SR.Get(SRID.MediaMuteMicrophoneVolumeKeyDisplayString), + SR.MediaMuteMicrophoneVolumeKey, + SR.MediaMuteMicrophoneVolumeKeyDisplayString, gestures); break; case CommandId.ToggleMicrophoneOnOff: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaToggleMicrophoneOnOffKey), - SR.Get(SRID.MediaToggleMicrophoneOnOffKeyDisplayString), + SR.MediaToggleMicrophoneOnOffKey, + SR.MediaToggleMicrophoneOnOffKeyDisplayString, gestures); break; case CommandId.Select: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.MediaSelectKey), - SR.Get(SRID.MediaSelectKeyDisplayString), + SR.MediaSelectKey, + SR.MediaSelectKeyDisplayString, gestures); break; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionConverter.cs index 7289bf6d0af..a04b337b1d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseActionConverter.cs @@ -19,7 +19,6 @@ using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -95,7 +94,7 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c case "RIGHTDOUBLECLICK" : mouseAction = MouseAction.RightDoubleClick; break; case "MIDDLEDOUBLECLICK": mouseAction = MouseAction.MiddleDoubleClick; break; default : - throw new NotSupportedException(SR.Get(SRID.Unsupported_MouseAction, mouseActionToken)); + throw new NotSupportedException(SR.Format(SR.Unsupported_MouseAction, mouseActionToken)); } return mouseAction; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseBinding.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseBinding.cs index 7c92fa5f07f..2fca5af77ca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseBinding.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/MouseBinding.cs @@ -19,7 +19,6 @@ using System.ComponentModel; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -112,7 +111,7 @@ public override InputGesture Gesture } else { - throw new ArgumentException(SR.Get(SRID.InputBinding_ExpectedInputGesture, typeof(MouseGesture))); + throw new ArgumentException(SR.Format(SR.InputBinding_ExpectedInputGesture, typeof(MouseGesture))); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/NavigationCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/NavigationCommands.cs index ed2c4c6bab2..fbc597e986b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/NavigationCommands.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/NavigationCommands.cs @@ -20,7 +20,6 @@ using System.Security; using MS.Internal; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input @@ -208,22 +207,22 @@ internal static string GetUIText(byte commandId) switch ((CommandId)commandId) { - case CommandId.BrowseBack: uiText = SR.Get(SRID.BrowseBackText); break; - case CommandId.BrowseForward: uiText = SR.Get(SRID.BrowseForwardText); break; - case CommandId.BrowseHome: uiText = SR.Get(SRID.BrowseHomeText); break; - case CommandId.BrowseStop: uiText = SR.Get(SRID.BrowseStopText); break; - case CommandId.Refresh: uiText = SR.Get(SRID.RefreshText); break; - case CommandId.Favorites: uiText = SR.Get(SRID.FavoritesText); break; - case CommandId.Search: uiText = SR.Get(SRID.SearchText); break; - case CommandId.IncreaseZoom: uiText = SR.Get(SRID.IncreaseZoomText); break; - case CommandId.DecreaseZoom: uiText = SR.Get(SRID.DecreaseZoomText); break; - case CommandId.Zoom: uiText = SR.Get(SRID.ZoomText); break; - case CommandId.NextPage: uiText = SR.Get(SRID.NextPageText); break; - case CommandId.PreviousPage: uiText = SR.Get(SRID.PreviousPageText); break; - case CommandId.FirstPage: uiText = SR.Get(SRID.FirstPageText); break; - case CommandId.LastPage: uiText = SR.Get(SRID.LastPageText); break; - case CommandId.GoToPage: uiText = SR.Get(SRID.GoToPageText); break; - case CommandId.NavigateJournal: uiText = SR.Get(SRID.NavigateJournalText); break; + case CommandId.BrowseBack: uiText = SR.BrowseBackText; break; + case CommandId.BrowseForward: uiText = SR.BrowseForwardText; break; + case CommandId.BrowseHome: uiText = SR.BrowseHomeText; break; + case CommandId.BrowseStop: uiText = SR.BrowseStopText; break; + case CommandId.Refresh: uiText = SR.RefreshText; break; + case CommandId.Favorites: uiText = SR.FavoritesText; break; + case CommandId.Search: uiText = SR.SearchText; break; + case CommandId.IncreaseZoom: uiText = SR.IncreaseZoomText; break; + case CommandId.DecreaseZoom: uiText = SR.DecreaseZoomText; break; + case CommandId.Zoom: uiText = SR.ZoomText; break; + case CommandId.NextPage: uiText = SR.NextPageText; break; + case CommandId.PreviousPage: uiText = SR.PreviousPageText; break; + case CommandId.FirstPage: uiText = SR.FirstPageText; break; + case CommandId.LastPage: uiText = SR.LastPageText; break; + case CommandId.GoToPage: uiText = SR.GoToPageText; break; + case CommandId.NavigateJournal: uiText = SR.NavigateJournalText; break; } return uiText; } @@ -238,97 +237,97 @@ internal static InputGestureCollection LoadDefaultGestureFromResource(byte comma case CommandId.BrowseBack: KeyGesture.AddGesturesFromResourceStrings( BrowseBackKey, - SR.Get(SRID.BrowseBackKeyDisplayString), + SR.BrowseBackKeyDisplayString, gestures); break; case CommandId.BrowseForward: KeyGesture.AddGesturesFromResourceStrings( BrowseForwardKey, - SR.Get(SRID.BrowseForwardKeyDisplayString), + SR.BrowseForwardKeyDisplayString, gestures); break; case CommandId.BrowseHome: KeyGesture.AddGesturesFromResourceStrings( BrowseHomeKey, - SR.Get(SRID.BrowseHomeKeyDisplayString), + SR.BrowseHomeKeyDisplayString, gestures); break; case CommandId.BrowseStop: KeyGesture.AddGesturesFromResourceStrings( BrowseStopKey, - SR.Get(SRID.BrowseStopKeyDisplayString), + SR.BrowseStopKeyDisplayString, gestures); break; case CommandId.Refresh: KeyGesture.AddGesturesFromResourceStrings( RefreshKey, - SR.Get(SRID.RefreshKeyDisplayString), + SR.RefreshKeyDisplayString, gestures); break; case CommandId.Favorites: KeyGesture.AddGesturesFromResourceStrings( FavoritesKey, - SR.Get(SRID.FavoritesKeyDisplayString), + SR.FavoritesKeyDisplayString, gestures); break; case CommandId.Search: KeyGesture.AddGesturesFromResourceStrings( SearchKey, - SR.Get(SRID.SearchKeyDisplayString), + SR.SearchKeyDisplayString, gestures); break; case CommandId.IncreaseZoom: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.IncreaseZoomKey), - SR.Get(SRID.IncreaseZoomKeyDisplayString), + SR.IncreaseZoomKey, + SR.IncreaseZoomKeyDisplayString, gestures); break; case CommandId.DecreaseZoom: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.DecreaseZoomKey), - SR.Get(SRID.DecreaseZoomKeyDisplayString), + SR.DecreaseZoomKey, + SR.DecreaseZoomKeyDisplayString, gestures); break; case CommandId.Zoom: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.ZoomKey), - SR.Get(SRID.ZoomKeyDisplayString), + SR.ZoomKey, + SR.ZoomKeyDisplayString, gestures); break; case CommandId.NextPage: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.NextPageKey), - SR.Get(SRID.NextPageKeyDisplayString), + SR.NextPageKey, + SR.NextPageKeyDisplayString, gestures); break; case CommandId.PreviousPage: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.PreviousPageKey), - SR.Get(SRID.PreviousPageKeyDisplayString), + SR.PreviousPageKey, + SR.PreviousPageKeyDisplayString, gestures); break; case CommandId.FirstPage: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.FirstPageKey), - SR.Get(SRID.FirstPageKeyDisplayString), + SR.FirstPageKey, + SR.FirstPageKeyDisplayString, gestures); break; case CommandId.LastPage: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.LastPageKey), - SR.Get(SRID.LastPageKeyDisplayString), + SR.LastPageKey, + SR.LastPageKeyDisplayString, gestures); break; case CommandId.GoToPage: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.GoToPageKey), - SR.Get(SRID.GoToPageKeyDisplayString), + SR.GoToPageKey, + SR.GoToPageKeyDisplayString, gestures); break; case CommandId.NavigateJournal: KeyGesture.AddGesturesFromResourceStrings( - SR.Get(SRID.NavigateJournalKey), - SR.Get(SRID.NavigateJournalKeyDisplayString), + SR.NavigateJournalKey, + SR.NavigateJournalKeyDisplayString, gestures); break; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedCommand.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedCommand.cs index e216cf7573f..e200108416c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedCommand.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/RoutedCommand.cs @@ -16,7 +16,6 @@ using MS.Internal.PresentationCore; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -63,7 +62,7 @@ public RoutedCommand(string name, Type ownerType, InputGestureCollection inputGe if (name.Length == 0) { - throw new ArgumentException(SR.Get(SRID.StringEmpty), "name"); + throw new ArgumentException(SR.StringEmpty, "name"); } if (ownerType == null) @@ -138,7 +137,7 @@ public void Execute(object parameter, IInputElement target) // We only support UIElement, ContentElement and UIElement3D if ((target != null) && !InputElement.IsValid(target)) { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, target.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType())); } if (target == null) @@ -174,7 +173,7 @@ internal bool CriticalCanExecute(object parameter, IInputElement target, bool tr // We only support UIElement, ContentElement and UIElement3D if ((target != null) && !InputElement.IsValid(target)) { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, target.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType())); } if (target == null) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursor.cs index d56419583e2..f8967bab099 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursor.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Cursor.cs @@ -13,7 +13,6 @@ using System.Security; using SecurityHelper=MS.Internal.SecurityHelper; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; // FriendAccessAllowed namespace System.Windows.Input @@ -39,7 +38,7 @@ internal Cursor(CursorType cursorType) } else { - throw new ArgumentException(SR.Get(SRID.InvalidCursorType, cursorType)); + throw new ArgumentException(SR.Format(SR.InvalidCursorType, cursorType)); } } @@ -71,7 +70,7 @@ public Cursor(string cursorFile, bool scaleWithDpi) } else { - throw new ArgumentException(SR.Get(SRID.Cursor_UnsupportedFormat , cursorFile)); + throw new ArgumentException(SR.Format(SR.Cursor_UnsupportedFormat , cursorFile)); } } @@ -203,7 +202,7 @@ private void LoadFromFile(string fileName) { if ((errorCode == NativeMethods.ERROR_FILE_NOT_FOUND) || (errorCode == NativeMethods.ERROR_PATH_NOT_FOUND)) { - throw new Win32Exception(errorCode, SR.Get(SRID.Cursor_LoadImageFailure, fileName)); + throw new Win32Exception(errorCode, SR.Format(SR.Cursor_LoadImageFailure, fileName)); } else { @@ -212,7 +211,7 @@ private void LoadFromFile(string fileName) } else { - throw new ArgumentException(SR.Get(SRID.Cursor_LoadImageFailure, fileName)); + throw new ArgumentException(SR.Format(SR.Cursor_LoadImageFailure, fileName)); } } } @@ -266,7 +265,7 @@ private void LegacyLoadFromStream(Stream cursorStream) (_scaleWithDpi? NativeMethods.LR_DEFAULTSIZE : 0x0000)); if (_cursorHandle == null || _cursorHandle.IsInvalid) { - throw new ArgumentException(SR.Get(SRID.Cursor_InvalidStream)); + throw new ArgumentException(SR.Cursor_InvalidStream); } } finally @@ -312,7 +311,7 @@ private void LoadFromStream(Stream cursorStream) (_scaleWithDpi? NativeMethods.LR_DEFAULTSIZE : 0x0000)); if (_cursorHandle == null || _cursorHandle.IsInvalid) { - throw new ArgumentException(SR.Get(SRID.Cursor_InvalidStream)); + throw new ArgumentException(SR.Cursor_InvalidStream); } } finally diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventArgs.cs index aa75c5a3c53..3cf72b89397 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/FocusChangedEventArgs.cs @@ -6,7 +6,6 @@ using System; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -33,10 +32,10 @@ public class KeyboardFocusChangedEventArgs : KeyboardEventArgs public KeyboardFocusChangedEventArgs(KeyboardDevice keyboard, int timestamp, IInputElement oldFocus, IInputElement newFocus) : base(keyboard, timestamp) { if (oldFocus != null && !InputElement.IsValid(oldFocus)) - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, oldFocus.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldFocus.GetType())); if (newFocus != null && !InputElement.IsValid(newFocus)) - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, newFocus.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, newFocus.GetType())); _oldFocus = oldFocus; _newFocus = newFocus; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageManager.cs index 245f27c6bb7..3c886d89a04 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputLanguageManager.cs @@ -20,7 +20,6 @@ using System.ComponentModel; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -513,7 +512,7 @@ private void SetSourceCurrentLanguageId(CultureInfo languageId) { if (_source == null) { - throw new InvalidOperationException(SR.Get(SRID.InputLanguageManager_NotReadyToChangeCurrentLanguage)); + throw new InvalidOperationException(SR.InputLanguageManager_NotReadyToChangeCurrentLanguage); } _source.CurrentInputLanguage = languageId; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputManager.cs index aa38d9298e7..bc2cbb1e436 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputManager.cs @@ -16,7 +16,6 @@ using System.Windows.Automation; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -154,7 +153,7 @@ private InputManager() // thread is not STA. if(Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new InvalidOperationException(SR.Get(SRID.RequiresSTA)); + throw new InvalidOperationException(SR.RequiresSTA); } _stagingArea = new Stack(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethod.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethod.cs index 36d80603e81..a3a4011f7d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethod.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputMethod.cs @@ -25,7 +25,6 @@ using System; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -860,7 +859,7 @@ public ImeConversionModeValues ImeConversionMode { if (!IsValidConversionMode(value)) { - throw new ArgumentException(SR.Get(SRID.InputMethod_InvalidConversionMode, value)); + throw new ArgumentException(SR.Format(SR.InputMethod_InvalidConversionMode, value)); } Debug.Assert((value & ImeConversionModeValues.DoNotCare) == 0); @@ -1111,7 +1110,7 @@ public ImeSentenceModeValues ImeSentenceMode { if (!IsValidSentenceMode(value)) { - throw new ArgumentException(SR.Get(SRID.InputMethod_InvalidSentenceMode, value)); + throw new ArgumentException(SR.Format(SR.InputMethod_InvalidSentenceMode, value)); } Debug.Assert((value & ImeSentenceModeValues.DoNotCare) == 0); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProviderSite.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProviderSite.cs index 23384a0a773..0d6ca052052 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProviderSite.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputProviderSite.cs @@ -10,7 +10,6 @@ using System.Windows.Threading; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -93,7 +92,7 @@ public bool ReportInput(InputReport inputReport) { if(IsDisposed) { - throw new ObjectDisposedException(SR.Get(SRID.InputProviderSiteDisposed)); + throw new ObjectDisposedException(SR.InputProviderSiteDisposed); } bool handled = false; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScope.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScope.cs index 2014d3487fc..e72025a3823 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScope.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/InputScope.cs @@ -19,7 +19,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -186,7 +185,7 @@ public InputScopeNameValue NameValue { if (!IsValidInputScopeNameValue(value)) { - throw new ArgumentException(SR.Get(SRID.InputScope_InvalidInputScopeName, "value")); + throw new ArgumentException(SR.Format(SR.InputScope_InvalidInputScopeName, "value")); } _nameValue = value; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardDevice.cs index 98652fe9098..ef2380e6567 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/KeyboardDevice.cs @@ -14,7 +14,6 @@ using System.Windows.Automation.Peers; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -145,7 +144,7 @@ public IInputElement Focus(IInputElement element) if(!InputElement.IsValid(element)) { #pragma warning suppress 6506 // element is obviously not null - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, element.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, element.GetType())); } oFocus = (DependencyObject) element; @@ -440,7 +439,7 @@ private void ChangeFocus(DependencyObject focus, int timestamp) } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, o.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); } } if(_focus != null) @@ -466,7 +465,7 @@ private void ChangeFocus(DependencyObject focus, int timestamp) } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, o.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Manipulation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Manipulation.cs index 47a66e75c1e..2b372382051 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Manipulation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Manipulation.cs @@ -86,7 +86,7 @@ public static void CompleteManipulation(UIElement element) } if (!TryCompleteManipulation(element)) { - throw new InvalidOperationException(SR.Get(SRID.Manipulation_ManipulationNotActive)); + throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); } } @@ -121,7 +121,7 @@ public static void SetManipulationMode(UIElement element, ManipulationModes mode } else { - throw new InvalidOperationException(SR.Get(SRID.Manipulation_ManipulationNotActive)); + throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); } } @@ -168,7 +168,7 @@ public static void SetManipulationContainer(UIElement element, IInputElement con } else { - throw new InvalidOperationException(SR.Get(SRID.Manipulation_ManipulationNotActive)); + throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); } } @@ -213,7 +213,7 @@ public static void SetManipulationPivot(UIElement element, ManipulationPivot piv } else { - throw new InvalidOperationException(SR.Get(SRID.Manipulation_ManipulationNotActive)); + throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); } } @@ -256,7 +256,7 @@ public static void AddManipulator(UIElement element, IManipulator manipulator) } if (!element.IsManipulationEnabled) { - throw new InvalidOperationException(SR.Get(SRID.Manipulation_ManipulationNotEnabled)); + throw new InvalidOperationException(SR.Manipulation_ManipulationNotEnabled); } ManipulationDevice device = ManipulationDevice.AddManipulationDevice(element); @@ -282,7 +282,7 @@ public static void RemoveManipulator(UIElement element, IManipulator manipulator if (!TryRemoveManipulator(element, manipulator)) { - throw new InvalidOperationException(SR.Get(SRID.Manipulation_ManipulationNotActive)); + throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); } } @@ -322,7 +322,7 @@ public static void SetManipulationParameter(UIElement element, ManipulationParam } else { - throw new InvalidOperationException(SR.Get(SRID.Manipulation_ManipulationNotActive)); + throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartingEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartingEventArgs.cs index ab901c7ee75..8e46104af88 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartingEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ManipulationStartingEventArgs.cs @@ -36,7 +36,7 @@ public ManipulationModes Mode { if ((value & ~ManipulationModes.All) != 0) { - throw new ArgumentException(SR.Get(SRID.Manipulation_InvalidManipulationMode), "value"); + throw new ArgumentException(SR.Manipulation_InvalidManipulationMode, "value"); } _mode = value; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseDevice.cs index d28a0b56451..66e9c794964 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseDevice.cs @@ -18,7 +18,6 @@ using System; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -332,7 +331,7 @@ public bool Capture(IInputElement element, CaptureMode captureMode) DependencyObject eltDO = element as DependencyObject; if (eltDO != null && !InputElement.IsValid(element)) { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, eltDO.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, eltDO.GetType())); } bool success = false; @@ -582,7 +581,7 @@ public Point GetPosition(IInputElement relativeTo) // Validate that relativeTo is either a UIElement, a ContentElement or a UIElement3D. if (relativeTo != null && !InputElement.IsValid(relativeTo)) { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, relativeTo.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType())); } PresentationSource relativePresentationSource = null; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ProcessInputEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ProcessInputEventArgs.cs index 4cc1c078c9a..ce4c7bd6e98 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ProcessInputEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/ProcessInputEventArgs.cs @@ -7,7 +7,6 @@ using MS.Internal; using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -55,7 +54,7 @@ public StagingAreaInputItem PushInput(InputEventArgs input, { if(!_allowAccessToStagingArea) { - throw new InvalidOperationException(SR.Get(SRID.NotAllowedToAccessStagingArea)); + throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea); } return this.UnsecureInputManager.PushInput(input, promote); @@ -75,7 +74,7 @@ public StagingAreaInputItem PushInput(StagingAreaInputItem input) { if(!_allowAccessToStagingArea) { - throw new InvalidOperationException(SR.Get(SRID.NotAllowedToAccessStagingArea)); + throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea); } return this.UnsecureInputManager.PushInput(input); @@ -93,7 +92,7 @@ public StagingAreaInputItem PopInput() if(!_allowAccessToStagingArea) { - throw new InvalidOperationException(SR.Get(SRID.NotAllowedToAccessStagingArea)); + throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea); } return this.UnsecureInputManager.PopInput(); @@ -111,7 +110,7 @@ public StagingAreaInputItem PeekInput() if(!_allowAccessToStagingArea) { - throw new InvalidOperationException(SR.Get(SRID.NotAllowedToAccessStagingArea)); + throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea); } return this.UnsecureInputManager.PeekInput(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs index 46c1f8b1a01..9994811d3d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/DynamicRenderer.cs @@ -25,7 +25,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPlugIns { @@ -263,7 +262,7 @@ public virtual void Reset(StylusDevice stylusDevice, StylusPointCollection stylu if (inAir) { - throw new ArgumentException(SR.Get(SRID.Stylus_MustBeDownToCallReset), "stylusDevice"); + throw new ArgumentException(SR.Stylus_MustBeDownToCallReset, "stylusDevice"); } // Avoid reentrancy due to lock() call. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInput.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInput.cs index 589138c8c0a..614c0aa1e3a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInput.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInput.cs @@ -10,7 +10,6 @@ using MS.Internal.PresentationCore; // SecurityHelper using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPlugIns { @@ -38,7 +37,7 @@ internal RawStylusInput( } if (tabletToElementTransform.Inverse == null) { - throw new ArgumentException(SR.Get(SRID.Stylus_MatrixNotInvertable), "tabletToElementTransform"); + throw new ArgumentException(SR.Stylus_MatrixNotInvertable, "tabletToElementTransform"); } if (targetPlugInCollection == null) { @@ -115,11 +114,11 @@ public void SetStylusPoints(StylusPointCollection stylusPoints) if (!StylusPointDescription.AreCompatible( stylusPoints.Description, _report.StylusPointDescription)) { - throw new ArgumentException(SR.Get(SRID.IncompatibleStylusPointDescriptions), "stylusPoints"); + throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, "stylusPoints"); } if (stylusPoints.Count == 0) { - throw new ArgumentException(SR.Get(SRID.Stylus_StylusPointsCantBeEmpty), "stylusPoints"); + throw new ArgumentException(SR.Stylus_StylusPointsCantBeEmpty, "stylusPoints"); } _stylusPoints = stylusPoints.Clone(); @@ -133,7 +132,7 @@ public void NotifyWhenProcessed(object callbackData) { if (_currentNotifyPlugIn == null) { - throw new InvalidOperationException(SR.Get(SRID.Stylus_CanOnlyCallForDownMoveOrUp)); + throw new InvalidOperationException(SR.Stylus_CanOnlyCallForDownMoveOrUp); } if (_customData == null) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomData.cs index 8d47e0ce120..6f1b10a57a9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomData.cs @@ -7,7 +7,6 @@ using System.Windows; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPlugIns { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomDataList.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomDataList.cs index 89cf999077b..7b40ee5cf77 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomDataList.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputCustomDataList.cs @@ -11,7 +11,6 @@ using System.Windows.Threading; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPlugIns { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputReport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputReport.cs index 85adabab57a..72fd8923072 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputReport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusInputReport.cs @@ -13,7 +13,6 @@ using MS.Internal; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; using System.Windows.Input.StylusWisp; namespace System.Windows.Input @@ -190,7 +189,7 @@ internal RawStylusInputReport( // Validate parameters if (!RawStylusActionsHelper.IsValid(actions)) { - throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, nameof(actions))); + throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, nameof(actions))); } if (data == null && actions != RawStylusActions.InRange) { @@ -246,7 +245,7 @@ internal RawStylusInputReport( // Validate parameters if (!RawStylusActionsHelper.IsValid(actions)) { - throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, nameof(actions))); + throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, nameof(actions))); } if (data == null && actions != RawStylusActions.InRange) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusSystemGestureInputReport.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusSystemGestureInputReport.cs index 66f670633ea..f044d9b324c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusSystemGestureInputReport.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/RawStylusSystemGestureInputReport.cs @@ -7,7 +7,6 @@ using System.Security; using System.Windows.Input.StylusWisp; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -160,7 +159,7 @@ private void Initialize(SystemGesture systemGesture, int gestureX, int gestureY, { if (!RawStylusSystemGestureInputReport.IsValidSystemGesture(systemGesture, true, true)) { - throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, nameof(systemGesture))); + throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, nameof(systemGesture))); } _id = systemGesture; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonCollection.cs index ce7af27b99d..2cec3d4de10 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusButtonCollection.cs @@ -13,7 +13,6 @@ using MS.Utility; using MS.Internal; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDevice.cs index 8757e2566d8..f432d7bbbe5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDevice.cs @@ -18,7 +18,6 @@ using System.Windows.Media; using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceBase.cs index 4fca0d99013..c88a7fb307a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceBase.cs @@ -19,7 +19,6 @@ using System.Windows.Media; using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceCollection.cs index c58e1899ffb..6cf8c6ccdbb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusDeviceCollection.cs @@ -12,7 +12,6 @@ using System.Windows.Media; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusLogic.cs index b95ad4d320e..b0f201c0026 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusLogic.cs @@ -24,7 +24,6 @@ using System.Windows.Media; using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollection.cs index d5dac0eeba1..b41ce07d571 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollection.cs @@ -13,7 +13,6 @@ using System.Security; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPlugIns { @@ -46,12 +45,12 @@ protected override void InsertItem(int index, StylusPlugIn plugIn) // Validate the input parameter if (null == plugIn) { - throw new ArgumentNullException(nameof(plugIn), SR.Get(SRID.Stylus_PlugInIsNull)); + throw new ArgumentNullException(nameof(plugIn), SR.Stylus_PlugInIsNull); } if (IndexOf(plugIn) != -1) { - throw new ArgumentException(SR.Get(SRID.Stylus_PlugInIsDuplicated), nameof(plugIn)); + throw new ArgumentException(SR.Stylus_PlugInIsDuplicated, nameof(plugIn)); } // Disable processing of the queue during blocking operations to prevent unrelated reentrancy @@ -179,12 +178,12 @@ protected override void SetItem(int index, StylusPlugIn plugIn) if (null == plugIn) { - throw new ArgumentNullException("plugIn", SR.Get(SRID.Stylus_PlugInIsNull)); + throw new ArgumentNullException("plugIn", SR.Stylus_PlugInIsNull); } if (IndexOf(plugIn) != -1) { - throw new ArgumentException(SR.Get(SRID.Stylus_PlugInIsDuplicated), "plugIn"); + throw new ArgumentException(SR.Stylus_PlugInIsDuplicated, "plugIn"); } // Disable processing of the queue during blocking operations to prevent unrelated reentrancy diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollectionBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollectionBase.cs index 4c223975469..6a79cb442f1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollectionBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPlugInCollectionBase.cs @@ -15,7 +15,6 @@ using System.Security; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPlugIns { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPoint.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPoint.cs index 2e760aae830..0b68b1e123d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPoint.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPoint.cs @@ -13,7 +13,6 @@ using MS.Utility; using MS.Internal; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -81,11 +80,11 @@ internal StylusPoint( { if (Double.IsNaN(x)) { - throw new ArgumentOutOfRangeException("x", SR.Get(SRID.InvalidStylusPointXYNaN)); + throw new ArgumentOutOfRangeException("x", SR.InvalidStylusPointXYNaN); } if (Double.IsNaN(y)) { - throw new ArgumentOutOfRangeException("y", SR.Get(SRID.InvalidStylusPointXYNaN)); + throw new ArgumentOutOfRangeException("y", SR.InvalidStylusPointXYNaN); } @@ -93,7 +92,7 @@ internal StylusPoint( if (validatePressureFactor && (pressureFactor == Single.NaN || pressureFactor < 0.0f || pressureFactor > 1.0f)) { - throw new ArgumentOutOfRangeException("pressureFactor", SR.Get(SRID.InvalidPressureValue)); + throw new ArgumentOutOfRangeException("pressureFactor", SR.InvalidPressureValue); } // // only accept values between MaxXY and MinXY @@ -133,7 +132,7 @@ ReadOnlyCollection properties int expectedAdditionalValues = properties.Count - StylusPointDescription.RequiredCountOfProperties; //for x, y, pressure if (additionalValues.Length != expectedAdditionalValues) { - throw new ArgumentException(SR.Get(SRID.InvalidAdditionalDataForStylusPoint), "additionalValues"); + throw new ArgumentException(SR.InvalidAdditionalDataForStylusPoint, "additionalValues"); } // @@ -180,7 +179,7 @@ public double X { if (Double.IsNaN(value)) { - throw new ArgumentOutOfRangeException("X", SR.Get(SRID.InvalidStylusPointXYNaN)); + throw new ArgumentOutOfRangeException("X", SR.InvalidStylusPointXYNaN); } // // only accept values between MaxXY and MinXY @@ -200,7 +199,7 @@ public double Y { if (Double.IsNaN(value)) { - throw new ArgumentOutOfRangeException("Y", SR.Get(SRID.InvalidStylusPointXYNaN)); + throw new ArgumentOutOfRangeException("Y", SR.InvalidStylusPointXYNaN); } // // only accept values between MaxXY and MinXY @@ -235,7 +234,7 @@ public float PressureFactor { if (value < 0.0f || value > 1.0f) { - throw new ArgumentOutOfRangeException("PressureFactor", SR.Get(SRID.InvalidPressureValue)); + throw new ArgumentOutOfRangeException("PressureFactor", SR.InvalidPressureValue); } _pressureFactor = value; } @@ -309,7 +308,7 @@ public int GetPropertyValue(StylusPointProperty stylusPointProperty) int propertyIndex = this.Description.GetPropertyIndex(stylusPointProperty.Id); if (-1 == propertyIndex) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointProperty), "stylusPointProperty"); + throw new ArgumentException(SR.InvalidStylusPointProperty, "stylusPointProperty"); } if (stylusPointProperty.IsButton) { @@ -395,13 +394,13 @@ internal void SetPropertyValue(StylusPointProperty stylusPointProperty, int valu int propertyIndex = this.Description.GetPropertyIndex(stylusPointProperty.Id); if (-1 == propertyIndex) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointProperty), "propertyId"); + throw new ArgumentException(SR.InvalidStylusPointProperty, "propertyId"); } if (stylusPointProperty.IsButton) { if (value < 0 || value > 1) { - throw new ArgumentOutOfRangeException("value", SR.Get(SRID.InvalidMinMaxForButton)); + throw new ArgumentOutOfRangeException("value", SR.InvalidMinMaxForButton); } if (copyBeforeWrite) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointCollection.cs index 165f175ccca..fa98970f3c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointCollection.cs @@ -14,7 +14,6 @@ using System.Diagnostics; using MS.Utility; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -52,7 +51,7 @@ public StylusPointCollection(int initialCapacity) { if (initialCapacity < 0) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointConstructionZeroLengthCollection), "initialCapacity"); + throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, "initialCapacity"); } ((List)this.Items).Capacity = initialCapacity; } @@ -80,7 +79,7 @@ public StylusPointCollection(StylusPointDescription stylusPointDescription, int { if (initialCapacity < 0) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointConstructionZeroLengthCollection), "initialCapacity"); + throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, "initialCapacity"); } ((List)this.Items).Capacity = initialCapacity; } @@ -101,7 +100,7 @@ public StylusPointCollection(IEnumerable stylusPoints) List points = new List(stylusPoints); if (points.Count == 0) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointConstructionZeroLengthCollection), "stylusPoints"); + throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, "stylusPoints"); } // @@ -139,7 +138,7 @@ public StylusPointCollection(IEnumerable points) if (stylusPoints.Count == 0) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointConstructionZeroLengthCollection), "points"); + throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, "points"); } ((List)this.Items).Capacity = stylusPoints.Count; @@ -226,7 +225,7 @@ public void Add(StylusPointCollection stylusPoints) if (!StylusPointDescription.AreCompatible(stylusPoints.Description, _stylusPointDescription)) { - throw new ArgumentException(SR.Get(SRID.IncompatibleStylusPointDescriptions), "stylusPoints"); + throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, "stylusPoints"); } // cache count outside of the loop, so if this SPC is ever passed @@ -274,7 +273,7 @@ protected override sealed void ClearItems() } else { - throw new InvalidOperationException(SR.Get(SRID.InvalidStylusPointCollectionZeroCount)); + throw new InvalidOperationException(SR.InvalidStylusPointCollectionZeroCount); } } @@ -291,7 +290,7 @@ protected override sealed void RemoveItem(int index) } else { - throw new InvalidOperationException(SR.Get(SRID.InvalidStylusPointCollectionZeroCount)); + throw new InvalidOperationException(SR.InvalidStylusPointCollectionZeroCount); } } @@ -304,7 +303,7 @@ protected override sealed void InsertItem(int index, StylusPoint stylusPoint) if (!StylusPointDescription.AreCompatible(stylusPoint.Description, _stylusPointDescription)) { - throw new ArgumentException(SR.Get(SRID.IncompatibleStylusPointDescriptions), "stylusPoint"); + throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, "stylusPoint"); } stylusPoint.Description = _stylusPointDescription; @@ -322,7 +321,7 @@ protected override sealed void SetItem(int index, StylusPoint stylusPoint) if (!StylusPointDescription.AreCompatible(stylusPoint.Description, _stylusPointDescription)) { - throw new ArgumentException(SR.Get(SRID.IncompatibleStylusPointDescriptions), "stylusPoint"); + throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, "stylusPoint"); } stylusPoint.Description = _stylusPointDescription; @@ -475,7 +474,7 @@ internal StylusPointCollection Reformat(StylusPointDescription subsetToReformatT { if (!subsetToReformatTo.IsSubsetOf(this.Description)) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointDescriptionSubset), "subsetToReformatTo"); + throw new ArgumentException(SR.InvalidStylusPointDescriptionSubset, "subsetToReformatTo"); } StylusPointDescription subsetToReformatToWithCurrentMetrics = diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointDescription.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointDescription.cs index ed65fec0005..e87f9716ae2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointDescription.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointDescription.cs @@ -11,7 +11,6 @@ using System.Collections.ObjectModel; using System.Diagnostics; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -67,7 +66,7 @@ public StylusPointDescription(IEnumerable stylusPointPr infos[RequiredYIndex].Id != StylusPointPropertyIds.Y || infos[RequiredPressureIndex].Id != StylusPointPropertyIds.NormalPressure) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointDescription), "stylusPointPropertyInfos"); + throw new ArgumentException(SR.InvalidStylusPointDescription, "stylusPointPropertyInfos"); } // @@ -83,7 +82,7 @@ public StylusPointDescription(IEnumerable stylusPointPr { if (seenIds.Contains(infos[x].Id)) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointDescriptionDuplicatesFound), "stylusPointPropertyInfos"); + throw new ArgumentException(SR.InvalidStylusPointDescriptionDuplicatesFound, "stylusPointPropertyInfos"); } if (infos[x].IsButton) { @@ -94,14 +93,14 @@ public StylusPointDescription(IEnumerable stylusPointPr //this is not a button, make sure we haven't seen one before if (buttonCount > 0) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointDescriptionButtonsMustBeLast), "stylusPointPropertyInfos"); + throw new ArgumentException(SR.InvalidStylusPointDescriptionButtonsMustBeLast, "stylusPointPropertyInfos"); } } seenIds.Add(infos[x].Id); } if (buttonCount > MaximumButtonCount) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointDescriptionTooManyButtons), "stylusPointPropertyInfos"); + throw new ArgumentException(SR.InvalidStylusPointDescriptionTooManyButtons, "stylusPointPropertyInfos"); } _buttonCount = buttonCount; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperties.cs index ef5e60cd112..42acf22348a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperties.cs @@ -9,7 +9,6 @@ using System.Windows.Media; using System.Collections.Generic; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperty.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperty.cs index 7d4e907e801..579585b4837 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperty.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointProperty.cs @@ -10,7 +10,6 @@ using System.Windows.Media; using System.Collections.Generic; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -64,7 +63,7 @@ private void Initialize(Guid identifier, bool isButton) if (!isButton) { //error, this is a known button - throw new ArgumentException(SR.Get(SRID.InvalidIsButtonForId), "isButton"); + throw new ArgumentException(SR.InvalidIsButtonForId, "isButton"); } } else @@ -72,7 +71,7 @@ private void Initialize(Guid identifier, bool isButton) if (StylusPointPropertyIds.IsKnownId(identifier) && isButton) { //error, this is a known guid that is NOT a button - throw new ArgumentException(SR.Get(SRID.InvalidIsButtonForId2), "isButton"); + throw new ArgumentException(SR.InvalidIsButtonForId2, "isButton"); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfo.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfo.cs index 1eea3b43c93..d567a7bce21 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfo.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusPointPropertyInfo.cs @@ -12,7 +12,6 @@ using System.ComponentModel; using MS.Utility; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -64,13 +63,13 @@ public StylusPointPropertyInfo(StylusPointProperty stylusPointProperty, int mini // validate min/max if (maximum < minimum) { - throw new ArgumentException(SR.Get(SRID.Stylus_InvalidMax), "maximum"); + throw new ArgumentException(SR.Stylus_InvalidMax, "maximum"); } // validate resolution if (resolution < 0.0f) { - throw new ArgumentException(SR.Get(SRID.InvalidStylusPointPropertyInfoResolution), "resolution"); + throw new ArgumentException(SR.InvalidStylusPointPropertyInfoResolution, "resolution"); } _min = minimum; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGestureEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGestureEventArgs.cs index fbe9f5cbe23..9aa9dd89d0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGestureEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/StylusSystemGestureEventArgs.cs @@ -8,7 +8,6 @@ using System.Windows.Media; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -39,7 +38,7 @@ public StylusSystemGestureEventArgs( { if (!RawStylusSystemGestureInputReport.IsValidSystemGesture(systemGesture, false, false)) { - throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, "systemGesture")); + throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, "systemGesture")); } _id = systemGesture; @@ -81,7 +80,7 @@ internal StylusSystemGestureEventArgs( { if (!RawStylusSystemGestureInputReport.IsValidSystemGesture(systemGesture, true, false)) { - throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, "systemGesture")); + throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, "systemGesture")); } _id = systemGesture; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceCollection.cs index 7940cfa249c..fda081eca85 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Common/TabletDeviceCollection.cs @@ -6,7 +6,6 @@ using System.Collections; using System.Collections.Generic; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -76,7 +75,7 @@ public TabletDevice this[int index] get { if (index >= Count || index < 0) - throw new ArgumentException(SR.Get(SRID.Stylus_IndexOutOfRange, index.ToString(System.Globalization.CultureInfo.InvariantCulture)), "index"); + throw new ArgumentException(SR.Format(SR.Stylus_IndexOutOfRange, index.ToString(System.Globalization.CultureInfo.InvariantCulture)), "index"); return TabletDevices[index]; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerFlickEngine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerFlickEngine.cs index 3f6a8927c78..79234574dfc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerFlickEngine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerFlickEngine.cs @@ -21,7 +21,6 @@ using System.Windows.Media; using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerInteractionEngine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerInteractionEngine.cs index 74eb1121cef..4c82dd20721 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerInteractionEngine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerInteractionEngine.cs @@ -21,7 +21,6 @@ using System.Windows.Media; using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerLogic.cs index 6f29645dcc8..c6d114f911c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerLogic.cs @@ -23,7 +23,6 @@ using System.Windows.Media; using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPointer { @@ -549,7 +548,7 @@ internal override void UpdateStylusCapture(StylusDeviceBase stylusDevice, IInput } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, oldCapture.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); } } @@ -575,7 +574,7 @@ internal override void UpdateStylusCapture(StylusDeviceBase stylusDevice, IInput } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, _stylusCapture.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); } } @@ -640,7 +639,7 @@ internal override void UpdateOverProperty(StylusDeviceBase stylusDevice, IInputE } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, oldOver.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); } } if (_stylusOver != null) @@ -669,7 +668,7 @@ internal override void UpdateOverProperty(StylusDeviceBase stylusDevice, IInputE } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, _stylusOver.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); } } @@ -805,7 +804,7 @@ private object ReevaluateCaptureAsync(object arg) } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, _stylusCapture.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); } // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusDevice.cs index e31249922ed..b3aae0711cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusDevice.cs @@ -15,7 +15,6 @@ using System.Windows.Interop; using System.Windows.Media; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPointer { @@ -575,7 +574,7 @@ internal override bool Capture(IInputElement element, CaptureMode captureMode) if (doStylusCapture != null && !InputElement.IsValid(element)) { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, doStylusCapture.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType())); } doStylusCapture?.VerifyAccess(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInCollection.cs index 196a08e5c60..b56ca08daca 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInCollection.cs @@ -14,7 +14,6 @@ using System.Windows.Media; using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInManager.cs index 0e86a28c46b..918fa6cc3f6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPlugInManager.cs @@ -19,7 +19,6 @@ using System.Windows.Media; using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPointPropertyInfoHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPointPropertyInfoHelper.cs index ce09a48e033..897a8ba602e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPointPropertyInfoHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Pointer/PointerStylusPointPropertyInfoHelper.cs @@ -13,7 +13,6 @@ using MS.Utility; using MS.Win32.Pointer; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusPointer { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContext.cs index bc3d958f499..3640133c664 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContext.cs @@ -16,7 +16,6 @@ using MS.Win32.Penimc; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContexts.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContexts.cs index f98c48b0632..47ef709aab1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContexts.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenContexts.cs @@ -22,7 +22,6 @@ using System.Windows.Interop; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; // SecurityHelper @@ -39,7 +38,7 @@ internal PenContexts(WispLogic stylusLogic, PresentationSource inputSource) HwndSource hwndSource = inputSource as HwndSource; if(hwndSource == null || IntPtr.Zero == (hwndSource).CriticalHandle) { - throw new InvalidOperationException(SR.Get(SRID.Stylus_PenContextFailure)); + throw new InvalidOperationException(SR.Stylus_PenContextFailure); } _stylusLogic = stylusLogic; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThread.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThread.cs index 9f52699cda5..e8e91a64500 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThread.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThread.cs @@ -17,7 +17,6 @@ using MS.Win32.Penimc; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadWorker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadWorker.cs index 7f18965a234..fb1bcb3d2e8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadWorker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/PenThreadWorker.cs @@ -20,7 +20,6 @@ using MS.Win32.Penimc; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -520,7 +519,7 @@ internal bool WorkerAddPenContext(PenContext penContext) { if (__disposed) { - throw new ObjectDisposedException(null, SR.Get(SRID.Penservice_Disposed)); + throw new ObjectDisposedException(null, SR.Penservice_Disposed); } Debug.Assert(penContext != null); @@ -792,7 +791,7 @@ internal void FireEvent(PenContext penContext, int evt, int stylusPointerId, int // marshal the data to our cache if (cbPacket % 4 != 0) { - throw new InvalidOperationException(SR.Get(SRID.PenService_InvalidPacketData)); + throw new InvalidOperationException(SR.PenService_InvalidPacketData); } int cItems = cPackets * (cbPacket / 4); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs index 2667ba183d6..8c5018d258f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs @@ -21,7 +21,6 @@ using System.Windows.Media; using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusWisp { @@ -2082,7 +2081,7 @@ internal override void UpdateStylusCapture(StylusDeviceBase stylusDevice, IInput } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, oldCapture.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); } } if (_stylusCapture != null) @@ -2111,7 +2110,7 @@ internal override void UpdateStylusCapture(StylusDeviceBase stylusDevice, IInput } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, _stylusCapture.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); } } @@ -2170,7 +2169,7 @@ internal override void UpdateOverProperty(StylusDeviceBase stylusDevice, IInputE } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, oldOver.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); } } if (_stylusOver != null) @@ -2199,7 +2198,7 @@ internal override void UpdateOverProperty(StylusDeviceBase stylusDevice, IInputE } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, _stylusOver.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); } } @@ -2439,7 +2438,7 @@ private object ReevaluateCaptureAsync(object arg) } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, _stylusCapture.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); } // @@ -3142,7 +3141,7 @@ internal void RegisterHwndForInput(InputManager inputManager, PresentationSource { if (__penContextsMap.ContainsKey(inputSource)) { - throw new InvalidOperationException(SR.Get(SRID.PenService_WindowAlreadyRegistered)); + throw new InvalidOperationException(SR.PenService_WindowAlreadyRegistered); } PenContexts penContexts = new PenContexts(StylusLogic.GetCurrentStylusLogicAs(), inputSource); @@ -3211,7 +3210,7 @@ internal void UnRegisterHwndForInput(HwndSource hwndSource) // If we failed to find penContexts for this window above then throw an error now. if (penContexts == null) { - throw new InvalidOperationException(SR.Get(SRID.PenService_WindowNotRegistered)); + throw new InvalidOperationException(SR.PenService_WindowNotRegistered); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusDevice.cs index 11bd3a698a7..e04a8d006f0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusDevice.cs @@ -12,7 +12,6 @@ using System.Windows.Media; using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusWisp { @@ -277,7 +276,7 @@ internal override bool Capture(IInputElement element, CaptureMode captureMode) DependencyObject doStylusCapture = element as DependencyObject; if (doStylusCapture != null && !InputElement.IsValid(element)) { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, doStylusCapture.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType())); } if (doStylusCapture != null) @@ -441,7 +440,7 @@ private void UpdateOverProperty(IInputElement oldOver, IInputElement newOver) } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, oldOver.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); } } if (_stylusOver != null) @@ -470,7 +469,7 @@ private void UpdateOverProperty(IInputElement oldOver, IInputElement newOver) } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, _stylusOver.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); } } @@ -1195,7 +1194,7 @@ internal override Point GetPosition(IInputElement relativeTo) // Validate that relativeTo is either a UIElement, a ContentElement or a UIElement3D. if (relativeTo != null && !InputElement.IsValid(relativeTo)) { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, relativeTo.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType())); } PresentationSource relativePresentationSource = null; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusPlugInCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusPlugInCollection.cs index 149c42b9a4d..68448b0538b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusPlugInCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispStylusPlugInCollection.cs @@ -14,7 +14,6 @@ using System.Security; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusWisp { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDeviceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDeviceCollection.cs index ca4a52e0a53..048ca5317dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDeviceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispTabletDeviceCollection.cs @@ -13,7 +13,6 @@ using System.Windows.Input.StylusWisp; using System.Windows.Input.Tracing; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Input.StylusWisp { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextComposition.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextComposition.cs index a9421387a07..b335e6a9ecd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextComposition.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextComposition.cs @@ -22,7 +22,6 @@ using MS.Win32; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -114,7 +113,7 @@ internal TextComposition(InputManager inputManager, IInputElement source, string if (resultText == null) { - throw new ArgumentException(SR.Get(SRID.TextComposition_NullResultText)); + throw new ArgumentException(SR.TextComposition_NullResultText); } _resultText = resultText; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionManager.cs index 5347121921f..994009d2d03 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TextCompositionManager.cs @@ -23,7 +23,6 @@ using MS.Internal.PresentationCore; // SecurityHelper using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { @@ -357,12 +356,12 @@ private static bool UnsafeStartComposition(TextComposition composition) if (composition._InputManager == null) { - throw new ArgumentException(SR.Get(SRID.TextCompositionManager_NoInputManager, "composition")); + throw new ArgumentException(SR.Format(SR.TextCompositionManager_NoInputManager, "composition")); } if (composition.Stage != TextCompositionStage.None) { - throw new ArgumentException(SR.Get(SRID.TextCompositionManager_TextCompositionHasStarted, "composition")); + throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionHasStarted, "composition")); } composition.Stage = TextCompositionStage.Started; @@ -381,17 +380,17 @@ private static bool UnsafeUpdateComposition(TextComposition composition) if (composition._InputManager == null) { - throw new ArgumentException(SR.Get(SRID.TextCompositionManager_NoInputManager, "composition")); + throw new ArgumentException(SR.Format(SR.TextCompositionManager_NoInputManager, "composition")); } if (composition.Stage == TextCompositionStage.None) { - throw new ArgumentException(SR.Get(SRID.TextCompositionManager_TextCompositionNotStarted, "composition")); + throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionNotStarted, "composition")); } if (composition.Stage == TextCompositionStage.Done) { - throw new ArgumentException(SR.Get(SRID.TextCompositionManager_TextCompositionHasDone, "composition")); + throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionHasDone, "composition")); } TextCompositionEventArgs textargs = new TextCompositionEventArgs(composition._InputDevice, composition); @@ -409,17 +408,17 @@ private static bool UnsafeCompleteComposition(TextComposition composition) if (composition._InputManager == null) { - throw new ArgumentException(SR.Get(SRID.TextCompositionManager_NoInputManager, "composition")); + throw new ArgumentException(SR.Format(SR.TextCompositionManager_NoInputManager, "composition")); } if (composition.Stage == TextCompositionStage.None) { - throw new ArgumentException(SR.Get(SRID.TextCompositionManager_TextCompositionNotStarted, "composition")); + throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionNotStarted, "composition")); } if (composition.Stage == TextCompositionStage.Done) { - throw new ArgumentException(SR.Get(SRID.TextCompositionManager_TextCompositionHasDone, "composition")); + throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionHasDone, "composition")); } composition.Stage = TextCompositionStage.Done; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchDevice.cs index 945bae7cfea..30a48fff777 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/TouchDevice.cs @@ -20,7 +20,6 @@ using MS.Internal.PresentationCore; using MS.Utility; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; using System.Windows.Input.Tracing; namespace System.Windows.Input @@ -342,7 +341,7 @@ public bool Capture(IInputElement element, CaptureMode captureMode) if ((element != null) && (uiElement == null) && (contentElement == null) && (uiElement3D == null)) { - throw new ArgumentException(SR.Get(SRID.Invalid_IInputElement, element.GetType()), "element"); + throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), "element"); } if (_captured != element) @@ -705,7 +704,7 @@ protected void Activate() { if (_isActive) { - throw new InvalidOperationException(SR.Get(SRID.Touch_DeviceAlreadyActivated)); + throw new InvalidOperationException(SR.Touch_DeviceAlreadyActivated); } PromotingToManipulation = false; @@ -730,7 +729,7 @@ protected void Deactivate() { if (!_isActive) { - throw new InvalidOperationException(SR.Get(SRID.Touch_DeviceNotActivated)); + throw new InvalidOperationException(SR.Touch_DeviceNotActivated); } Capture(null); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32KeyboardDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32KeyboardDevice.cs index 8c716bfecfd..7bf1008d67f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32KeyboardDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32KeyboardDevice.cs @@ -13,7 +13,6 @@ using System; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32MouseDevice.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32MouseDevice.cs index ba8e48b857d..36a3e4013d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32MouseDevice.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Win32MouseDevice.cs @@ -16,7 +16,6 @@ using System; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Input { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/D3DImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/D3DImage.cs index b0eb82152d7..dca515e49d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/D3DImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/D3DImage.cs @@ -26,7 +26,6 @@ using System.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Interop { @@ -71,12 +70,12 @@ public D3DImage(double dpiX, double dpiY) if (dpiX < 0) { - throw new ArgumentOutOfRangeException("dpiX", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("dpiX", SR.ParameterMustBeGreaterThanZero); } if (dpiY < 0) { - throw new ArgumentOutOfRangeException("dpiY", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("dpiY", SR.ParameterMustBeGreaterThanZero); } _canWriteEvent = new ManualResetEvent(true); @@ -147,7 +146,7 @@ public void SetBackBuffer(D3DResourceType backBufferType, IntPtr backBuffer, boo if (_lockCount == 0) { - throw new InvalidOperationException(SR.Get(SRID.Image_MustBeLocked)); + throw new InvalidOperationException(SR.Image_MustBeLocked); } // In case the user passed in something like "(D3DResourceType)-1" @@ -276,7 +275,7 @@ public void Unlock() if (_lockCount == 0) { - throw new InvalidOperationException(SR.Get(SRID.Image_MustBeLocked)); + throw new InvalidOperationException(SR.Image_MustBeLocked); } --_lockCount; @@ -311,12 +310,12 @@ public void AddDirtyRect(Int32Rect dirtyRect) if (_lockCount == 0) { - throw new InvalidOperationException(SR.Get(SRID.Image_MustBeLocked)); + throw new InvalidOperationException(SR.Image_MustBeLocked); } if (_pInteropDeviceBitmap == null) { - throw new InvalidOperationException(SR.Get(SRID.D3DImage_MustHaveBackBuffer)); + throw new InvalidOperationException(SR.D3DImage_MustHaveBackBuffer); } dirtyRect.ValidateForDirtyRect("dirtyRect", PixelWidth, PixelHeight); @@ -605,7 +604,7 @@ private bool LockImpl(Duration timeout) if (_lockCount == UInt32.MaxValue) { - throw new InvalidOperationException(SR.Get(SRID.Image_LockCountLimit)); + throw new InvalidOperationException(SR.Image_LockCountLimit); } if (_lockCount == 0) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndKeyboardInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndKeyboardInputProvider.cs index 4b4e5c07664..bdadcbc6d18 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndKeyboardInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndKeyboardInputProvider.cs @@ -15,7 +15,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Interop { @@ -710,7 +709,7 @@ private RawKeyboardActions GetKeyUpKeyDown(WindowMessage msg) return RawKeyboardActions.KeyDown; if( msg == WindowMessage.WM_KEYUP || msg == WindowMessage.WM_SYSKEYUP ) return RawKeyboardActions.KeyUp; - throw new ArgumentException(SR.Get(SRID.OnlyAcceptsKeyMessages)); + throw new ArgumentException(SR.OnlyAcceptsKeyMessages); } private void PossiblyDeactivate(IntPtr hwndFocus) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndMouseInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndMouseInputProvider.cs index 6c8564598ac..dd703c1c333 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndMouseInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndMouseInputProvider.cs @@ -16,7 +16,6 @@ using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Interop { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSource.cs index 4c2a6916e3c..9fac6a3809b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSource.cs @@ -25,7 +25,6 @@ using System.IO; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -682,7 +681,7 @@ internal static HwndSource CriticalFromHwnd(IntPtr hwnd) { if (hwnd == IntPtr.Zero) { - throw new ArgumentException(SR.Get(SRID.NullHwnd)); + throw new ArgumentException(SR.NullHwnd); } HwndSource hwndSource = null; foreach (PresentationSource source in PresentationSource.CriticalCurrentSources) @@ -1935,7 +1934,7 @@ protected IKeyboardInputSite RegisterKeyboardInputSinkCore(IKeyboardInputSink si if (sink.KeyboardInputSite != null) { - throw new ArgumentException(SR.Get(SRID.KeyboardSinkAlreadyOwned)); + throw new ArgumentException(SR.KeyboardSinkAlreadyOwned); } HwndSourceKeyboardInputSite site = new HwndSourceKeyboardInputSite(this, sink); @@ -2120,7 +2119,7 @@ protected virtual bool OnMnemonicCore(ref MSG msg, ModifierKeys modifiers) break; default: - throw new ArgumentException(SR.Get(SRID.OnlyAcceptsKeyMessages)); + throw new ArgumentException(SR.OnlyAcceptsKeyMessages); } // We record the last message that was processed by us. @@ -2266,7 +2265,7 @@ internal void CriticalUnregisterKeyboardInputSink(HwndSourceKeyboardInputSite si { if (!_keyboardInputSinkChildren.Remove(site)) { - throw new InvalidOperationException(SR.Get(SRID.KeyboardSinkNotAChild)); + throw new InvalidOperationException(SR.KeyboardSinkNotAChild); } } } @@ -2308,7 +2307,7 @@ internal bool CriticalTranslateAccelerator(ref MSG msg, ModifierKeys modifiers) break; default: - throw new ArgumentException(SR.Get(SRID.OnlyAcceptsKeyMessages)); + throw new ArgumentException(SR.OnlyAcceptsKeyMessages); } if (_keyboard == null) @@ -2674,7 +2673,7 @@ private void CheckDisposed(bool verifyAccess) if(_isDisposed) { - throw new ObjectDisposedException(null, SR.Get(SRID.HwndSourceDisposed)); + throw new ObjectDisposedException(null, SR.HwndSourceDisposed); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceKeyboardInputSite.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceKeyboardInputSite.cs index c4f6bd7df29..36524c72745 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceKeyboardInputSite.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceKeyboardInputSite.cs @@ -10,7 +10,6 @@ using System.Windows.Threading; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Security ; using MS.Internal.PresentationCore; @@ -30,7 +29,7 @@ public HwndSourceKeyboardInputSite(HwndSource source, IKeyboardInputSink sink) } if(!(sink is UIElement)) { - throw new ArgumentException(SR.Get(SRID.KeyboardSinkMustBeAnElement), "sink"); + throw new ArgumentException(SR.KeyboardSinkMustBeAnElement, "sink"); } _source = source; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceParameters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceParameters.cs index fe921e592da..91c2c1350fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceParameters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSourceParameters.cs @@ -9,7 +9,6 @@ using System.Windows.Input; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Interop { @@ -303,7 +302,7 @@ internal bool EffectivePerPixelOpacity // Applications aware of the new property should not set the old one too if (_usesPerPixelOpacity) { - throw new InvalidOperationException(SR.Get(SRID.UsesPerPixelOpacityIsObsolete)); + throw new InvalidOperationException(SR.UsesPerPixelOpacityIsObsolete); } // If not running on Windows 8, we must clear the parameter for child windows diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndStylusInputProvider.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndStylusInputProvider.cs index 2be16fd14e6..84acf8f56cc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndStylusInputProvider.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndStylusInputProvider.cs @@ -17,7 +17,6 @@ using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Interop { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndTarget.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndTarget.cs index c3c65d45f7e..e5697830a7d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndTarget.cs @@ -29,7 +29,6 @@ using MS.Internal.PresentationCore; // SecurityHelper using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using HRESULT = MS.Internal.HRESULT; using NativeMethodsSetLastError = MS.Internal.WindowsBase.NativeMethodsSetLastError; using PROCESS_DPI_AWARENESS = MS.Win32.NativeMethods.PROCESS_DPI_AWARENESS; @@ -530,21 +529,21 @@ out processId if (!UnsafeNativeMethods.IsWindow(new HandleRef(this, hwnd))) { throw new ArgumentException( - SR.Get(SRID.HwndTarget_InvalidWindowHandle), + SR.HwndTarget_InvalidWindowHandle, "hwnd" ); } else if (processId != SafeNativeMethods.GetCurrentProcessId()) { throw new ArgumentException( - SR.Get(SRID.HwndTarget_InvalidWindowProcess), + SR.HwndTarget_InvalidWindowProcess, "hwnd" ); } else if (threadId != SafeNativeMethods.GetCurrentThreadId()) { throw new ArgumentException( - SR.Get(SRID.HwndTarget_InvalidWindowThread), + SR.HwndTarget_InvalidWindowThread, "hwnd" ); } @@ -556,7 +555,7 @@ out processId if (hr == unchecked((int)0x80070005)) // E_ACCESSDENIED { throw new InvalidOperationException( - SR.Get(SRID.HwndTarget_WindowAlreadyHasContent) + SR.HwndTarget_WindowAlreadyHasContent ); } else @@ -596,7 +595,7 @@ internal void InvalidateRenderMode() if (mode == RenderingMode.Hardware || mode == RenderingMode.HardwareReference) { - throw new InvalidOperationException(SR.Get(SRID.HwndTarget_HardwareNotSupportDueToProtocolMismatch)); + throw new InvalidOperationException(SR.HwndTarget_HardwareNotSupportDueToProtocolMismatch); } else { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LayoutManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LayoutManager.cs index 8aa71599a5e..7e5e1747a04 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LayoutManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/LayoutManager.cs @@ -22,7 +22,6 @@ using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -147,7 +146,7 @@ internal void EnterMeasure() _lastExceptionElement = null; _measuresOnStack++; if(_measuresOnStack > s_LayoutRecursionLimit) - throw new InvalidOperationException(SR.Get(SRID.LayoutManager_DeepRecursion, s_LayoutRecursionLimit)); + throw new InvalidOperationException(SR.Format(SR.LayoutManager_DeepRecursion, s_LayoutRecursionLimit)); _firePostLayoutEvents = true; } @@ -164,7 +163,7 @@ internal void EnterArrange() _lastExceptionElement = null; _arrangesOnStack++; if(_arrangesOnStack > s_LayoutRecursionLimit) - throw new InvalidOperationException(SR.Get(SRID.LayoutManager_DeepRecursion, s_LayoutRecursionLimit)); + throw new InvalidOperationException(SR.Format(SR.LayoutManager_DeepRecursion, s_LayoutRecursionLimit)); _firePostLayoutEvents = true; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XamlSerializerUtil.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XamlSerializerUtil.cs index e540d6e42cd..78ddce02144 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XamlSerializerUtil.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XamlSerializerUtil.cs @@ -55,7 +55,7 @@ internal static void ThrowIfNonWhiteSpaceInAddText(string s) { if (!Char.IsWhiteSpace(s[i])) { - throw new ArgumentException(SR.Get(SRID.NonWhiteSpaceInAddText, s)); + throw new ArgumentException(SR.Format(SR.NonWhiteSpaceInAddText, s)); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguage.cs index cec328b9571..dcac65fa0d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Markup/XmlLanguage.cs @@ -203,7 +203,7 @@ public CultureInfo GetEquivalentCulture() catch (ArgumentException e) { _equivalentCultureFailed = true; - throw new InvalidOperationException(SR.Get(SRID.XmlLangGetCultureFailure, lowerCaseTag), e); + throw new InvalidOperationException(SR.Format(SR.XmlLangGetCultureFailure, lowerCaseTag), e); } } @@ -239,7 +239,7 @@ public CultureInfo GetSpecificCulture() if (culture.IetfLanguageTag.Length == 0) { - throw new InvalidOperationException(SR.Get(SRID.XmlLangGetSpecificCulture, _lowerCaseTag)); + throw new InvalidOperationException(SR.Format(SR.XmlLangGetSpecificCulture, _lowerCaseTag)); } if (!culture.IsNeutralCulture) @@ -256,7 +256,7 @@ public CultureInfo GetSpecificCulture() } catch (ArgumentException e) { - throw new InvalidOperationException(SR.Get(SRID.XmlLangGetSpecificCulture, _lowerCaseTag), e); + throw new InvalidOperationException(SR.Format(SR.XmlLangGetSpecificCulture, _lowerCaseTag), e); } } } @@ -529,11 +529,11 @@ public XmlLanguage Current { if (_atStart) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } if (_pastEnd) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } return _current; @@ -805,7 +805,7 @@ static private bool IsDigit(int c) static private void ThrowParseException(string ietfLanguageTag) { - throw new ArgumentException(SR.Get(SRID.XmlLangMalformed, ietfLanguageTag), "ietfLanguageTag"); + throw new ArgumentException(SR.Format(SR.XmlLangMalformed, ietfLanguageTag), "ietfLanguageTag"); } // throws if there is a non-7-bit ascii character diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Animatable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Animatable.cs index 207eae8559a..3fd0a6b1576 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Animatable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Animatable.cs @@ -17,7 +17,6 @@ using System.Windows.Media.Composition; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationException.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationException.cs index f5af57060e4..95031a5601a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationException.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationException.cs @@ -9,7 +9,7 @@ using System.Runtime.Serialization; using System.Windows.Media.Animation; -using MS.Internal.PresentationCore; // SR, SRID +using MS.Internal.PresentationCore; // SR namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationStorage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationStorage.cs index c8299ea812a..2ffad274f75 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationStorage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationStorage.cs @@ -11,7 +11,7 @@ using System.Windows.Media.Composition; using System.Windows.Media.Media3D; -using MS.Internal.PresentationCore; // SR, SRID, FriendAccessAllowed +using MS.Internal.PresentationCore; // SR, FriendAccessAllowed namespace System.Windows.Media.Animation { @@ -344,8 +344,8 @@ internal void EvaluateAnimatedValue( // If the animation(s) applied to the property have calculated an // invalid value for the property then raise an exception. throw new InvalidOperationException( - SR.Get( - SRID.Animation_CalculatedValueIsInvalidForProperty, + SR.Format( + SR.Animation_CalculatedValueIsInvalidForProperty, _dependencyProperty.Name, null)); } @@ -494,8 +494,8 @@ private void OnCurrentTimeInvalidated(object sender, EventArgs args) (AnimationClock)sender, _dependencyProperty, (IAnimatable)target, - SR.Get( - SRID.Animation_Exception, + SR.Format( + SR.Animation_Exception, _dependencyProperty.Name, target.GetType().FullName, ((AnimationClock)sender).Timeline.GetType().FullName), @@ -992,8 +992,8 @@ internal static object GetCurrentPropertyValue( // current value. if (currentLayerValue == DependencyProperty.UnsetValue) { - throw new InvalidOperationException(SR.Get( - SRID.Animation_ReturnedUnsetValueInstance, + throw new InvalidOperationException(SR.Format( + SR.Animation_ReturnedUnsetValueInstance, clocks[i].Timeline.GetType().FullName, dp.Name, d.GetType().FullName)); @@ -1019,8 +1019,8 @@ internal static object GetCurrentPropertyValue( // If the animation(s) applied to the property have calculated an // invalid value for the property then raise an exception. throw new InvalidOperationException( - SR.Get( - SRID.Animation_CalculatedValueIsInvalidForProperty, + SR.Format( + SR.Animation_CalculatedValueIsInvalidForProperty, dp.Name, (currentPropertyValue == null ? "null" : currentPropertyValue.ToString()))); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationTimeline.cs index 7b524df2934..853767f2532 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/AnimationTimeline.cs @@ -8,7 +8,6 @@ using System.Windows; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs index 4d8135f0e20..8ce9b4a0097 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Clock.cs @@ -21,7 +21,6 @@ using System.Windows.Markup; using System.Windows.Threading; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -595,8 +594,8 @@ internal static Clock AllocateClock( // The derived class is trying to fool us -- we require a new, // fresh, unassociated clock here throw new InvalidOperationException( - SR.Get( - SRID.Timing_CreateClockMustReturnNewClock, + SR.Format( + SR.Timing_CreateClockMustReturnNewClock, timeline.GetType().Name)); } @@ -625,7 +624,7 @@ internal virtual void BuildClockSubTreeFromTimeline( (_timeline.AccelerationRatio > 0) || (_timeline.DecelerationRatio > 0)) { - throw new NotSupportedException(SR.Get(SRID.Timing_CanSlipOnlyOnSimpleTimelines)); + throw new NotSupportedException(SR.Timing_CanSlipOnlyOnSimpleTimelines); } _syncData = new SyncData(this); // CanSlip clocks keep themselves synced @@ -638,7 +637,7 @@ internal virtual void BuildClockSubTreeFromTimeline( if (current._timeline.AutoReverse || current._timeline.AccelerationRatio > 0 || current._timeline.DecelerationRatio > 0) { - throw new System.InvalidOperationException(SR.Get(SRID.Timing_SlipBehavior_SyncOnlyWithSimpleParents)); + throw new System.InvalidOperationException(SR.Timing_SlipBehavior_SyncOnlyWithSimpleParents); } current.SetFlag(ClockFlags.CanGrow, true); // Propagate the slippage tracking up the tree @@ -981,7 +980,7 @@ internal void InternalSkipToFill() if (effectiveDuration == null) { // Can't seek to the end if the simple duration is not resolved - throw new InvalidOperationException(SR.Get(SRID.Timing_SkipToFillDestinationIndefinite)); + throw new InvalidOperationException(SR.Timing_SkipToFillDestinationIndefinite); } // Offset to the end; override preceding seek requests @@ -3236,7 +3235,7 @@ private void ComputeSyncEnter(ref TimeIntervalCollection parentIntervalCollectio { Debug.Assert(syncClockDuration == Duration.Automatic); // If we seek into an Automatic syncChild's duration, we may overseek it, so throw an exception - throw new InvalidOperationException(SR.Get(SRID.Timing_SeekDestinationAmbiguousDueToSlip)); + throw new InvalidOperationException(SR.Timing_SeekDestinationAmbiguousDueToSlip); } // This is the heart of the HasSeekOccuredAfterLastTick codepath; we don't adjust our diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockController.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockController.cs index 0009b834d75..b87441cd91f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockController.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockController.cs @@ -18,7 +18,6 @@ using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -168,7 +167,7 @@ public void Seek(TimeSpan offset, TimeSeekOrigin origin) if (!TimeEnumHelper.IsValidTimeSeekOrigin(origin)) { - throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, "TimeSeekOrigin")); + throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, "TimeSeekOrigin")); } if (origin == TimeSeekOrigin.Duration) @@ -179,7 +178,7 @@ public void Seek(TimeSpan offset, TimeSeekOrigin origin) { // Can't seek relative to the Duration if it has been specified as Forever or if // it has not yet been resolved. - throw new InvalidOperationException(SR.Get(SRID.Timing_SeekDestinationIndefinite)); + throw new InvalidOperationException(SR.Timing_SeekDestinationIndefinite); } else { @@ -191,7 +190,7 @@ public void Seek(TimeSpan offset, TimeSeekOrigin origin) // duration it means execute the FillBehavior. if (offset < TimeSpan.Zero) { - throw new InvalidOperationException(SR.Get(SRID.Timing_SeekDestinationNegative)); + throw new InvalidOperationException(SR.Timing_SeekDestinationNegative); } _owner.InternalSeek(offset); @@ -210,7 +209,7 @@ public void SeekAlignedToLastTick(TimeSpan offset, TimeSeekOrigin origin) if (!TimeEnumHelper.IsValidTimeSeekOrigin(origin)) { - throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, "TimeSeekOrigin")); + throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, "TimeSeekOrigin")); } if (origin == TimeSeekOrigin.Duration) @@ -221,7 +220,7 @@ public void SeekAlignedToLastTick(TimeSpan offset, TimeSeekOrigin origin) { // Can't seek relative to the Duration if it has been specified as Forevor or if // it has not yet been resolved. - throw new InvalidOperationException(SR.Get(SRID.Timing_SeekDestinationIndefinite)); + throw new InvalidOperationException(SR.Timing_SeekDestinationIndefinite); } else { @@ -233,7 +232,7 @@ public void SeekAlignedToLastTick(TimeSpan offset, TimeSeekOrigin origin) // duration it means execute the FillBehavior. if (offset < TimeSpan.Zero) { - throw new InvalidOperationException(SR.Get(SRID.Timing_SeekDestinationNegative)); + throw new InvalidOperationException(SR.Timing_SeekDestinationNegative); } _owner.InternalSeekAlignedToLastTick(offset); @@ -291,7 +290,7 @@ public double SpeedRatio { if (value < 0 || value > double.MaxValue || double.IsNaN(value)) { - throw new ArgumentException(SR.Get(SRID.Timing_InvalidArgFinitePositive), "value"); + throw new ArgumentException(SR.Timing_InvalidArgFinitePositive, "value"); } _owner.InternalSetSpeedRatio(value); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockGroup.cs index 6a64356d53b..41647f7fd74 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/ClockGroup.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Diagnostics; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -131,7 +130,7 @@ internal override void BuildClockSubTreeFromTimeline( (_timeline.AccelerationRatio > 0) || (_timeline.DecelerationRatio > 0)) { - throw new NotSupportedException(SR.Get(SRID.Timing_SlipBehavior_SlipOnlyOnSimpleTimelines)); + throw new NotSupportedException(SR.Timing_SlipBehavior_SlipOnlyOnSimpleTimelines); } for (int index = 0; index < _children.Count; index++) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/DoubleAnimationUsingPath.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/DoubleAnimationUsingPath.cs index 24c7ce76172..58db0dc2539 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/DoubleAnimationUsingPath.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/DoubleAnimationUsingPath.cs @@ -12,7 +12,6 @@ using System.Windows.Media; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Animatable.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Animatable.cs index 992f1405316..48f4d08b163 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Animatable.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Animatable.cs @@ -27,7 +27,6 @@ using System.Windows.Media.Composition; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -87,7 +86,7 @@ public void ApplyAnimationClock( if (!AnimationStorage.IsPropertyAnimatable(this, dp)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); + throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); #pragma warning restore 56506 } @@ -95,18 +94,18 @@ public void ApplyAnimationClock( && !AnimationStorage.IsAnimationValid(dp, clock.Timeline)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); + throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); #pragma warning restore 56506 } if (!HandoffBehaviorEnum.IsDefined(handoffBehavior)) { - throw new ArgumentException(SR.Get(SRID.Animation_UnrecognizedHandoffBehavior)); + throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); } if (IsSealed) { - throw new InvalidOperationException(SR.Get(SRID.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); + throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); } AnimationStorage.ApplyAnimationClock(this, dp, clock, handoffBehavior); @@ -159,24 +158,24 @@ public void BeginAnimation(DependencyProperty dp, AnimationTimeline animation, H if (!AnimationStorage.IsPropertyAnimatable(this, dp)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); + throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); #pragma warning restore 56506 } if ( animation != null && !AnimationStorage.IsAnimationValid(dp, animation)) { - throw new ArgumentException(SR.Get(SRID.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); + throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); } if (!HandoffBehaviorEnum.IsDefined(handoffBehavior)) { - throw new ArgumentException(SR.Get(SRID.Animation_UnrecognizedHandoffBehavior)); + throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); } if (IsSealed) { - throw new InvalidOperationException(SR.Get(SRID.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); + throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); } AnimationStorage.BeginAnimation(this, dp, animation, handoffBehavior); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationBase.cs index 8aec9be354d..0385ff75d22 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Boolean GetCurrentValue(Boolean defaultOriginValue, Boolean defaultDestin if (!AnimatedTypeHelpers.IsValidAnimationValueBoolean(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs index 688036a21af..81e9715e4cc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/BooleanAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimation.cs index 41e58aaa019..68ff1910ea8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimation.cs @@ -322,8 +322,8 @@ protected override Byte GetCurrentValueCore(Byte defaultOriginValue, Byte defaul && !AnimatedTypeHelpers.IsValidAnimationValueByte(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Byte GetCurrentValueCore(Byte defaultOriginValue, Byte defaul && !AnimatedTypeHelpers.IsValidAnimationValueByte(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationBase.cs index 6704803fdaa..89d3b0767d3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Byte GetCurrentValue(Byte defaultOriginValue, Byte defaultDestinationValu if (!AnimatedTypeHelpers.IsValidAnimationValueByte(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs index a1c31a47a37..c6bc5125b3c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ByteAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationBase.cs index dd8d70da944..adbd498d0ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Char GetCurrentValue(Char defaultOriginValue, Char defaultDestinationValu if (!AnimatedTypeHelpers.IsValidAnimationValueChar(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs index 18c0d544323..b57829e26e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/CharAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimation.cs index 7ff04152546..524961efb88 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimation.cs @@ -322,8 +322,8 @@ protected override Color GetCurrentValueCore(Color defaultOriginValue, Color def && !AnimatedTypeHelpers.IsValidAnimationValueColor(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Color GetCurrentValueCore(Color defaultOriginValue, Color def && !AnimatedTypeHelpers.IsValidAnimationValueColor(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationBase.cs index 11971f607c4..14b56f1aa45 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Color GetCurrentValue(Color defaultOriginValue, Color defaultDestinationV if (!AnimatedTypeHelpers.IsValidAnimationValueColor(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs index 6cb796d991a..d728d12373a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ColorAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimation.cs index 6d08b2da9d2..0be10fac957 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimation.cs @@ -322,8 +322,8 @@ protected override Decimal GetCurrentValueCore(Decimal defaultOriginValue, Decim && !AnimatedTypeHelpers.IsValidAnimationValueDecimal(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Decimal GetCurrentValueCore(Decimal defaultOriginValue, Decim && !AnimatedTypeHelpers.IsValidAnimationValueDecimal(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationBase.cs index c401e95e9d8..1c4734fd2a2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Decimal GetCurrentValue(Decimal defaultOriginValue, Decimal defaultDestin if (!AnimatedTypeHelpers.IsValidAnimationValueDecimal(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs index 865a7f3e6e5..662351be339 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DecimalAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimation.cs index d5523ba67af..d71c9087f0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimation.cs @@ -322,8 +322,8 @@ protected override Double GetCurrentValueCore(Double defaultOriginValue, Double && !AnimatedTypeHelpers.IsValidAnimationValueDouble(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Double GetCurrentValueCore(Double defaultOriginValue, Double && !AnimatedTypeHelpers.IsValidAnimationValueDouble(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationBase.cs index 44a81206991..aa0e4a557c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Double GetCurrentValue(Double defaultOriginValue, Double defaultDestinati if (!AnimatedTypeHelpers.IsValidAnimationValueDouble(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs index ac133b59eac..8660a6d01d9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/DoubleAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16Animation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16Animation.cs index 4d212f4775e..b1edf1fc8d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16Animation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16Animation.cs @@ -322,8 +322,8 @@ protected override Int16 GetCurrentValueCore(Int16 defaultOriginValue, Int16 def && !AnimatedTypeHelpers.IsValidAnimationValueInt16(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Int16 GetCurrentValueCore(Int16 defaultOriginValue, Int16 def && !AnimatedTypeHelpers.IsValidAnimationValueInt16(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationBase.cs index eed7c42e666..363b71e010b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Int16 GetCurrentValue(Int16 defaultOriginValue, Int16 defaultDestinationV if (!AnimatedTypeHelpers.IsValidAnimationValueInt16(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs index b2883fd333f..263628360ae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int16AnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32Animation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32Animation.cs index bd09ebfc3d5..78dea8d501e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32Animation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32Animation.cs @@ -322,8 +322,8 @@ protected override Int32 GetCurrentValueCore(Int32 defaultOriginValue, Int32 def && !AnimatedTypeHelpers.IsValidAnimationValueInt32(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Int32 GetCurrentValueCore(Int32 defaultOriginValue, Int32 def && !AnimatedTypeHelpers.IsValidAnimationValueInt32(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationBase.cs index ae5fc42d67f..c0fcd769fc5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Int32 GetCurrentValue(Int32 defaultOriginValue, Int32 defaultDestinationV if (!AnimatedTypeHelpers.IsValidAnimationValueInt32(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs index 9890aa241ff..5072fcc5eab 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int32AnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64Animation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64Animation.cs index 80d9d565458..0851b78f9ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64Animation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64Animation.cs @@ -322,8 +322,8 @@ protected override Int64 GetCurrentValueCore(Int64 defaultOriginValue, Int64 def && !AnimatedTypeHelpers.IsValidAnimationValueInt64(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Int64 GetCurrentValueCore(Int64 defaultOriginValue, Int64 def && !AnimatedTypeHelpers.IsValidAnimationValueInt64(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationBase.cs index a557315625b..3a629ad0510 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Int64 GetCurrentValue(Int64 defaultOriginValue, Int64 defaultDestinationV if (!AnimatedTypeHelpers.IsValidAnimationValueInt64(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs index 317e3e8fc97..e29bd564943 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Int64AnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationBase.cs index 68beca44475..4ed35396c7f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Matrix GetCurrentValue(Matrix defaultOriginValue, Matrix defaultDestinati if (!AnimatedTypeHelpers.IsValidAnimationValueMatrix(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs index 517d619b967..3593fdb8aa1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/MatrixAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs index 5a39c076d73..59707e29d3e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -110,8 +109,8 @@ public override sealed object GetCurrentValue(object defaultOriginValue, object if (!AnimatedTypeHelpers.IsValidAnimationValueObject(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs index 357409bf106..6b307cbc9be 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ObjectAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs index 6c428e066ae..539dbf25c7a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/ParallelTimeline.cs @@ -34,7 +34,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimation.cs index d612a17bf41..92b0a19b962 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimation.cs @@ -322,8 +322,8 @@ protected override Point3D GetCurrentValueCore(Point3D defaultOriginValue, Point && !AnimatedTypeHelpers.IsValidAnimationValuePoint3D(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Point3D GetCurrentValueCore(Point3D defaultOriginValue, Point && !AnimatedTypeHelpers.IsValidAnimationValuePoint3D(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationBase.cs index 392662faab7..84c118bc762 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Point3D GetCurrentValue(Point3D defaultOriginValue, Point3D defaultDestin if (!AnimatedTypeHelpers.IsValidAnimationValuePoint3D(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs index a65181bc843..c1fd8e988ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimation.cs index dee958ba831..2ea9bcc0efc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimation.cs @@ -322,8 +322,8 @@ protected override Point GetCurrentValueCore(Point defaultOriginValue, Point def && !AnimatedTypeHelpers.IsValidAnimationValuePoint(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Point GetCurrentValueCore(Point defaultOriginValue, Point def && !AnimatedTypeHelpers.IsValidAnimationValuePoint(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationBase.cs index b8d675bf5f1..636ec347e8f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Point GetCurrentValue(Point defaultOriginValue, Point defaultDestinationV if (!AnimatedTypeHelpers.IsValidAnimationValuePoint(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs index 1658c17d91d..01ffc5d921d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/PointAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimation.cs index 041440808f5..aa91de1c33f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimation.cs @@ -322,8 +322,8 @@ protected override Quaternion GetCurrentValueCore(Quaternion defaultOriginValue, && !AnimatedTypeHelpers.IsValidAnimationValueQuaternion(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Quaternion GetCurrentValueCore(Quaternion defaultOriginValue, && !AnimatedTypeHelpers.IsValidAnimationValueQuaternion(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationBase.cs index fadb498350c..8e18c43b81c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Quaternion GetCurrentValue(Quaternion defaultOriginValue, Quaternion defa if (!AnimatedTypeHelpers.IsValidAnimationValueQuaternion(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs index c332fa1a8fa..8e8a924cf2b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/QuaternionAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimation.cs index fcb87ffeed1..98b9af76ff2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimation.cs @@ -322,8 +322,8 @@ protected override Rect GetCurrentValueCore(Rect defaultOriginValue, Rect defaul && !AnimatedTypeHelpers.IsValidAnimationValueRect(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Rect GetCurrentValueCore(Rect defaultOriginValue, Rect defaul && !AnimatedTypeHelpers.IsValidAnimationValueRect(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationBase.cs index 3a87bf731a2..2ac37e892b1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Rect GetCurrentValue(Rect defaultOriginValue, Rect defaultDestinationValu if (!AnimatedTypeHelpers.IsValidAnimationValueRect(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs index 15278186039..e42f1124dbe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/RectAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimation.cs index 7d4a9aa7a6b..27e3bda1be0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimation.cs @@ -322,8 +322,8 @@ protected override Rotation3D GetCurrentValueCore(Rotation3D defaultOriginValue, && !AnimatedTypeHelpers.IsValidAnimationValueRotation3D(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Rotation3D GetCurrentValueCore(Rotation3D defaultOriginValue, && !AnimatedTypeHelpers.IsValidAnimationValueRotation3D(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationBase.cs index 98265546a84..f69a7ded573 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -161,8 +160,8 @@ public Rotation3D GetCurrentValue(Rotation3D defaultOriginValue, Rotation3D defa if (!AnimatedTypeHelpers.IsValidAnimationValueRotation3D(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs index 3130ce90abf..a850bb898c8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Rotation3DAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimation.cs index dc7eeeb498f..883a6383b3d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimation.cs @@ -322,8 +322,8 @@ protected override Single GetCurrentValueCore(Single defaultOriginValue, Single && !AnimatedTypeHelpers.IsValidAnimationValueSingle(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Single GetCurrentValueCore(Single defaultOriginValue, Single && !AnimatedTypeHelpers.IsValidAnimationValueSingle(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationBase.cs index 877304d2216..cf36407b2d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Single GetCurrentValue(Single defaultOriginValue, Single defaultDestinati if (!AnimatedTypeHelpers.IsValidAnimationValueSingle(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs index 28c1f56afd2..685bdb86f57 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SingleAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimation.cs index 7d76cb24170..110ef965bcc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimation.cs @@ -322,8 +322,8 @@ protected override Size GetCurrentValueCore(Size defaultOriginValue, Size defaul && !AnimatedTypeHelpers.IsValidAnimationValueSize(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Size GetCurrentValueCore(Size defaultOriginValue, Size defaul && !AnimatedTypeHelpers.IsValidAnimationValueSize(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationBase.cs index 56fdd98c1c0..5f45d367afa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Size GetCurrentValue(Size defaultOriginValue, Size defaultDestinationValu if (!AnimatedTypeHelpers.IsValidAnimationValueSize(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs index eeccab7bec1..1ea662eee7a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/SizeAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationBase.cs index be68d5c31a1..3ec24890139 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -161,8 +160,8 @@ public String GetCurrentValue(String defaultOriginValue, String defaultDestinati if (!AnimatedTypeHelpers.IsValidAnimationValueString(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs index 456b728340f..4023b88579b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/StringAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs index 472c086a292..5de798b8942 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Timeline.cs @@ -34,7 +34,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs index 700afe339d9..ae392e11b2e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineCollection.cs @@ -34,7 +34,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -144,7 +143,7 @@ public void Insert(int index, Timeline value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -252,7 +251,7 @@ public Timeline this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -428,7 +427,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -443,7 +442,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -535,7 +534,7 @@ private Timeline Cast(object value) if (!(value is Timeline)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Timeline")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Timeline")); } return (Timeline) value; @@ -561,7 +560,7 @@ internal int AddWithoutFiringPublicEvents(Timeline value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); Timeline newValue = value; @@ -826,7 +825,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -844,7 +843,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -878,12 +877,12 @@ public Timeline Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -961,7 +960,7 @@ public TimelineCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } Timeline newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -979,7 +978,7 @@ public TimelineCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs index 4cbe373aba6..a81c79da680 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/TimelineGroup.cs @@ -34,7 +34,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimation.cs index 70ebc0f5110..e5587b4b419 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimation.cs @@ -322,8 +322,8 @@ protected override Vector3D GetCurrentValueCore(Vector3D defaultOriginValue, Vec && !AnimatedTypeHelpers.IsValidAnimationValueVector3D(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Vector3D GetCurrentValueCore(Vector3D defaultOriginValue, Vec && !AnimatedTypeHelpers.IsValidAnimationValueVector3D(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationBase.cs index 2b691969566..89c2b28ccd5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Vector3D GetCurrentValue(Vector3D defaultOriginValue, Vector3D defaultDes if (!AnimatedTypeHelpers.IsValidAnimationValueVector3D(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs index 55511dfe609..c2a409cf80e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Vector3DAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimation.cs index 1c7fb9a5482..3eaaec0cdb7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimation.cs @@ -322,8 +322,8 @@ protected override Vector GetCurrentValueCore(Vector defaultOriginValue, Vector && !AnimatedTypeHelpers.IsValidAnimationValueVector(defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -333,8 +333,8 @@ protected override Vector GetCurrentValueCore(Vector defaultOriginValue, Vector && !AnimatedTypeHelpers.IsValidAnimationValueVector(defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationBase.cs index 37e20ae2289..8278ad379fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationBase.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -170,8 +169,8 @@ public Vector GetCurrentValue(Vector defaultOriginValue, Vector defaultDestinati if (!AnimatedTypeHelpers.IsValidAnimationValueVector(defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs index 3193e4811c6..6030e613be9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/VectorAnimationUsingKeyFrames.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; @@ -239,7 +238,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -292,7 +291,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySpline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySpline.cs index d10e451278b..e3e0fa64294 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySpline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySpline.cs @@ -14,7 +14,6 @@ using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -67,16 +66,16 @@ public KeySpline(Point controlPoint1, Point controlPoint2) { if (!IsValidControlPoint(controlPoint1)) { - throw new ArgumentException(SR.Get( - SRID.Animation_KeySpline_InvalidValue, + throw new ArgumentException(SR.Format( + SR.Animation_KeySpline_InvalidValue, "controlPoint1", controlPoint1)); } if (!IsValidControlPoint(controlPoint2)) { - throw new ArgumentException(SR.Get( - SRID.Animation_KeySpline_InvalidValue, + throw new ArgumentException(SR.Format( + SR.Animation_KeySpline_InvalidValue, "controlPoint2", controlPoint2)); } @@ -177,8 +176,8 @@ public Point ControlPoint1 { if (!IsValidControlPoint(value)) { - throw new ArgumentException(SR.Get( - SRID.Animation_KeySpline_InvalidValue, + throw new ArgumentException(SR.Format( + SR.Animation_KeySpline_InvalidValue, "ControlPoint1", value)); } @@ -209,8 +208,8 @@ public Point ControlPoint2 { if (!IsValidControlPoint(value)) { - throw new ArgumentException(SR.Get( - SRID.Animation_KeySpline_InvalidValue, + throw new ArgumentException(SR.Format( + SR.Animation_KeySpline_InvalidValue, "ControlPoint2", value)); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySplineConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySplineConverter.cs index 4e8b0e0bba1..4f48bdcc0cd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySplineConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeySplineConverter.cs @@ -17,7 +17,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -75,7 +74,7 @@ public override object ConvertFrom( if (value == null) { - throw new NotSupportedException(SR.Get(SRID.Converter_ConvertFromNotSupported)); + throw new NotSupportedException(SR.Converter_ConvertFromNotSupported); } TokenizerHelper th = new TokenizerHelper(stringValue, cultureInfo); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTime.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTime.cs index 40515294513..52e63ff281c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTime.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/KeyTime.cs @@ -12,7 +12,6 @@ using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -38,7 +37,7 @@ public static KeyTime FromPercent(double percent) { if (percent < 0.0 || percent > 1.0) { - throw new ArgumentOutOfRangeException("percent", SR.Get(SRID.Animation_KeyTime_InvalidPercentValue, percent)); + throw new ArgumentOutOfRangeException("percent", SR.Format(SR.Animation_KeyTime_InvalidPercentValue, percent)); } KeyTime keyTime = new KeyTime(); @@ -57,7 +56,7 @@ public static KeyTime FromTimeSpan(TimeSpan timeSpan) { if (timeSpan < TimeSpan.Zero) { - throw new ArgumentOutOfRangeException("timeSpan", SR.Get(SRID.Animation_KeyTime_LessThanZero, timeSpan)); + throw new ArgumentOutOfRangeException("timeSpan", SR.Format(SR.Animation_KeyTime_LessThanZero, timeSpan)); } KeyTime keyTime = new KeyTime(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehavior.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehavior.cs index 4d1292e36c0..79b0efc44af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehavior.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/RepeatBehavior.cs @@ -14,7 +14,6 @@ using System.Text; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -51,7 +50,7 @@ public RepeatBehavior(double count) || double.IsNaN(count) || count < 0.0) { - throw new ArgumentOutOfRangeException("count", SR.Get(SRID.Timing_RepeatBehaviorInvalidIterationCount, count)); + throw new ArgumentOutOfRangeException("count", SR.Format(SR.Timing_RepeatBehaviorInvalidIterationCount, count)); } _repeatDuration = new TimeSpan(0); @@ -68,7 +67,7 @@ public RepeatBehavior(TimeSpan duration) { if (duration < new TimeSpan(0)) { - throw new ArgumentOutOfRangeException("duration", SR.Get(SRID.Timing_RepeatBehaviorInvalidRepeatDuration, duration)); + throw new ArgumentOutOfRangeException("duration", SR.Format(SR.Timing_RepeatBehaviorInvalidRepeatDuration, duration)); } _iterationCount = 0.0; @@ -133,7 +132,7 @@ public double Count if (_type != RepeatBehaviorType.IterationCount) { #pragma warning suppress 56503 // Suppress presharp warning: Follows a pattern similar to Nullable. - throw new InvalidOperationException(SR.Get(SRID.Timing_RepeatBehaviorNotIterationCount, this)); + throw new InvalidOperationException(SR.Format(SR.Timing_RepeatBehaviorNotIterationCount, this)); } return _iterationCount; @@ -152,7 +151,7 @@ public TimeSpan Duration if (_type != RepeatBehaviorType.RepeatDuration) { #pragma warning suppress 56503 // Suppress presharp warning: Follows a pattern similar to Nullable. - throw new InvalidOperationException(SR.Get(SRID.Timing_RepeatBehaviorNotRepeatDuration, this)); + throw new InvalidOperationException(SR.Format(SR.Timing_RepeatBehaviorNotRepeatDuration, this)); } return _repeatDuration; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeManager.cs index 5a2a876de85..b99a86e7188 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimeManager.cs @@ -23,7 +23,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -270,7 +269,7 @@ public void Seek(int offset, TimeSeekOrigin origin) default: // Invalid enum argument - throw new InvalidEnumArgumentException(SR.Get(SRID.Enum_Invalid, "TimeSeekOrigin")); + throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, "TimeSeekOrigin")); } // Truncate to the beginning diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Timeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Timeline.cs index 391fb9db240..58b4244538e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Timeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Timeline.cs @@ -20,7 +20,6 @@ using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -221,7 +220,7 @@ private static bool ValidateAccelerationDecelerationRatio(object value) if (newValue < 0 || newValue > 1 || double.IsNaN(newValue)) { - throw new ArgumentException(SR.Get(SRID.Timing_InvalidArgAccelAndDecel), "value"); + throw new ArgumentException(SR.Timing_InvalidArgAccelAndDecel, "value"); } return true; @@ -610,7 +609,7 @@ private static bool ValidateSpeedRatio(object value) if (newValue <= 0 || newValue > double.MaxValue || double.IsNaN(newValue)) { - throw new ArgumentException(SR.Get(SRID.Timing_InvalidArgFinitePositive), "value"); + throw new ArgumentException(SR.Timing_InvalidArgFinitePositive, "value"); } return true; @@ -729,7 +728,7 @@ private void ValidateTimeline() { if (AccelerationRatio + DecelerationRatio > 1) { - throw new InvalidOperationException(SR.Get(SRID.Timing_AccelAndDecelGreaterThanOne)); + throw new InvalidOperationException(SR.Timing_AccelAndDecelGreaterThanOne); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineClockCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineClockCollection.cs index 95beead2937..5d9e510e4d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineClockCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineClockCollection.cs @@ -9,7 +9,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -361,7 +360,7 @@ Clock IEnumerator.Current { get { - throw new InvalidOperationException(SR.Get(SRID.Timing_EnumeratorOutOfRange)); + throw new InvalidOperationException(SR.Timing_EnumeratorOutOfRange); } } @@ -403,7 +402,7 @@ public bool MoveNext() if (clockGroup != null && clockGroup.InternalChildren != null) { - throw new InvalidOperationException(SR.Get(SRID.Timing_EnumeratorInvalidated)); + throw new InvalidOperationException(SR.Timing_EnumeratorInvalidated); } return false; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineEnumerator.cs index 7121a9b9a8c..fbc21c5a2bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineEnumerator.cs @@ -15,7 +15,6 @@ using MS.Internal; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -94,7 +93,7 @@ public Timeline Current if (_currentIndex < 0 || _currentIndex == _owner.Count) { #pragma warning suppress 56503 // Suppress presharp warning: Follows a pattern similar to Nullable. - throw new InvalidOperationException(SR.Get(SRID.Timing_EnumeratorOutOfRange)); + throw new InvalidOperationException(SR.Timing_EnumeratorOutOfRange); } return _owner[_currentIndex]; @@ -133,7 +132,7 @@ private void VerifyVersion() { if (_version != _owner.Version) { - throw new InvalidOperationException(SR.Get(SRID.Timing_EnumeratorInvalidated)); + throw new InvalidOperationException(SR.Timing_EnumeratorInvalidated); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineGroup.cs index d9e34cec639..a24a8e702f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/TimelineGroup.cs @@ -10,7 +10,6 @@ using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Animation { @@ -153,7 +152,7 @@ protected virtual void AddChild(object child) if (timelineChild == null) { - throw new ArgumentException(SR.Get(SRID.Timing_ChildMustBeTimeline), nameof(child)); + throw new ArgumentException(SR.Timing_ChildMustBeTimeline, nameof(child)); } else { @@ -214,7 +213,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Timing_NoTextChildren)); + throw new InvalidOperationException(SR.Timing_NoTextChildren); } #endregion // IAddChild interface diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ArcSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ArcSegment.cs index 62151956fd6..5847a49da26 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ArcSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ArcSegment.cs @@ -26,7 +26,6 @@ using System.Windows.Media.Animation; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BezierSegment.cs index 0bdb2dd735b..27d849a1c9e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BezierSegment.cs @@ -22,7 +22,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BitmapCacheBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BitmapCacheBrush.cs index e5376755cc4..49175383b01 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BitmapCacheBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/BitmapCacheBrush.cs @@ -14,7 +14,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -366,7 +365,7 @@ private static object CoerceOpacity(DependencyObject d, object value) { if ((double)value != (double)OpacityProperty.GetDefaultValue(typeof(BitmapCacheBrush))) { - throw new InvalidOperationException(SR.Get(SRID.BitmapCacheBrush_OpacityChanged)); + throw new InvalidOperationException(SR.BitmapCacheBrush_OpacityChanged); } return 1.0; } @@ -375,7 +374,7 @@ private static object CoerceTransform(DependencyObject d, object value) { if ((Transform)value != (Transform)TransformProperty.GetDefaultValue(typeof(BitmapCacheBrush))) { - throw new InvalidOperationException(SR.Get(SRID.BitmapCacheBrush_TransformChanged)); + throw new InvalidOperationException(SR.BitmapCacheBrush_TransformChanged); } return null; } @@ -384,7 +383,7 @@ private static object CoerceRelativeTransform(DependencyObject d, object value) { if ((Transform)value != (Transform)RelativeTransformProperty.GetDefaultValue(typeof(BitmapCacheBrush))) { - throw new InvalidOperationException(SR.Get(SRID.BitmapCacheBrush_RelativeTransformChanged)); + throw new InvalidOperationException(SR.BitmapCacheBrush_RelativeTransformChanged); } return null; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Brush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Brush.cs index 95989ae64c1..8fea4548e87 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Brush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Brush.cs @@ -26,7 +26,6 @@ using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ByteStreamGeometryContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ByteStreamGeometryContext.cs index a76b1c9d886..7fc6c382745 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ByteStreamGeometryContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ByteStreamGeometryContext.cs @@ -25,7 +25,6 @@ using System.Windows.Media.Media3D; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Security; namespace System.Windows.Media @@ -219,7 +218,7 @@ public override void ArcTo(Point point, Size size, double rotationAngle, bool is if (_currentPathFigureDataOffset == -1) { - throw new InvalidOperationException(SR.Get(SRID.StreamGeometry_NeedBeginFigure)); + throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure); } FinishSegment(); @@ -278,7 +277,7 @@ override internal void SetClosedState(bool isClosed) { if (_currentPathFigureDataOffset == -1) { - throw new InvalidOperationException(SR.Get(SRID.StreamGeometry_NeedBeginFigure)); + throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure); } // Clear out the IsClosed flag, then set it as appropriate. @@ -644,7 +643,7 @@ private void GenericPolyTo(IList points, { if (_currentPathFigureDataOffset == -1) { - throw new InvalidOperationException(SR.Get(SRID.StreamGeometry_NeedBeginFigure)); + throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure); } if (points == null) @@ -687,7 +686,7 @@ unsafe private void GenericPolyTo(Point* points, if (_currentPathFigureDataOffset == -1) { - throw new InvalidOperationException(SR.Get(SRID.StreamGeometry_NeedBeginFigure)); + throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure); } GenericPolyToHelper(isStroked, isSmoothJoin, hasCurves, segmentType); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CacheMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CacheMode.cs index fdddda69740..4cadf785b06 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CacheMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CacheMode.cs @@ -7,7 +7,6 @@ using System.ComponentModel; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -34,7 +33,7 @@ internal static CacheMode Parse(string value) } else { - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); } return cacheMode; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CapacityStreamGeometryContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CapacityStreamGeometryContext.cs index 1b2f3cb74c4..5063d564ddf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CapacityStreamGeometryContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CapacityStreamGeometryContext.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Media3D; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Security; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ChannelManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ChannelManager.cs index ae383950420..362d94a3424 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ChannelManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ChannelManager.cs @@ -31,7 +31,6 @@ using Microsoft.Win32.SafeHandles; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods.MilCoreApi; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetrics.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetrics.cs index f4153bf05bd..39d3b67744a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetrics.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetrics.cs @@ -15,7 +15,6 @@ using CompositeFontParser = MS.Internal.FontFace.CompositeFontParser; using Constants = MS.Internal.TextFormatting.Constants; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -115,13 +114,13 @@ public string Metrics + metrics[(int)FieldIndex.LeftSideBearing] + metrics[(int)FieldIndex.RightSideBearing]; if (horizontalAdvance < 0) - throw new ArgumentException(SR.Get(SRID.CharacterMetrics_NegativeHorizontalAdvance)); + throw new ArgumentException(SR.CharacterMetrics_NegativeHorizontalAdvance); double verticalAdvance = metrics[(int)FieldIndex.BlackBoxHeight] + metrics[(int)FieldIndex.TopSideBearing] + metrics[(int)FieldIndex.BottomSideBearing]; if (verticalAdvance < 0) - throw new ArgumentException(SR.Get(SRID.CharacterMetrics_NegativeVerticalAdvance)); + throw new ArgumentException(SR.CharacterMetrics_NegativeVerticalAdvance); // Set all the properties. _blackBoxWidth = metrics[(int)FieldIndex.BlackBoxWidth]; @@ -176,13 +175,13 @@ private static double[] ParseMetrics(string s) out metrics[fieldIndex] )) { - throw new ArgumentException(SR.Get(SRID.CannotConvertStringToType, field.ToString(), "double")); + throw new ArgumentException(SR.Format(SR.CannotConvertStringToType, field.ToString(), "double")); } } else if (fieldIndex < NumRequiredFields) { // Empty field; make sure it's an optional one. - throw new ArgumentException(SR.Get(SRID.CharacterMetrics_MissingRequiredField)); + throw new ArgumentException(SR.CharacterMetrics_MissingRequiredField); } ++fieldIndex; @@ -191,7 +190,7 @@ out metrics[fieldIndex] { // There's a comma so check if we've exceeded the number of fields. if (fieldIndex == NumFields) - throw new ArgumentException(SR.Get(SRID.CharacterMetrics_TooManyFields)); + throw new ArgumentException(SR.CharacterMetrics_TooManyFields); // Initialize character index for next iteration. i = j + 1; @@ -201,7 +200,7 @@ out metrics[fieldIndex] // No more fields; check if we have all required fields. if (fieldIndex < NumRequiredFields) { - throw new ArgumentException(SR.Get(SRID.CharacterMetrics_MissingRequiredField)); + throw new ArgumentException(SR.CharacterMetrics_MissingRequiredField); } break; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetricsDictionary.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetricsDictionary.cs index 7bb861260dd..b3b932dc08d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetricsDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CharacterMetricsDictionary.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // Allow suppression of presharp warnings #pragma warning disable 1634, 1691 @@ -139,7 +138,7 @@ public void CopyTo(KeyValuePair[] array, int index) throw new ArgumentOutOfRangeException("index"); if (index >= array.Length) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); CharacterMetrics[][] pageTable = _pageTable; if (pageTable != null) @@ -157,7 +156,7 @@ public void CopyTo(KeyValuePair[] array, int index) if (metrics != null) { if (k >= array.Length) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); array[k++] = new KeyValuePair( (i << PageShift) | j, @@ -198,10 +197,10 @@ void SC.ICollection.CopyTo(Array array, int index) throw new ArgumentOutOfRangeException("index"); if (index >= array.Length) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); if (Count > array.Length - index) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); SC.DictionaryEntry[] typedArray = array as SC.DictionaryEntry[]; if (typedArray != null) @@ -216,12 +215,12 @@ void SC.ICollection.CopyTo(Array array, int index) { // it's an array of some other type, e.g., object[]; make sure it's one dimensional if (array.Rank != 1) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_ArrayCannotBeMultidimensional)); + throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); // make sure the element type is compatible Type elementType = array.GetType().GetElementType(); if (!elementType.IsAssignableFrom(typeof(SC.DictionaryEntry))) - throw new ArgumentException(SR.Get(SRID.CannotConvertType, typeof(SC.DictionaryEntry), elementType)); + throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(SC.DictionaryEntry), elementType)); foreach (KeyValuePair item in this) { @@ -375,7 +374,7 @@ private CharacterMetrics[] GetPageFromUnicodeScalar(int unicodeScalar) private void SetValue(int key, CharacterMetrics value, bool failIfExists) { if (key < 0 || key > LastDeviceFontCharacterCode) - throw new ArgumentOutOfRangeException(SR.Get(SRID.CodePointOutOfRange, key)); + throw new ArgumentOutOfRangeException(SR.Format(SR.CodePointOutOfRange, key)); if (value == null) throw new ArgumentNullException("value"); @@ -384,7 +383,7 @@ private void SetValue(int key, CharacterMetrics value, bool failIfExists) int i = key & PageMask; if (failIfExists && page[i] != null) - throw new ArgumentException(SR.Get(SRID.CollectionDuplicateKey, key)); + throw new ArgumentException(SR.Format(SR.CollectionDuplicateKey, key)); page[i] = value; _count = 0; @@ -514,7 +513,7 @@ internal static int ConvertKey(object key) { int i = 0; if (!FontFamilyMap.ParseHexNumber(s, ref i, out value) || i < s.Length) - throw new ArgumentException(SR.Get(SRID.CannotConvertStringToType, s, "int"), "key"); + throw new ArgumentException(SR.Format(SR.CannotConvertStringToType, s, "int"), "key"); } else if (key is int) { @@ -522,11 +521,11 @@ internal static int ConvertKey(object key) } else { - throw new ArgumentException(SR.Get(SRID.CannotConvertType, key.GetType(), "int"), "key"); + throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), "int"), "key"); } if (value < 0 || value > FontFamilyMap.LastUnicodeScalar) - throw new ArgumentException(SR.Get(SRID.CodePointOutOfRange, value), "key"); + throw new ArgumentException(SR.Format(SR.CodePointOutOfRange, value), "key"); return value; } @@ -538,7 +537,7 @@ private CharacterMetrics ConvertValue(object value) return metrics; if (value != null) - throw new ArgumentException(SR.Get(SRID.CannotConvertType, typeof(CharacterMetrics), value.GetType())); + throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(CharacterMetrics), value.GetType())); else throw new ArgumentNullException("value"); } @@ -599,7 +598,7 @@ private KeyValuePair GetCurrentEntry() if (_value != null) return new KeyValuePair(_unicodeScalar, _value); else - throw new InvalidOperationException(SR.Get(SRID.Enumerator_VerifyContext)); + throw new InvalidOperationException(SR.Enumerator_VerifyContext); } SC.DictionaryEntry SC.IDictionaryEnumerator.Entry diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Color.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Color.cs index 20d9a2dcc78..5d8c0867581 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Color.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Color.cs @@ -14,7 +14,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -78,12 +77,12 @@ public static Color FromAValues(float a, float[] values, Uri profileUri) if (values == null) { - throw new ArgumentException(SR.Get(SRID.Color_DimensionMismatch, null)); + throw new ArgumentException(SR.Format(SR.Color_DimensionMismatch, null)); } if (values.GetLength(0) != c1.nativeColorValue.GetLength(0)) { - throw new ArgumentException(SR.Get(SRID.Color_DimensionMismatch, null)); + throw new ArgumentException(SR.Format(SR.Color_DimensionMismatch, null)); } for (int numChannels = 0; numChannels < values.GetLength(0); numChannels++) @@ -388,7 +387,7 @@ public float[] GetNativeColorValues() } else { - throw new InvalidOperationException(SR.Get(SRID.Color_NullColorContext, null)); + throw new InvalidOperationException(SR.Format(SR.Color_NullColorContext, null)); } } #endregion Public Methods @@ -498,7 +497,7 @@ public float[] GetNativeColorValues() } else { - throw new ArgumentException(SR.Get(SRID.Color_ColorContextTypeMismatch, null)); + throw new ArgumentException(SR.Format(SR.Color_ColorContextTypeMismatch, null)); } } @@ -532,7 +531,7 @@ public static Color Add(Color color1, Color color2) } else if (color1.context == null || color2.context == null) { - throw new ArgumentException(SR.Get(SRID.Color_ColorContextTypeMismatch, null)); + throw new ArgumentException(SR.Format(SR.Color_ColorContextTypeMismatch, null)); } else if (color1.context == color2.context) { @@ -617,7 +616,7 @@ public static Color Add(Color color1, Color color2) } else { - throw new ArgumentException(SR.Get(SRID.Color_ColorContextTypeMismatch, null)); + throw new ArgumentException(SR.Format(SR.Color_ColorContextTypeMismatch, null)); } } @@ -839,7 +838,7 @@ public byte R } else { - throw new InvalidOperationException(SR.Get(SRID.Color_ColorContextNotsRGB_or_scRGB, null)); + throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); } } } @@ -863,7 +862,7 @@ public byte G } else { - throw new InvalidOperationException(SR.Get(SRID.Color_ColorContextNotsRGB_or_scRGB, null)); + throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); } } } @@ -887,7 +886,7 @@ public byte B } else { - throw new InvalidOperationException(SR.Get(SRID.Color_ColorContextNotsRGB_or_scRGB, null)); + throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); } } } @@ -930,7 +929,7 @@ public float ScR get { return scRgbColor.r; - // throw new ArgumentException(SR.Get(SRID.Color_ColorContextNotsRgb_or_ScRgb, null)); + // throw new ArgumentException(SR.Format(SR.Color_ColorContextNotsRgb_or_ScRgb, null)); } set { @@ -941,7 +940,7 @@ public float ScR } else { - throw new InvalidOperationException(SR.Get(SRID.Color_ColorContextNotsRGB_or_scRGB, null)); + throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); } } } @@ -955,7 +954,7 @@ public float ScG get { return scRgbColor.g; - // throw new ArgumentException(SR.Get(SRID.Color_ColorContextNotsRgb_or_ScRgb, null)); + // throw new ArgumentException(SR.Format(SR.Color_ColorContextNotsRgb_or_ScRgb, null)); } set { @@ -966,7 +965,7 @@ public float ScG } else { - throw new InvalidOperationException(SR.Get(SRID.Color_ColorContextNotsRGB_or_scRGB, null)); + throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); } } } @@ -980,7 +979,7 @@ public float ScB get { return scRgbColor.b; - // throw new ArgumentException(SR.Get(SRID.Color_ColorContextNotsRgb_or_ScRgb, null)); + // throw new ArgumentException(SR.Format(SR.Color_ColorContextNotsRgb_or_ScRgb, null)); } set { @@ -991,7 +990,7 @@ public float ScB } else { - throw new InvalidOperationException(SR.Get(SRID.Color_ColorContextNotsRGB_or_scRGB, null)); + throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContext.cs index 2771a5142a4..7dcb660e440 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContext.cs @@ -28,7 +28,6 @@ using System.Text; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; using UnsafeNativeMethodsMilCoreApi = MS.Win32.PresentationCore.UnsafeNativeMethods; using IWICCC = MS.Win32.PresentationCore.UnsafeNativeMethods.IWICColorContext; @@ -511,7 +510,7 @@ private void Initialize(Uri profileUri, bool isStandardProfileUriNotFromUser) if (!profileUri.IsAbsoluteUri) { - throw new ArgumentException(SR.Get(SRID.UriNotAbsolute), "profileUri"); + throw new ArgumentException(SR.UriNotAbsolute, "profileUri"); } _profileUri = new SecurityCriticalData(profileUri); @@ -553,7 +552,7 @@ private void Initialize(Uri profileUri, bool isStandardProfileUriNotFromUser) // this is safe because it can only happen when the URI is given to us by the user. // Invariant.Assert(!isStandardProfileUriNotFromUser); - throw new FileNotFoundException(SR.Get(SRID.FileNotFoundExceptionWithFileName, profileUri.AbsolutePath), profileUri.AbsolutePath); + throw new FileNotFoundException(SR.Format(SR.FileNotFoundExceptionWithFileName, profileUri.AbsolutePath), profileUri.AbsolutePath); } } @@ -637,7 +636,7 @@ private void FromStream(Stream stm, string filename) } } - throw new ArgumentException(SR.Get(SRID.ColorContext_FileTooLarge), filename); + throw new ArgumentException(SR.ColorContext_FileTooLarge, filename); } /// Note: often the data buffer is larger than the actual data in it. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContextHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContextHelper.cs index b59b8264815..5eb333a216e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContextHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorContextHelper.cs @@ -20,7 +20,6 @@ using System.Globalization; using Microsoft.Win32.SafeHandles; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethodsMilCoreApi=MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media @@ -85,7 +84,7 @@ internal bool GetColorProfileHeader(out UnsafeNativeMethods.PROFILEHEADER header { if (IsInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_ColorContextInvalid)); + throw new InvalidOperationException(SR.Image_ColorContextInvalid); } return UnsafeNativeMethodsMilCoreApi.Mscms.GetColorProfileHeader(_profileHandle, out header); @@ -98,7 +97,7 @@ internal void GetColorProfileFromHandle(byte[] buffer, ref uint bufferSize) if (IsInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_ColorContextInvalid)); + throw new InvalidOperationException(SR.Image_ColorContextInvalid); } // If the buffer is null, this function will return FALSE because it didn't actually copy anything. That's fine and that's diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorConverter.cs index 82da4f16862..c77c5bd1280 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorConverter.cs @@ -18,7 +18,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -89,7 +88,7 @@ public override object ConvertFrom(ITypeDescriptorContext td, System.Globalizati if (null == s) { - throw new ArgumentException(SR.Get(SRID.General_BadType, "ConvertFrom"), "value"); + throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value"); } return Parsers.ParseColor(value as string, ci, td); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransformHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransformHelper.cs index 6b4598cf11a..76daf1b25f5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransformHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ColorTransformHelper.cs @@ -20,7 +20,6 @@ using System.Globalization; using Microsoft.Win32.SafeHandles; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media @@ -123,7 +122,7 @@ internal void TranslateColors(IntPtr paInputColors, UInt32 numColors, UInt32 inp { if (_transformHandle == null || _transformHandle.IsInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_ColorTransformInvalid)); + throw new InvalidOperationException(SR.Image_ColorTransformInvalid); } HRESULT.Check(UnsafeNativeMethods.Mscms.TranslateColors( diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CombinedGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CombinedGeometry.cs index 89f69c74021..35200e1e46f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CombinedGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CombinedGeometry.cs @@ -28,7 +28,6 @@ using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CompositionTarget.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CompositionTarget.cs index 576bff500e8..94df474f34f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CompositionTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CompositionTarget.cs @@ -25,7 +25,6 @@ using MS.Utility; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -482,7 +481,7 @@ private void SetRootVisual(Visual visual) // If a Visual has already a parent it can not be the root in a CompositionTarget because // otherwise we would have two CompositionTargets party on the same Visual tree. // If want to allow this we need to explicitly add support for this. - throw new System.ArgumentException(SR.Get(SRID.CompositionTarget_RootVisual_HasParent)); + throw new System.ArgumentException(SR.CompositionTarget_RootVisual_HasParent); } DUCE.ChannelSet channelSet = MediaContext.From(Dispatcher).GetChannels(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ContainerVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ContainerVisual.cs index df8dd30da0e..9aaa8f3f2ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ContainerVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ContainerVisual.cs @@ -17,7 +17,6 @@ using System.Resources; using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/BrushValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/BrushValueSerializer.cs index 27850ba4699..54346b4631e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/BrushValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/BrushValueSerializer.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/CacheModeValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/CacheModeValueSerializer.cs index 2b20f352475..68ee9822f08 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/CacheModeValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/CacheModeValueSerializer.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/DoubleCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/DoubleCollectionValueSerializer.cs index 692b65576ff..d600a3668ed 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/DoubleCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/DoubleCollectionValueSerializer.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/GeometryValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/GeometryValueSerializer.cs index 62db56543f7..49cfc387aea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/GeometryValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/GeometryValueSerializer.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/Int32CollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/Int32CollectionValueSerializer.cs index 6bda836ce7b..39003db4bf8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/Int32CollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/Int32CollectionValueSerializer.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PathFigureCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PathFigureCollectionValueSerializer.cs index eb6fc8706e6..ec04f688ee2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PathFigureCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PathFigureCollectionValueSerializer.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PointCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PointCollectionValueSerializer.cs index 7d51826abd6..304629fac8a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PointCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/PointCollectionValueSerializer.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/TransformValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/TransformValueSerializer.cs index ff4962a08a6..a861ca7bf7a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/TransformValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/TransformValueSerializer.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/VectorCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/VectorCollectionValueSerializer.cs index 83601e0da74..025c1350fb8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/VectorCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Converters/Generated/VectorCollectionValueSerializer.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CultureSpecificStringDictionary.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CultureSpecificStringDictionary.cs index d0668cafadf..264cba841ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CultureSpecificStringDictionary.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/CultureSpecificStringDictionary.cs @@ -18,7 +18,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -128,10 +127,10 @@ public void CopyTo(KeyValuePair[] array, int index) throw new ArgumentOutOfRangeException("index"); if (index >= array.Length) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); if (_innerDictionary.Count > array.Length - index) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); _innerDictionary.CopyTo(array, index); } @@ -164,10 +163,10 @@ void SC.ICollection.CopyTo(Array array, int index) throw new ArgumentOutOfRangeException("index"); if (index >= array.Length) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); if (_innerDictionary.Count > array.Length - index) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); SC.DictionaryEntry[] typedArray = array as SC.DictionaryEntry[]; if (typedArray != null) @@ -182,12 +181,12 @@ void SC.ICollection.CopyTo(Array array, int index) { // it's an array of some other type, e.g., object[]; make sure it's one dimensional if (array.Rank != 1) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_ArrayCannotBeMultidimensional)); + throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); // make sure the element type is compatible Type elementType = array.GetType().GetElementType(); if (!elementType.IsAssignableFrom(typeof(SC.DictionaryEntry))) - throw new ArgumentException(SR.Get(SRID.CannotConvertType, typeof(SC.DictionaryEntry), elementType)); + throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(SC.DictionaryEntry), elementType)); foreach (KeyValuePair item in _innerDictionary) { @@ -331,7 +330,7 @@ private string ConvertValue(object value) if (value == null) throw new ArgumentNullException("value"); else - throw new ArgumentException(SR.Get(SRID.UnexpectedParameterType, value.GetType(), typeof(string)), "value"); + throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(string)), "value"); } return s; } @@ -345,7 +344,7 @@ private XmlLanguage ConvertKey(object key) if (key == null) throw new ArgumentNullException("key"); else - throw new ArgumentException(SR.Get(SRID.CannotConvertType, key.GetType(), typeof(XmlLanguage)), "key"); + throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), typeof(XmlLanguage)), "key"); } return language; } @@ -413,7 +412,7 @@ private KeyValuePair GetCurrentEntry() // but a generic IEnumerator is not required to. Therefore we need to check for // this case here by checking for a null Key. if (entry.Key == null) - throw new InvalidOperationException(SR.Get(SRID.Enumerator_VerifyContext)); + throw new InvalidOperationException(SR.Enumerator_VerifyContext); return entry; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyle.cs index f49ac9b82d9..e54abd465cb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DashStyle.cs @@ -26,7 +26,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingDrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingDrawingContext.cs index 47040281037..0b7f37c1c8c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingDrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingDrawingContext.cs @@ -23,7 +23,6 @@ using System.Windows.Threading; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -1064,7 +1063,7 @@ public override void Pop() if ( (_previousDrawingGroupStack == null) || (_previousDrawingGroupStack.Count == 0)) { - throw new InvalidOperationException(SR.Get(SRID.DrawingContext_TooManyPops)); + throw new InvalidOperationException(SR.DrawingContext_TooManyPops); } // Restore the previous value of the current drawing group diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroup.cs index 970066ae24c..c7bffe1d7c7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/DrawingGroup.cs @@ -33,7 +33,6 @@ using System.ComponentModel; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -145,12 +144,12 @@ internal void Close(DrawingCollection rootDrawingGroupChildren) if (children == null) { - throw new InvalidOperationException(SR.Get(SRID.DrawingGroup_CannotAppendToNullCollection)); + throw new InvalidOperationException(SR.DrawingGroup_CannotAppendToNullCollection); } if (children.IsFrozen) { - throw new InvalidOperationException(SR.Get(SRID.DrawingGroup_CannotAppendToFrozenCollection)); + throw new InvalidOperationException(SR.DrawingGroup_CannotAppendToFrozenCollection); } // Append the new collection to our current Children. @@ -315,7 +314,7 @@ private void VerifyOpen() // Throw an exception if we are already opened if (_open) { - throw new InvalidOperationException(SR.Get(SRID.DrawingGroup_AlreadyOpen)); + throw new InvalidOperationException(SR.DrawingGroup_AlreadyOpen); } _open = true; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffect.cs index 2b7d4fb3630..72671e98574 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffect.cs @@ -24,7 +24,6 @@ using MS.Internal.PresentationCore; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Effects { @@ -46,7 +45,7 @@ protected BitmapEffect() // thread is not STA. if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new InvalidOperationException(SR.Get(SRID.RequiresSTA)); + throw new InvalidOperationException(SR.RequiresSTA); } } @@ -118,12 +117,12 @@ public BitmapSource GetOutput(BitmapEffectInput input) // if we don't have the input set, we should not be calling the output property if (input.Input == null) { - throw new ArgumentException(SR.Get(SRID.Effect_No_InputSource), "input"); + throw new ArgumentException(SR.Effect_No_InputSource, "input"); } if (input.Input == BitmapEffectInput.ContextInputSource) { - throw new InvalidOperationException(SR.Get(SRID.Effect_No_ContextInputSource, null)); + throw new InvalidOperationException(SR.Format(SR.Effect_No_ContextInputSource, null)); } return input.Input.Clone(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectGroup.cs index a1af1ebdd5a..8efb40011b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectGroup.cs @@ -23,7 +23,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectState.cs index e4fb01280aa..60c77e78305 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/BitmapEffectState.cs @@ -29,7 +29,6 @@ using MS.Internal.PresentationCore; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Effects { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs index a9431f51bc2..91f1018f278 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BevelBitmapEffect.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs index fc5f7c56dfb..0bec745ff01 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffect.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs index af009b04c87..acbd4743e03 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectCollection.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -143,7 +142,7 @@ public void Insert(int index, BitmapEffect value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -251,7 +250,7 @@ public BitmapEffect this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -424,7 +423,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -439,7 +438,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -531,7 +530,7 @@ private BitmapEffect Cast(object value) if (!(value is BitmapEffect)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "BitmapEffect")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "BitmapEffect")); } return (BitmapEffect) value; @@ -557,7 +556,7 @@ internal int AddWithoutFiringPublicEvents(BitmapEffect value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); BitmapEffect newValue = value; @@ -813,7 +812,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -831,7 +830,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -865,12 +864,12 @@ public BitmapEffect Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -948,7 +947,7 @@ public BitmapEffectCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } BitmapEffect newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -965,7 +964,7 @@ public BitmapEffectCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs index d21e33ab12a..0e3ca64909e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectGroup.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs index d6b98471ebb..9476a977314 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BitmapEffectInput.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs index dc861cedb68..f716733f476 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurBitmapEffect.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs index e435599719e..0afc677fb01 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/BlurEffect.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs index ee9617e461b..e538857fba2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowBitmapEffect.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs index a7562b939fb..f54d6cb7dfe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/DropShadowEffect.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EdgeProfile.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EdgeProfile.cs index 365f5164ea2..d681837d868 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EdgeProfile.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EdgeProfile.cs @@ -11,10 +11,8 @@ #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs index a7f81d466b9..3e3c26dbd76 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/Effect.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs index d74c24ef501..8f16410a529 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/EmbossBitmapEffect.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs index 0d8d88189c9..cce31af46d1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ImplicitInputBrush.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/KernelType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/KernelType.cs index 7f024a12e86..e35ee734aa5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/KernelType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/KernelType.cs @@ -11,10 +11,8 @@ #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs index 2f6689016c7..d8d65c4fefa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/OuterGlowBitmapEffect.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs index a860a32c287..4dfed16d554 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/PixelShader.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/RenderingBias.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/RenderingBias.cs index d20a1c4a753..d752cf3e926 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/RenderingBias.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/RenderingBias.cs @@ -11,10 +11,8 @@ #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs index c0fffc01430..9ab27b0e199 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderEffect.cs @@ -33,7 +33,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderRenderMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderRenderMode.cs index 00802bc0954..cfb507eaf8b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderRenderMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/Generated/ShaderRenderMode.cs @@ -11,10 +11,8 @@ #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/PixelShader.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/PixelShader.cs index 83ede498e7b..3810121c37a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/PixelShader.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/PixelShader.cs @@ -24,7 +24,6 @@ using System.Runtime.InteropServices; using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Navigation; using System.IO.Packaging; using MS.Internal.PresentationCore; @@ -111,7 +110,7 @@ private void UriSourcePropertyChangedHook(DependencyPropertyChangedEventArgs e) if (!newUri.IsFile && !MS.Internal.IO.Packaging.PackUriHelper.IsPackUri(newUri)) { - throw new ArgumentException(SR.Get(SRID.Effect_SourceUriMustBeFileOrPack)); + throw new ArgumentException(SR.Effect_SourceUriMustBeFileOrPack); } stream = WpfWebRequestHelper.CreateRequestAndGetResponseStream(newUri); @@ -141,14 +140,14 @@ private void LoadPixelShaderFromStreamIntoMemory(Stream source) { if (!source.CanSeek) { - throw new InvalidOperationException(SR.Get(SRID.Effect_ShaderSeekableStream)); + throw new InvalidOperationException(SR.Effect_ShaderSeekableStream); } int len = (int)source.Length; // only works on seekable streams. if (len % sizeof(int) != 0) { - throw new InvalidOperationException(SR.Get(SRID.Effect_ShaderBytecodeSize)); + throw new InvalidOperationException(SR.Effect_ShaderBytecodeSize); } BinaryReader br = new BinaryReader(source); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ShaderEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ShaderEffect.cs index 6e4f4fa01bb..1dcf4305f3a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ShaderEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Effects/ShaderEffect.cs @@ -17,7 +17,6 @@ using System.Security; using System.Runtime.InteropServices; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Effects { @@ -56,7 +55,7 @@ protected double PaddingTop WritePreamble(); if (value < 0.0) { - throw new ArgumentOutOfRangeException("value", value, SR.Get(SRID.Effect_ShaderEffectPadding)); + throw new ArgumentOutOfRangeException("value", value, SR.Effect_ShaderEffectPadding); } else { @@ -83,7 +82,7 @@ protected double PaddingBottom WritePreamble(); if (value < 0.0) { - throw new ArgumentOutOfRangeException("value", value, SR.Get(SRID.Effect_ShaderEffectPadding)); + throw new ArgumentOutOfRangeException("value", value, SR.Effect_ShaderEffectPadding); } else { @@ -110,7 +109,7 @@ protected double PaddingLeft WritePreamble(); if (value < 0.0) { - throw new ArgumentOutOfRangeException("value", value, SR.Get(SRID.Effect_ShaderEffectPadding)); + throw new ArgumentOutOfRangeException("value", value, SR.Effect_ShaderEffectPadding); } else { @@ -137,7 +136,7 @@ protected double PaddingRight WritePreamble(); if (value < 0.0) { - throw new ArgumentOutOfRangeException("value", value, SR.Get(SRID.Effect_ShaderEffectPadding)); + throw new ArgumentOutOfRangeException("value", value, SR.Effect_ShaderEffectPadding); } else { @@ -204,7 +203,7 @@ private void OnPixelShaderBytecodeChanged(object sender, EventArgs e) pixelShader.ShaderMinorVersion == 0 && UsesPS30OnlyRegisters()) { - throw new InvalidOperationException(SR.Get(SRID.Effect_20ShaderUsing30Registers)); + throw new InvalidOperationException(SR.Effect_20ShaderUsing30Registers); } } @@ -359,7 +358,7 @@ private void UpdateShaderConstant(DependencyProperty dp, object newValue, int re if (t == null) { - throw new InvalidOperationException(SR.Get(SRID.Effect_ShaderConstantType, dp.PropertyType.Name)); + throw new InvalidOperationException(SR.Format(SR.Effect_ShaderConstantType, dp.PropertyType.Name)); } else { @@ -367,7 +366,7 @@ private void UpdateShaderConstant(DependencyProperty dp, object newValue, int re // Treat as a float constant in ps_2_0 by default // int registerMax = PS_2_0_FLOAT_REGISTER_LIMIT; - string srid = SRID.Effect_Shader20ConstantRegisterLimit; + string srid = nameof(SR.Effect_Shader20ConstantRegisterLimit); if (PixelShader != null && PixelShader.ShaderMajorVersion >= 3) { @@ -377,23 +376,23 @@ private void UpdateShaderConstant(DependencyProperty dp, object newValue, int re if (t == typeof(float)) { registerMax = PS_3_0_FLOAT_REGISTER_LIMIT; - srid = SRID.Effect_Shader30FloatConstantRegisterLimit; + srid = nameof(SR.Effect_Shader30FloatConstantRegisterLimit); } else if (t == typeof(int)) { registerMax = PS_3_0_INT_REGISTER_LIMIT; - srid = SRID.Effect_Shader30IntConstantRegisterLimit; + srid = nameof(SR.Effect_Shader30IntConstantRegisterLimit); } else if (t == typeof(bool)) { registerMax = PS_3_0_BOOL_REGISTER_LIMIT; - srid = SRID.Effect_Shader30BoolConstantRegisterLimit; + srid = nameof(SR.Effect_Shader30BoolConstantRegisterLimit); } } if (registerIndex >= registerMax || registerIndex < 0) { - throw new ArgumentException(SR.Get(srid), "dp"); + throw new ArgumentException(SR.GetResourceString(srid), "dp"); } if (t == typeof(float)) @@ -444,7 +443,7 @@ and not ImplicitInputBrush // Note that if the type of the brush is ImplicitInputBrush and the value is non null, the value is actually // Effect.ImplicitInput. This is because ImplicitInputBrush is internal and the user can only get to the singleton // Effect.ImplicitInput. - throw new ArgumentException(SR.Get(SRID.Effect_ShaderSamplerType), "dp"); + throw new ArgumentException(SR.Effect_ShaderSamplerType, "dp"); } } @@ -452,17 +451,17 @@ and not ImplicitInputBrush // Treat as ps_2_0 by default // int registerMax = PS_2_0_SAMPLER_LIMIT; - string srid = SRID.Effect_Shader20SamplerRegisterLimit; + string srid = nameof(SR.Effect_Shader20SamplerRegisterLimit); if (PixelShader != null && PixelShader.ShaderMajorVersion >= 3) { registerMax = PS_3_0_SAMPLER_LIMIT; - srid = SRID.Effect_Shader30SamplerRegisterLimit; + srid = nameof(SR.Effect_Shader30SamplerRegisterLimit); } if (registerIndex >= registerMax || registerIndex < 0) { - throw new ArgumentException(SR.Get(srid)); + throw new ArgumentException(SR.GetResourceString(srid)); } SamplerData sd = new SamplerData() @@ -575,7 +574,7 @@ private void ManualUpdateResource(DUCE.Channel channel, bool skipOnChannelCheck) { if (PixelShader == null) { - throw new InvalidOperationException(SR.Get(SRID.Effect_ShaderPixelShaderSet)); + throw new InvalidOperationException(SR.Effect_ShaderPixelShaderSet); } checked diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EllipseGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EllipseGeometry.cs index bc5224d6463..6d206f8357a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EllipseGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/EllipseGeometry.cs @@ -21,7 +21,6 @@ using System.Runtime.InteropServices; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -46,7 +45,7 @@ public EllipseGeometry(Rect rect) { if (rect.IsEmpty) { - throw new System.ArgumentException(SR.Get(SRID.Rect_Empty, "rect")); + throw new System.ArgumentException(SR.Format(SR.Rect_Empty, "rect")); } RadiusX = (rect.Right - rect.X) * (1.0 / 2.0); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FactoryMaker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FactoryMaker.cs index 5f81b1f1f0c..55eb5e861b7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FactoryMaker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FactoryMaker.cs @@ -13,7 +13,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMap.cs index 397946dce63..53e71e98a00 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMap.cs @@ -23,7 +23,6 @@ using MS.Internal.FontFace; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -239,7 +238,7 @@ internal Range[] Ranges private static void ThrowInvalidUnicodeRange() { - throw new FormatException(SR.Get(SRID.CompositeFontInvalidUnicodeRange)); + throw new FormatException(SR.CompositeFontInvalidUnicodeRange); } private static Range[] ParseUnicodeRanges(string unicodeRanges) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMapCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMapCollection.cs index 2a7ef997d8d..23c11c95d14 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMapCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyMapCollection.cs @@ -16,7 +16,6 @@ using MS.Internal.FontFace; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -89,10 +88,10 @@ public void CopyTo(FontFamilyMap[] array, int index) throw new ArgumentNullException("array"); if (index >= array.Length) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); if (_count > array.Length - index) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); if (_count != 0) Array.Copy(_items, 0, array, index, _count); @@ -104,17 +103,17 @@ void SC.ICollection.CopyTo(Array array, int index) throw new ArgumentNullException("array"); if (array.Rank != 1) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_ArrayCannotBeMultidimensional)); + throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); Type elementType = array.GetType().GetElementType(); if (!elementType.IsAssignableFrom(typeof(FamilyTypeface))) - throw new ArgumentException(SR.Get(SRID.CannotConvertType, typeof(FamilyTypeface), elementType)); + throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(FamilyTypeface), elementType)); if (index >= array.Length) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); if (_count > array.Length - index) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); if (_count != 0) Array.Copy(_items, 0, array, index, _count); @@ -269,7 +268,7 @@ private int InsertItem(int index, FontFamilyMap item) // every Unicode value, in which case (since we search sequentially) performance // would become a problem. if (_count + 1 >= ushort.MaxValue) - throw new InvalidOperationException(SR.Get(SRID.CompositeFont_TooManyFamilyMaps)); + throw new InvalidOperationException(SR.CompositeFont_TooManyFamilyMaps); // Validate the index. if (index < 0 || index > Count) @@ -373,7 +372,7 @@ private void RangeCheck(int index) private void VerifyChangeable() { if (_fontInfo == null) - throw new NotSupportedException(SR.Get(SRID.General_ObjectIsReadOnly)); + throw new NotSupportedException(SR.General_ObjectIsReadOnly); } private FontFamilyMap ConvertValue(object obj) @@ -383,7 +382,7 @@ private FontFamilyMap ConvertValue(object obj) FontFamilyMap familyMap = obj as FontFamilyMap; if (familyMap == null) - throw new ArgumentException(SR.Get(SRID.CannotConvertType, obj.GetType(), typeof(FontFamilyMap))); + throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FontFamilyMap))); return familyMap; } @@ -435,7 +434,7 @@ object SC.IEnumerator.Current // If there is no current item a non-generic IEnumerator should throw an exception, // but a generic IEnumerator is not required to. if (_current == null) - throw new InvalidOperationException(SR.Get(SRID.Enumerator_VerifyContext)); + throw new InvalidOperationException(SR.Enumerator_VerifyContext); return _current; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypeface.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypeface.cs index 798a8e4c663..7e07194e43e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypeface.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypeface.cs @@ -21,7 +21,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -285,7 +284,7 @@ public override int GetHashCode() private void VerifyChangeable() { if (_readOnly) - throw new NotSupportedException(SR.Get(SRID.General_ObjectIsReadOnly)); + throw new NotSupportedException(SR.General_ObjectIsReadOnly); } string IDeviceFont.Name diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypefaceCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypefaceCollection.cs index 1a03e55ee78..0f1d5b8a2ee 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypefaceCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FamilyTypefaceCollection.cs @@ -16,7 +16,6 @@ using MS.Internal.FontFace; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -254,7 +253,7 @@ private int InsertItem(int index, FamilyTypeface item) // We can't have two items with same style, weight, stretch. if (FindItem(item) >= 0) - throw new ArgumentException(SR.Get(SRID.CompositeFont_DuplicateTypeface)); + throw new ArgumentException(SR.CompositeFont_DuplicateTypeface); // Make room for the new item. if (_items == null) @@ -364,7 +363,7 @@ private void RangeCheck(int index) private void VerifyChangeable() { if (_innerList != null) - throw new NotSupportedException(SR.Get(SRID.General_ObjectIsReadOnly)); + throw new NotSupportedException(SR.General_ObjectIsReadOnly); } private FamilyTypeface ConvertValue(object obj) @@ -374,7 +373,7 @@ private FamilyTypeface ConvertValue(object obj) FamilyTypeface familyTypeface = obj as FamilyTypeface; if (familyTypeface == null) - throw new ArgumentException(SR.Get(SRID.CannotConvertType, obj.GetType(), typeof(FamilyTypeface))); + throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FamilyTypeface))); return familyTypeface; } @@ -385,17 +384,17 @@ private void CopyItems(Array array, int index) throw new ArgumentNullException("array"); if (array.Rank != 1) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_ArrayCannotBeMultidimensional)); + throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); Type elementType = array.GetType().GetElementType(); if (!elementType.IsAssignableFrom(typeof(FamilyTypeface))) - throw new ArgumentException(SR.Get(SRID.CannotConvertType, typeof(FamilyTypeface[]), elementType)); + throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(FamilyTypeface[]), elementType)); if (index >= array.Length) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); if (_count > array.Length - index) - throw new ArgumentException(SR.Get(SRID.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); + throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); if (_count != 0) { @@ -451,7 +450,7 @@ object SC.IEnumerator.Current // If there is no current item a non-generic IEnumerator should throw an exception, // but a generic IEnumerator is not required to. if (_current == null) - throw new InvalidOperationException(SR.Get(SRID.Enumerator_VerifyContext)); + throw new InvalidOperationException(SR.Enumerator_VerifyContext); return _current; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontEmbeddingManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontEmbeddingManager.cs index 77cb95c29a3..7e120b52225 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontEmbeddingManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontEmbeddingManager.cs @@ -27,7 +27,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // Allow suppression of presharp warnings #pragma warning disable 1634, 1691 @@ -119,7 +118,7 @@ public ICollection GetUsedGlyphs(Uri glyphTypeface) Dictionary glyphsUsed = _collectedGlyphTypefaces[glyphTypeface]; if (glyphsUsed == null) { - throw new ArgumentException(SR.Get(SRID.GlyphTypefaceNotRecorded), "glyphTypeface"); + throw new ArgumentException(SR.GlyphTypefaceNotRecorded, "glyphTypeface"); } return glyphsUsed.Keys; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamily.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamily.cs index 42b92efe68b..7b5a0dd89d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamily.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamily.cs @@ -28,7 +28,6 @@ using System.Security; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; // Since we disable PreSharp warnings in this file, we first need to disable warnings about unknown message numbers and unknown pragmas. #pragma warning disable 1634, 1691 @@ -93,7 +92,7 @@ public FontFamily(Uri baseUri, string familyName) throw new ArgumentNullException("familyName"); if (baseUri != null && !baseUri.IsAbsoluteUri) - throw new ArgumentException(SR.Get(SRID.UriNotAbsolute), "baseUri"); + throw new ArgumentException(SR.UriNotAbsolute, "baseUri"); _familyIdentifier = new FontFamilyIdentifier(familyName, baseUri); } @@ -323,7 +322,7 @@ private CompositeFontFamily VerifyMutable() if (mutableFamily == null) { - throw new NotSupportedException(SR.Get(SRID.FontFamily_ReadOnly)); + throw new NotSupportedException(SR.FontFamily_ReadOnly); } return mutableFamily; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyConverter.cs index a5de25f446d..cd67cef5e26 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FontFamilyConverter.cs @@ -21,7 +21,6 @@ using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // Allow suppression of presharp warnings #pragma warning disable 1634, 1691 @@ -143,7 +142,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul FontFamily fontFamily = value as FontFamily; if (fontFamily == null) { - throw new ArgumentException(SR.Get(SRID.General_Expected_Type, "FontFamily"), "value"); + throw new ArgumentException(SR.Format(SR.General_Expected_Type, "FontFamily"), "value"); } if (null == destinationType) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Fonts.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Fonts.cs index 326ed961a3d..522f81e6850 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Fonts.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Fonts.cs @@ -97,7 +97,7 @@ public static ICollection GetFontFamilies(Uri baseUri, string locati { // Both Uri parameters are optional but neither can be relative. if (baseUri != null && !baseUri.IsAbsoluteUri) - throw new ArgumentException(SR.Get(SRID.UriNotAbsolute), "baseUri"); + throw new ArgumentException(SR.UriNotAbsolute, "baseUri"); // Determine the font location from the base URI and location string. Uri fontLocation; @@ -105,7 +105,7 @@ public static ICollection GetFontFamilies(Uri baseUri, string locati { // absolute location; make sure we support absolute font family references for this scheme if (!Util.IsSupportedSchemeForAbsoluteFontFamilyUri(fontLocation)) - throw new ArgumentException(SR.Get(SRID.InvalidAbsoluteUriInFontFamilyName), "location"); + throw new ArgumentException(SR.InvalidAbsoluteUriInFontFamilyName, "location"); // make sure the absolute location is a valid URI reference rather than a Win32 path as // we don't support the latter in a font family reference @@ -115,7 +115,7 @@ public static ICollection GetFontFamilies(Uri baseUri, string locati { // relative location; we need a base URI if (baseUri == null) - throw new ArgumentNullException("baseUri", SR.Get(SRID.NullBaseUriParam, "baseUri", "location")); + throw new ArgumentNullException("baseUri", SR.Format(SR.NullBaseUriParam, "baseUri", "location")); // the location part must include a path component, otherwise we'll look in windows fonts and ignore the base URI if (string.IsNullOrEmpty(location)) @@ -333,7 +333,7 @@ public void CopyTo(Typeface[] array, int arrayIndex) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // The extra "arrayIndex >= array.Length" check in because even if _collection.Count diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FormattedText.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FormattedText.cs index deb286cd8e1..791996561dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FormattedText.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/FormattedText.cs @@ -24,7 +24,6 @@ using MS.Internal.FontFace; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 //Allow suppression of Presharp warnings @@ -295,13 +294,13 @@ private static void ValidateCulture(CultureInfo culture) private static void ValidateFontSize(double emSize) { if (emSize <= 0) - throw new ArgumentOutOfRangeException("emSize", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("emSize", SR.ParameterMustBeGreaterThanZero); if (emSize > MaxFontEmSize) - throw new ArgumentOutOfRangeException("emSize", SR.Get(SRID.ParameterCannotBeGreaterThan, MaxFontEmSize)); + throw new ArgumentOutOfRangeException("emSize", SR.Format(SR.ParameterCannotBeGreaterThan, MaxFontEmSize)); if (double.IsNaN(emSize)) - throw new ArgumentOutOfRangeException("emSize", SR.Get(SRID.ParameterValueCannotBeNaN)); + throw new ArgumentOutOfRangeException("emSize", SR.ParameterValueCannotBeNaN); } private static void ValidateFlowDirection(FlowDirection flowDirection, string parameterName) @@ -1283,7 +1282,7 @@ public double LineHeight set { if (value < 0) - throw new ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterCannotBeNegative)); + throw new ArgumentOutOfRangeException("value", SR.ParameterCannotBeNegative); _defaultParaProps.SetLineHeight(value); InvalidateMetrics(); @@ -1307,7 +1306,7 @@ public double MaxTextWidth set { if (value < 0) - throw new ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterCannotBeNegative)); + throw new ArgumentOutOfRangeException("value", SR.ParameterCannotBeNegative); _maxTextWidth = value; InvalidateMetrics(); } @@ -1357,10 +1356,10 @@ public double MaxTextHeight set { if (value <= 0) - throw new ArgumentOutOfRangeException("value", SR.Get(SRID.PropertyMustBeGreaterThanZero, "MaxTextHeight")); + throw new ArgumentOutOfRangeException("value", SR.Format(SR.PropertyMustBeGreaterThanZero, "MaxTextHeight")); if (double.IsNaN(value)) - throw new ArgumentOutOfRangeException("value", SR.Get(SRID.PropertyValueCannotBeNaN, "MaxTextHeight")); + throw new ArgumentOutOfRangeException("value", SR.Format(SR.PropertyValueCannotBeNaN, "MaxTextHeight")); _maxTextHeight = value; InvalidateMetrics(); @@ -1383,7 +1382,7 @@ public int MaxLineCount set { if (value <= 0) - throw new ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("value", SR.ParameterMustBeGreaterThanZero); _maxLineCount = value; InvalidateMetrics(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransform.cs index 61ee863f349..9d212cb72fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransform.cs @@ -57,7 +57,7 @@ public Point Transform(Point point) if (!TryTransform(point, out transformedPoint)) { - throw new InvalidOperationException(SR.Get(SRID.GeneralTransform_TransformFailed, null)); + throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null)); } return transformedPoint; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransformGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransformGroup.cs index 61a9f398c38..56dc3fc64f1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransformGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeneralTransformGroup.cs @@ -23,7 +23,6 @@ using MS.Internal.PresentationCore; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentX.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentX.cs index bb4b1a28cc7..1bb9e573c31 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentX.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentX.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentY.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentY.cs index 7ca80147629..6d7a2fd9d56 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentY.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/AlignmentY.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs index bbe6b03572f..f78ef97d915 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ArcSegment.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs index 753cf4efa21..6fb2d145d20 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BezierSegment.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs index d437cda58e3..3097f36b190 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCache.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs index 592c18b80e9..625843e94dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapCacheBrush.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapScalingMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapScalingMode.cs index 5bae26283cf..1973965165a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapScalingMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BitmapScalingMode.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs index 58da793051a..3cf3c162dfb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Brush.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushConverter.cs index 2992c50b291..c1c8467686c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushConverter.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -81,7 +80,7 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati { if (!(context.Instance is Brush)) { - throw new ArgumentException(SR.Get(SRID.General_Expected_Type, "Brush"), "context"); + throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Brush"), "context"); } Brush value = (Brush)context.Instance; @@ -154,7 +153,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul #pragma warning suppress 6506 // instance is obviously not null if (!instance.CanSerializeToString()) { - throw new NotSupportedException(SR.Get(SRID.Converter_ConvertToNotSupported)); + throw new NotSupportedException(SR.Converter_ConvertToNotSupported); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushMappingMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushMappingMode.cs index 30827a7f2da..cdd3d6ffb84 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushMappingMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/BrushMappingMode.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs index 92c4604d614..3fa6d05b681 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheMode.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheModeConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheModeConverter.cs index 1ccc1a9e4af..b3ab8d62994 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheModeConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CacheModeConverter.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -81,7 +80,7 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati { if (!(context.Instance is CacheMode)) { - throw new ArgumentException(SR.Get(SRID.General_Expected_Type, "CacheMode"), "context"); + throw new ArgumentException(SR.Format(SR.General_Expected_Type, "CacheMode"), "context"); } CacheMode value = (CacheMode)context.Instance; @@ -154,7 +153,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul #pragma warning suppress 6506 // instance is obviously not null if (!instance.CanSerializeToString()) { - throw new NotSupportedException(SR.Get(SRID.Converter_ConvertToNotSupported)); + throw new NotSupportedException(SR.Converter_ConvertToNotSupported); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CachingHint.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CachingHint.cs index 9fdca03ca70..67c899e0190 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CachingHint.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CachingHint.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ClearTypeHint.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ClearTypeHint.cs index b364728291c..38133b41768 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ClearTypeHint.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ClearTypeHint.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorCollectionConverter.cs index e56bac3d296..4751c6762ec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorCollectionConverter.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorInterpolationMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorInterpolationMode.cs index aa81d33f735..d8810c5ca7b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorInterpolationMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ColorInterpolationMode.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs index bf1d49da806..79962674e84 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/CombinedGeometry.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs index 476ba9d3812..a76d44b34e9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DashStyle.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs index 02da940b060..84c265b4755 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -390,7 +389,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -405,7 +404,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -481,7 +480,7 @@ private double Cast(object value) if (!(value is double)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "double")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "double")); } return (double) value; @@ -836,7 +835,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -854,7 +853,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -888,12 +887,12 @@ public double Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollectionConverter.cs index 67bdd5d3f68..4ad0eb6f65b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DoubleCollectionConverter.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs index e5609b1318a..b0c2d6c582c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Drawing.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs index 0614d0da30a..f0ce48262e7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingBrush.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs index a7f764476b7..b269b3ca2f9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -157,7 +156,7 @@ public void Insert(int index, Drawing value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -265,7 +264,7 @@ public Drawing this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -440,7 +439,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -455,7 +454,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -547,7 +546,7 @@ private Drawing Cast(object value) if (!(value is Drawing)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Drawing")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Drawing")); } return (Drawing) value; @@ -573,7 +572,7 @@ internal int AddWithoutFiringPublicEvents(Drawing value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); Drawing newValue = value; @@ -856,7 +855,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -874,7 +873,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -908,12 +907,12 @@ public Drawing Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -991,7 +990,7 @@ public DrawingCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } Drawing newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -1009,7 +1008,7 @@ public DrawingCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContext.cs index 7c190f2cc1c..17eae6ba493 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContext.cs @@ -25,7 +25,6 @@ using System.Windows.Media.Media3D; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Security; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextDrawingContextWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextDrawingContextWalker.cs index 78885f5c8c2..72ff841c658 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextDrawingContextWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextDrawingContextWalker.cs @@ -25,7 +25,6 @@ using System.Windows.Media.Media3D; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Security; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextWalker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextWalker.cs index 6560c152be1..2ad288dbbda 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextWalker.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingContextWalker.cs @@ -25,7 +25,6 @@ using System.Windows.Media.Media3D; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Security; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs index 4df39e621fb..a881e9fc157 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingGroup.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs index f573c9ca99b..ec3363200fc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/DrawingImage.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EdgeMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EdgeMode.cs index f9414316b0c..493b8834e1d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EdgeMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EdgeMode.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs index d571c2ba332..9c0e5fc8ffe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/EllipseGeometry.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/FillRule.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/FillRule.cs index 32adc14dc48..273d7b91507 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/FillRule.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/FillRule.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs index 40adcc2e353..d45f59b286e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransform.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs index a83020a225a..bf87a4fed5c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -145,7 +144,7 @@ public void Insert(int index, GeneralTransform value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -253,7 +252,7 @@ public GeneralTransform this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -426,7 +425,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -441,7 +440,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -533,7 +532,7 @@ private GeneralTransform Cast(object value) if (!(value is GeneralTransform)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform")); } return (GeneralTransform) value; @@ -559,7 +558,7 @@ internal int AddWithoutFiringPublicEvents(GeneralTransform value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); GeneralTransform newValue = value; @@ -815,7 +814,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -833,7 +832,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -867,12 +866,12 @@ public GeneralTransform Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -950,7 +949,7 @@ public GeneralTransformCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } GeneralTransform newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -967,7 +966,7 @@ public GeneralTransformCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs index 3d63ef3f737..f63a82dd16a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeneralTransformGroup.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs index 4052f543473..80ca94c2980 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Geometry.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs index 757e324bed3..c2e08bb5c32 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -157,7 +156,7 @@ public void Insert(int index, Geometry value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -265,7 +264,7 @@ public Geometry this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -440,7 +439,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -455,7 +454,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -547,7 +546,7 @@ private Geometry Cast(object value) if (!(value is Geometry)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Geometry")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Geometry")); } return (Geometry) value; @@ -573,7 +572,7 @@ internal int AddWithoutFiringPublicEvents(Geometry value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); Geometry newValue = value; @@ -856,7 +855,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -874,7 +873,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -908,12 +907,12 @@ public Geometry Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -991,7 +990,7 @@ public GeometryCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } Geometry newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -1009,7 +1008,7 @@ public GeometryCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCombineMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCombineMode.cs index 42786243cee..a7a78063a06 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCombineMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryCombineMode.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryConverter.cs index b8264ce4f73..8a7584b5605 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryConverter.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -81,7 +80,7 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati { if (!(context.Instance is Geometry)) { - throw new ArgumentException(SR.Get(SRID.General_Expected_Type, "Geometry"), "context"); + throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Geometry"), "context"); } Geometry value = (Geometry)context.Instance; @@ -154,7 +153,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul #pragma warning suppress 6506 // instance is obviously not null if (!instance.CanSerializeToString()) { - throw new NotSupportedException(SR.Get(SRID.Converter_ConvertToNotSupported)); + throw new NotSupportedException(SR.Converter_ConvertToNotSupported); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs index 416ff169d0b..03424309e09 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryDrawing.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs index cec65890e11..d592fcd7e61 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GeometryGroup.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs index e7c81782f17..6a4d940074b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GlyphRunDrawing.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs index c0c8c68c580..6fc5c45aa92 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientBrush.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientSpreadMethod.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientSpreadMethod.cs index 4c89f886b32..b444c96ebdd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientSpreadMethod.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientSpreadMethod.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStop.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStop.cs index c59fac0d164..bcbe31dd325 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStop.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStop.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs index ae4c4ba1ad7..71f96b1bc92 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GradientStopCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -145,7 +144,7 @@ public void Insert(int index, GradientStop value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -253,7 +252,7 @@ public GradientStop this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -426,7 +425,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -441,7 +440,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -533,7 +532,7 @@ private GradientStop Cast(object value) if (!(value is GradientStop)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "GradientStop")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GradientStop")); } return (GradientStop) value; @@ -559,7 +558,7 @@ internal int AddWithoutFiringPublicEvents(GradientStop value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); GradientStop newValue = value; @@ -918,7 +917,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -936,7 +935,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -970,12 +969,12 @@ public GradientStop Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -1053,7 +1052,7 @@ public GradientStopCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } GradientStop newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -1070,7 +1069,7 @@ public GradientStopCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs index 9894787c1cd..3b37beb7301 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/GuidelineSet.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs index ee911a5d1d5..59648556177 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageBrush.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs index 54c8475ae42..281871c998e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs index 1f3dbacac89..de5238ee81b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs index b3befd189f9..74b47764218 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -390,7 +389,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -405,7 +404,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -481,7 +480,7 @@ private int Cast(object value) if (!(value is int)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "int")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "int")); } return (int) value; @@ -836,7 +835,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -854,7 +853,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -888,12 +887,12 @@ public int Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32CollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32CollectionConverter.cs index eb0f3427871..a9974bf4ecc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32CollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32CollectionConverter.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs index 76334d8da93..040d5f81cc2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs index 62fcae25507..ea9289c4169 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs index 395b75f1bb8..9484c774ab0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs index 8c002680bc4..8285ee224b1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs index f5793c86328..b44d8ad9037 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs index c1b1b2d7440..23609974f23 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs index 7858217789c..fc06875067f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -146,7 +145,7 @@ public void Insert(int index, PathFigure value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -254,7 +253,7 @@ public PathFigure this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -427,7 +426,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -442,7 +441,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -534,7 +533,7 @@ private PathFigure Cast(object value) if (!(value is PathFigure)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathFigure")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathFigure")); } return (PathFigure) value; @@ -560,7 +559,7 @@ internal int AddWithoutFiringPublicEvents(PathFigure value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); PathFigure newValue = value; @@ -905,7 +904,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -923,7 +922,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -957,12 +956,12 @@ public PathFigure Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -1040,7 +1039,7 @@ public PathFigureCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } PathFigure newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -1057,7 +1056,7 @@ public PathFigureCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollectionConverter.cs index 2e8847c848d..015265d17bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigureCollectionConverter.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -81,7 +80,7 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati { if (!(context.Instance is PathFigureCollection)) { - throw new ArgumentException(SR.Get(SRID.General_Expected_Type, "PathFigureCollection"), "context"); + throw new ArgumentException(SR.Format(SR.General_Expected_Type, "PathFigureCollection"), "context"); } PathFigureCollection value = (PathFigureCollection)context.Instance; @@ -154,7 +153,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul #pragma warning suppress 6506 // instance is obviously not null if (!instance.CanSerializeToString()) { - throw new NotSupportedException(SR.Get(SRID.Converter_ConvertToNotSupported)); + throw new NotSupportedException(SR.Converter_ConvertToNotSupported); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs index 68d48ee4c8b..7641e462546 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathGeometry.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs index 7f677130d9e..9f5cff69920 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegment.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs index c1f728fe823..3d62829d4dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathSegmentCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -145,7 +144,7 @@ public void Insert(int index, PathSegment value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -253,7 +252,7 @@ public PathSegment this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -426,7 +425,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -441,7 +440,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -533,7 +532,7 @@ private PathSegment Cast(object value) if (!(value is PathSegment)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathSegment")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathSegment")); } return (PathSegment) value; @@ -559,7 +558,7 @@ internal int AddWithoutFiringPublicEvents(PathSegment value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); PathSegment newValue = value; @@ -815,7 +814,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -833,7 +832,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -867,12 +866,12 @@ public PathSegment Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -950,7 +949,7 @@ public PathSegmentCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } PathSegment newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -967,7 +966,7 @@ public PathSegmentCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs index ae538e7dd22..9ef339b0029 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Pen.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineCap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineCap.cs index b015cb15604..36d3a538979 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineCap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineCap.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineJoin.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineJoin.cs index 8a25057b1d3..da35ca5d8bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineJoin.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PenLineJoin.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs index 2de38f249e1..5a786ba9dec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -390,7 +389,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -405,7 +404,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -481,7 +480,7 @@ private Point Cast(object value) if (!(value is Point)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point")); } return (Point) value; @@ -838,7 +837,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -856,7 +855,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -890,12 +889,12 @@ public Point Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollectionConverter.cs index 69515716d4d..b223b0b7216 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PointCollectionConverter.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs index 70afd84f212..727cb200ade 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegment.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegmentFigureLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegmentFigureLogic.cs index 3d201d3c7d4..47992fdf67a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegmentFigureLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyBezierSegmentFigureLogic.cs @@ -26,7 +26,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs index 78e47c703b8..a69b28b3269 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegment.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegmentFigureLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegmentFigureLogic.cs index b3520d0dd1a..42ddbf0f750 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegmentFigureLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyLineSegmentFigureLogic.cs @@ -26,7 +26,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs index a47f672fb40..2e4ac382a52 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegment.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegmentFigureLogic.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegmentFigureLogic.cs index 6ca1ac8db57..cc05b9274c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegmentFigureLogic.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PolyQuadraticBezierSegmentFigureLogic.cs @@ -26,7 +26,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs index d41e6aa4ba4..a2d58d593e9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/QuadraticBezierSegment.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs index b65f2ffe5cf..7fac94096a4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RadialGradientBrush.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs index 0ce9ae5570a..612bb4e35fa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RectangleGeometry.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderData.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderData.cs index 5c83c0bd2eb..16cf4d67b0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderData.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderData.cs @@ -25,7 +25,6 @@ using System.Windows.Media.Media3D; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Security; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderDataDrawingContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderDataDrawingContext.cs index a507cd0ed37..53f082da0de 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderDataDrawingContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderDataDrawingContext.cs @@ -25,7 +25,6 @@ using System.Windows.Media.Media3D; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Security; namespace System.Windows.Media @@ -1303,7 +1302,7 @@ public override void Pop( if (_stackDepth <= 0) { - throw new InvalidOperationException(SR.Get(SRID.DrawingContext_TooManyPops)); + throw new InvalidOperationException(SR.DrawingContext_TooManyPops); } #if DEBUG diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs index 49153831c1b..17b89b0bf11 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RotateTransform.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Rotation.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Rotation.cs index b4f1425e26f..ee17ea0774a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Rotation.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Rotation.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media.Imaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs index b83a7fa9797..4ac5d17741a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ScaleTransform.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs index 3229250d734..b90e90c1a2d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SkewTransform.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs index fa372a93063..b5f774453e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SolidColorBrush.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs index f55e1f4db05..d660147fce1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/StreamGeometry.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Stretch.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Stretch.cs index ce6ad8bac8f..bbacfe349d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Stretch.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Stretch.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SweepDirection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SweepDirection.cs index a7599e3a585..daaafbca4da 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SweepDirection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/SweepDirection.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs index 12df3023aa6..0f64e4ece3e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffect.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs index eed4df8bac3..e009569d775 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextEffectCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -145,7 +144,7 @@ public void Insert(int index, TextEffect value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -253,7 +252,7 @@ public TextEffect this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -426,7 +425,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -441,7 +440,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -533,7 +532,7 @@ private TextEffect Cast(object value) if (!(value is TextEffect)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextEffect")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextEffect")); } return (TextEffect) value; @@ -559,7 +558,7 @@ internal int AddWithoutFiringPublicEvents(TextEffect value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); TextEffect newValue = value; @@ -815,7 +814,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -833,7 +832,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -867,12 +866,12 @@ public TextEffect Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -950,7 +949,7 @@ public TextEffectCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } TextEffect newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -967,7 +966,7 @@ public TextEffectCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextHintingMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextHintingMode.cs index 2c4e0e759c9..f8925f1ec0f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextHintingMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextHintingMode.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextRenderingMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextRenderingMode.cs index d6955738d9d..4276fea5358 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextRenderingMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TextRenderingMode.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs index 363910c9402..5cb0e4d1a55 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileBrush.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileMode.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileMode.cs index d7efd3d0365..817b8bd2b0e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileMode.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TileMode.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ToleranceType.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ToleranceType.cs index 54a3bf48489..da4b3a4712c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ToleranceType.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ToleranceType.cs @@ -15,10 +15,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs index 53f86f02a6e..4338eb7dc38 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Transform.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs index d4b899882c1..d5ec1833085 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -157,7 +156,7 @@ public void Insert(int index, Transform value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -265,7 +264,7 @@ public Transform this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -440,7 +439,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -455,7 +454,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -547,7 +546,7 @@ private Transform Cast(object value) if (!(value is Transform)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform")); } return (Transform) value; @@ -573,7 +572,7 @@ internal int AddWithoutFiringPublicEvents(Transform value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); Transform newValue = value; @@ -856,7 +855,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -874,7 +873,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -908,12 +907,12 @@ public Transform Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -991,7 +990,7 @@ public TransformCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } Transform newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -1009,7 +1008,7 @@ public TransformCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformConverter.cs index 8a479e27b32..1db7c545e7b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformConverter.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -81,7 +80,7 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati { if (!(context.Instance is Transform)) { - throw new ArgumentException(SR.Get(SRID.General_Expected_Type, "Transform"), "context"); + throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Transform"), "context"); } Transform value = (Transform)context.Instance; @@ -154,7 +153,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul #pragma warning suppress 6506 // instance is obviously not null if (!instance.CanSerializeToString()) { - throw new NotSupportedException(SR.Get(SRID.Converter_ConvertToNotSupported)); + throw new NotSupportedException(SR.Converter_ConvertToNotSupported); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs index 06917c4a246..5bd76397aa5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TransformGroup.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs index dbe43ccfec2..c970a29a282 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/TranslateTransform.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs index f69cf52d1bb..0b69a4c3ff8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollection.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; @@ -390,7 +389,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -405,7 +404,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -481,7 +480,7 @@ private Vector Cast(object value) if (!(value is Vector)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector")); } return (Vector) value; @@ -838,7 +837,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -856,7 +855,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -890,12 +889,12 @@ public Vector Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollectionConverter.cs index 681c6ac56f3..4277cbee238 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VectorCollectionConverter.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs index b8f0175d290..79a7ac5027a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VideoDrawing.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs index 21f16e79294..1491a2e28fd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/VisualBrush.cs @@ -35,7 +35,6 @@ using System.Windows.Media.Converters; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; using WORD = System.UInt16; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Geometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Geometry.cs index f2709b69a4e..ececce5ba5d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Geometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Geometry.cs @@ -26,7 +26,6 @@ using System.Runtime.InteropServices; using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryGroup.cs index d71f4feb3b8..a186e2c4fd6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GeometryGroup.cs @@ -25,7 +25,6 @@ using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphCache.cs index 695ceba7cd6..76f0c3005cf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphCache.cs @@ -22,7 +22,6 @@ using MS.Internal.FontCache; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRun.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRun.cs index 71fa960f599..10d61960426 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRun.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphRun.cs @@ -40,7 +40,6 @@ using System.Security; using System.Windows.Interop; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -411,38 +410,38 @@ TextFormattingMode textFormattingMode else { if (clusterMap[i] < clusterMap[i - 1]) - throw new ArgumentException(SR.Get(SRID.ClusterMapEntriesShouldNotDecrease), "clusterMap"); + throw new ArgumentException(SR.ClusterMapEntriesShouldNotDecrease, "clusterMap"); if (clusterMap[i] >= GlyphCount) - throw new ArgumentException(SR.Get(SRID.ClusterMapEntryShouldPointWithinGlyphIndices), "clusterMap"); + throw new ArgumentException(SR.ClusterMapEntryShouldPointWithinGlyphIndices, "clusterMap"); } } } else { - throw new ArgumentException(SR.Get(SRID.ClusterMapFirstEntryMustBeZero), "clusterMap"); + throw new ArgumentException(SR.ClusterMapFirstEntryMustBeZero, "clusterMap"); } } else { - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsShouldBeEqualTo, characters.Count), "clusterMap"); + throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, characters.Count), "clusterMap"); } } else { if (GlyphCount != characters.Count) - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsShouldBeEqualTo, GlyphCount), "clusterMap"); + throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, GlyphCount), "clusterMap"); } } if (caretStops != null && caretStops.Count != 0) { if (caretStops.Count != CodepointCount + 1) - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsShouldBeEqualTo, CodepointCount + 1), "caretStops"); + throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, CodepointCount + 1), "caretStops"); } if (isSideways && (bidiLevel & 1) != 0) - throw new ArgumentException(SR.Get(SRID.SidewaysRTLTextIsNotSupported)); + throw new ArgumentException(SR.SidewaysRTLTextIsNotSupported); // NOTE: In previous versions this function would estimate the size // of this glyph run's bitmaps and compare it against the theoretical @@ -455,10 +454,10 @@ TextFormattingMode textFormattingMode else { if (double.IsNaN(renderingEmSize)) - throw new ArgumentOutOfRangeException("renderingEmSize", SR.Get(SRID.ParameterValueCannotBeNaN)); + throw new ArgumentOutOfRangeException("renderingEmSize", SR.ParameterValueCannotBeNaN); if (renderingEmSize < 0.0) - throw new ArgumentOutOfRangeException("renderingEmSize", SR.Get(SRID.ParameterValueCannotBeNegative)); + throw new ArgumentOutOfRangeException("renderingEmSize", SR.ParameterValueCannotBeNegative); if (glyphTypeface == null) throw new ArgumentNullException("glyphTypeface"); @@ -467,21 +466,21 @@ TextFormattingMode textFormattingMode throw new ArgumentNullException("glyphIndices"); if (glyphIndices.Count <= 0) - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsMustBeGreaterThanZero), "glyphIndices"); + throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, "glyphIndices"); if (glyphIndices.Count > MaxGlyphCount) { - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsMustBeLessOrEqualTo, MaxGlyphCount), "glyphIndices"); + throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsMustBeLessOrEqualTo, MaxGlyphCount), "glyphIndices"); } if (advanceWidths == null) throw new ArgumentNullException("advanceWidths"); if (advanceWidths.Count != glyphIndices.Count) - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), "advanceWidths"); + throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), "advanceWidths"); if (glyphOffsets != null && glyphOffsets.Count != 0 && glyphOffsets.Count != glyphIndices.Count) - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), "glyphOffsets"); + throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), "glyphOffsets"); // We should've caught all invalid cases above and thrown appropriate exceptions. Invariant.Assert(false); @@ -1123,7 +1122,7 @@ public IList GlyphIndices throw new ArgumentNullException("value"); if (value.Count <= 0) - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsMustBeGreaterThanZero), "value"); + throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, "value"); _glyphIndices = value; } @@ -1154,7 +1153,7 @@ public IList AdvanceWidths throw new ArgumentNullException("value"); if (value.Count <= 0) - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsMustBeGreaterThanZero), "value"); + throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, "value"); _advanceWidths = value; } @@ -2329,13 +2328,13 @@ void ISupportInitialize.BeginInit() if (IsInitialized) { // Cannot initialize a GlyphRun that is completely initialized. - throw new InvalidOperationException(SR.Get(SRID.OnlyOneInitialization)); + throw new InvalidOperationException(SR.OnlyOneInitialization); } if (IsInitializing) { // Cannot initialize a GlyphRun that is already being initialized. - throw new InvalidOperationException(SR.Get(SRID.InInitialization)); + throw new InvalidOperationException(SR.InInitialization); } IsInitializing = true; @@ -2346,7 +2345,7 @@ void ISupportInitialize.EndInit() if (!IsInitializing) { // Cannot EndInit a GlyphRun that is not being initialized. - throw new InvalidOperationException(SR.Get(SRID.NotInInitialization)); + throw new InvalidOperationException(SR.NotInInitialization); } // @@ -2382,7 +2381,7 @@ private void CheckInitialized() { if (!IsInitialized) { - throw new InvalidOperationException(SR.Get(SRID.InitializationIncomplete)); + throw new InvalidOperationException(SR.InitializationIncomplete); } // Ensure the bits are set consistently. The object cannot be in both states. @@ -2393,7 +2392,7 @@ private void CheckInitializing() { if (!IsInitializing) { - throw new InvalidOperationException(SR.Get(SRID.NotInInitialization)); + throw new InvalidOperationException(SR.NotInInitialization); } // Ensure the bits are set consistently. The object cannot be in both states. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphTypeface.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphTypeface.cs index b11bcc2447a..a043207ae92 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphTypeface.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/GlyphTypeface.cs @@ -123,7 +123,7 @@ private void Initialize(Uri typefaceSource, StyleSimulations styleSimulations) throw new ArgumentNullException("typefaceSource"); if (!typefaceSource.IsAbsoluteUri) - throw new ArgumentException(SR.Get(SRID.UriNotAbsolute), "typefaceSource"); + throw new ArgumentException(SR.UriNotAbsolute, "typefaceSource"); // remember the original Uri that contains face index _originalUri = new SecurityCriticalDataClass(typefaceSource); @@ -237,10 +237,10 @@ public byte[] ComputeSubset(ICollection glyphs) throw new ArgumentNullException("glyphs"); if (glyphs.Count <= 0) - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsMustBeGreaterThanZero), "glyphs"); + throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, "glyphs"); if (glyphs.Count > ushort.MaxValue) - throw new ArgumentException(SR.Get(SRID.CollectionNumberOfElementsMustBeLessOrEqualTo, ushort.MaxValue), "glyphs"); + throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsMustBeLessOrEqualTo, ushort.MaxValue), "glyphs"); UnmanagedMemoryStream pinnedFontSource = FontSource.GetUnmanagedStream(); @@ -303,7 +303,7 @@ public Uri FontUri throw new ArgumentNullException("value"); if (!value.IsAbsoluteUri) - throw new ArgumentException(SR.Get(SRID.UriNotAbsolute), "value"); + throw new ArgumentException(SR.UriNotAbsolute, "value"); _originalUri = new SecurityCriticalDataClass(value); } @@ -1071,7 +1071,7 @@ private unsafe MS.Internal.Text.TextInterface.GlyphMetrics GlyphMetrics(ushort try { if (glyphIndex >= fontFaceDWrite.GlyphCount) - throw new ArgumentOutOfRangeException("glyphIndex", SR.Get(SRID.GlyphIndexOutOfRange, glyphIndex)); + throw new ArgumentOutOfRangeException("glyphIndex", SR.Format(SR.GlyphIndexOutOfRange, glyphIndex)); glyphMetrics = new MS.Internal.Text.TextInterface.GlyphMetrics(); @@ -1660,13 +1660,13 @@ void ISupportInitialize.BeginInit() if (_initializationState == InitializationState.IsInitialized) { // Cannot initialize a GlyphRun this is completely initialized. - throw new InvalidOperationException(SR.Get(SRID.OnlyOneInitialization)); + throw new InvalidOperationException(SR.OnlyOneInitialization); } if (_initializationState == InitializationState.IsInitializing) { // Cannot initialize a GlyphRun this already being initialized. - throw new InvalidOperationException(SR.Get(SRID.InInitialization)); + throw new InvalidOperationException(SR.InInitialization); } _initializationState = InitializationState.IsInitializing; @@ -1677,7 +1677,7 @@ void ISupportInitialize.EndInit() if (_initializationState != InitializationState.IsInitializing) { // Cannot EndInit a GlyphRun that is not being initialized. - throw new InvalidOperationException(SR.Get(SRID.NotInInitialization)); + throw new InvalidOperationException(SR.NotInInitialization); } Initialize( @@ -1690,7 +1690,7 @@ private void CheckInitialized() { if (_initializationState != InitializationState.IsInitialized) { - throw new InvalidOperationException(SR.Get(SRID.InitializationIncomplete)); + throw new InvalidOperationException(SR.InitializationIncomplete); } } @@ -1698,7 +1698,7 @@ private void CheckInitializing() { if (_initializationState != InitializationState.IsInitializing) { - throw new InvalidOperationException(SR.Get(SRID.NotInInitialization)); + throw new InvalidOperationException(SR.NotInInitialization); } } @@ -1829,7 +1829,7 @@ public void CopyTo(KeyValuePair[] array, int arrayIndex) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // The extra "arrayIndex >= array.Length" check in because even if _collection.Count @@ -1918,7 +1918,7 @@ public void CopyTo(double[] array, int arrayIndex) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // The extra "arrayIndex >= array.Length" check in because even if _collection.Count diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HostVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HostVisual.cs index e271cbf8c53..283e33b893e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HostVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/HostVisual.cs @@ -24,7 +24,6 @@ namespace System.Windows.Media using System.Threading; using SR=MS.Internal.PresentationCore.SR; - using SRID=MS.Internal.PresentationCore.SRID; /// /// Host visual. @@ -161,7 +160,7 @@ internal void BeginHosting(VisualTarget target) if (_target != null) { throw new InvalidOperationException( - SR.Get(SRID.VisualTarget_AnotherTargetAlreadyConnected) + SR.VisualTarget_AnotherTargetAlreadyConnected ); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageBrush.cs index e5ad01b8f00..f9afb879802 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageBrush.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Imaging; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceConverter.cs index 990ed7127bc..5a8a8ae74cd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ImageSourceConverter.cs @@ -21,7 +21,6 @@ using System.Windows.Markup; using MMCF = System.IO.Packaging; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -69,7 +68,7 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati { if (!(context.Instance is ImageSource)) { - throw new ArgumentException(SR.Get(SRID.General_Expected_Type, "ImageSource"), "context"); + throw new ArgumentException(SR.Format(SR.General_Expected_Type, "ImageSource"), "context"); } #pragma warning suppress 6506 // context is obviously not null @@ -218,7 +217,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul #pragma warning disable 6506 if (!instance.CanSerializeToString()) { - throw new NotSupportedException(SR.Get(SRID.Converter_ConvertToNotSupported)); + throw new NotSupportedException(SR.Converter_ConvertToNotSupported); } #pragma warning restore 6506 } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs index e73f3dc439e..f0c39f38a64 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDecoder.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Imaging; using MS.Internal.PresentationCore; // SecurityHelper using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Net; using System.Net.Cache; using System.Text; @@ -115,7 +114,7 @@ out _safeFilehandle if (clsId != expectedClsId) { - throw new FileFormatException(bitmapUri, SR.Get(SRID.Image_CantDealWithUri)); + throw new FileFormatException(bitmapUri, SR.Image_CantDealWithUri); } _uri = bitmapUri; @@ -162,7 +161,7 @@ out _safeFilehandle if (clsId != Guid.Empty && clsId != expectedClsId) { - throw new FileFormatException(null, SR.Get(SRID.Image_CantDealWithStream)); + throw new FileFormatException(null, SR.Image_CantDealWithStream); } _stream = bitmapStream; @@ -1013,7 +1012,7 @@ internal void CheckOriginalWritable() { if (!_isOriginalWritable) { - throw new System.InvalidOperationException(SR.Get(SRID.Image_OriginalStreamReadOnly)); + throw new System.InvalidOperationException(SR.Image_OriginalStreamReadOnly); } } @@ -1563,7 +1562,7 @@ private static IntPtr GetIStreamFromStream(ref System.IO.Stream bitmapStream) if (comStream == IntPtr.Zero) { throw new System.InvalidOperationException( - SR.Get(SRID.Image_CantDealWithStream)); + SR.Image_CantDealWithStream); } // If the stream is not seekable, we must create a @@ -1582,7 +1581,7 @@ private static IntPtr GetIStreamFromStream(ref System.IO.Stream bitmapStream) else if (!seekable) { throw new System.InvalidOperationException( - SR.Get(SRID.Image_CantDealWithStream)); + SR.Image_CantDealWithStream); } } } @@ -1590,7 +1589,7 @@ private static IntPtr GetIStreamFromStream(ref System.IO.Stream bitmapStream) if (comStream == IntPtr.Zero) { throw new System.InvalidOperationException( - SR.Get(SRID.Image_CantDealWithStream)); + SR.Image_CantDealWithStream); } return comStream; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDownload.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDownload.cs index c973be56c8b..dc2a668f3d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDownload.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapDownload.cs @@ -28,7 +28,6 @@ using MS.Internal.AppModel; using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Net; using System.Net.Cache; using System.Text; @@ -171,7 +170,7 @@ Stream stream if (!passed) { - throw new IOException(SR.Get(SRID.Image_CannotCreateTempFile)); + throw new IOException(SR.Image_CannotCreateTempFile); } entry.readBuffer = new byte[READ_SIZE]; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapEncoder.cs index 9b54cdec530..4e9dab8da4c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapEncoder.cs @@ -22,7 +22,6 @@ using System.Security; using MS.Win32.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Diagnostics.CodeAnalysis; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings @@ -93,7 +92,7 @@ public static BitmapEncoder Create(Guid containerFormat) if (containerFormat == Guid.Empty) { throw new ArgumentException( - SR.Get(SRID.Image_GuidEmpty, "containerFormat"), + SR.Format(SR.Image_GuidEmpty, "containerFormat"), "containerFormat" ); } @@ -154,7 +153,7 @@ public virtual ReadOnlyCollection ColorContexts if (!_supportsColorContext) { - throw new InvalidOperationException(SR.Get(SRID.Image_EncoderNoColorContext)); + throw new InvalidOperationException(SR.Image_EncoderNoColorContext); } _readOnlycolorContexts = value; @@ -184,7 +183,7 @@ public virtual BitmapSource Thumbnail if (!_supportsGlobalThumbnail) { - throw new InvalidOperationException(SR.Get(SRID.Image_EncoderNoGlobalThumbnail)); + throw new InvalidOperationException(SR.Image_EncoderNoGlobalThumbnail); } _thumbnail = value; @@ -216,12 +215,12 @@ public virtual BitmapMetadata Metadata if (value.GuidFormat != ContainerFormat) { - throw new InvalidOperationException(SR.Get(SRID.Image_MetadataNotCompatible)); + throw new InvalidOperationException(SR.Image_MetadataNotCompatible); } if (!_supportsGlobalMetadata) { - throw new InvalidOperationException(SR.Get(SRID.Image_EncoderNoGlobalMetadata)); + throw new InvalidOperationException(SR.Image_EncoderNoGlobalMetadata); } _metadata = value; @@ -251,7 +250,7 @@ public virtual BitmapSource Preview if (!_supportsPreview) { - throw new InvalidOperationException(SR.Get(SRID.Image_EncoderNoPreview)); + throw new InvalidOperationException(SR.Image_EncoderNoPreview); } _preview = value; @@ -362,18 +361,18 @@ public virtual void Save(System.IO.Stream stream) if (_hasSaved) { - throw new InvalidOperationException(SR.Get(SRID.Image_OnlyOneSave)); + throw new InvalidOperationException(SR.Image_OnlyOneSave); } if (_frames == null) { - throw new System.NotSupportedException(SR.Get(SRID.Image_NoFrames, null)); + throw new System.NotSupportedException(SR.Format(SR.Image_NoFrames, null)); } int count = _frames.Count; if (count <= 0) { - throw new System.NotSupportedException(SR.Get(SRID.Image_NoFrames, null)); + throw new System.NotSupportedException(SR.Format(SR.Image_NoFrames, null)); } IntPtr comStream = IntPtr.Zero; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrame.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrame.cs index 285502cb60f..6f6be8adb71 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrame.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapFrame.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Imaging; using MS.Win32; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; using System.Windows.Markup; using System.Net.Cache; @@ -83,7 +82,7 @@ RequestCachePolicy uriCachePolicy if (decoder.Frames.Count == 0) { - throw new System.ArgumentException(SR.Get(SRID.Image_NoDecodeFrames), "uri"); + throw new System.ArgumentException(SR.Image_NoDecodeFrames, "uri"); } return decoder.Frames[0]; @@ -100,7 +99,7 @@ RequestCachePolicy uriCachePolicy if (decoder.Frames.Count == 0) { - throw new System.ArgumentException(SR.Get(SRID.Image_NoDecodeFrames), "stream"); + throw new System.ArgumentException(SR.Image_NoDecodeFrames, "stream"); } return decoder.Frames[0]; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapImage.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapImage.cs index eb4bbfdd31a..cc1fb673400 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapImage.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapImage.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Animation; using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Markup; using System.Net.Cache; @@ -94,7 +93,7 @@ public void EndInit() if (UriSource == null && StreamSource == null) { - throw new InvalidOperationException(SR.Get(SRID.Image_NeitherArgument, "UriSource", "StreamSource")); + throw new InvalidOperationException(SR.Format(SR.Image_NeitherArgument, "UriSource", "StreamSource")); } // If the Uri is relative, use delay creation as the BaseUri could be set at a later point @@ -155,7 +154,7 @@ public override ImageMetadata Metadata { get { - throw new System.NotSupportedException(SR.Get(SRID.Image_MetadataNotSupported)); + throw new System.NotSupportedException(SR.Image_MetadataNotSupported); } } @@ -388,7 +387,7 @@ internal override void FinalizeCreation() if (decoder.Frames.Count == 0) { - throw new System.ArgumentException(SR.Get(SRID.Image_NoDecodeFrames)); + throw new System.ArgumentException(SR.Image_NoDecodeFrames); } BitmapFrame frame = decoder.Frames[0]; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapInitialize.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapInitialize.cs index 316c0d19503..085bc4fe3d2 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapInitialize.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapInitialize.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Animation; using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -40,10 +39,10 @@ public BitmapInitialize() public void BeginInit() { if (IsInitAtLeastOnce) - throw new InvalidOperationException(SR.Get(SRID.Image_OnlyOneInit, null)); + throw new InvalidOperationException(SR.Format(SR.Image_OnlyOneInit, null)); if (IsInInit) - throw new InvalidOperationException(SR.Get(SRID.Image_InInitialize, null)); + throw new InvalidOperationException(SR.Format(SR.Image_InInitialize, null)); _inInit = true; } @@ -51,7 +50,7 @@ public void BeginInit() public void EndInit() { if (!IsInInit) - throw new InvalidOperationException(SR.Get(SRID.Image_EndInitWithoutBeginInit, null)); + throw new InvalidOperationException(SR.Format(SR.Image_EndInitWithoutBeginInit, null)); _inInit = false; _isInitialized = true; @@ -61,7 +60,7 @@ public void SetPrologue() { if (!IsInInit) { - throw new InvalidOperationException(SR.Get(SRID.Image_SetPropertyOutsideBeginEndInit, null)); + throw new InvalidOperationException(SR.Format(SR.Image_SetPropertyOutsideBeginEndInit, null)); } } @@ -84,10 +83,10 @@ public bool IsInitAtLeastOnce public void EnsureInitializedComplete() { if (IsInInit) - throw new InvalidOperationException(SR.Get(SRID.Image_InitializationIncomplete, null)); + throw new InvalidOperationException(SR.Format(SR.Image_InitializationIncomplete, null)); if (!IsInitAtLeastOnce) - throw new InvalidOperationException(SR.Get(SRID.Image_NotInitialized, null)); + throw new InvalidOperationException(SR.Format(SR.Image_NotInitialized, null)); } public void Reset() diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadata.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadata.cs index f5b1c1807e0..08bfb2c4562 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadata.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadata.cs @@ -1048,7 +1048,7 @@ public void SetQuery(String query, object value) if (_readOnly) { - throw new System.InvalidOperationException(SR.Get(SRID.Image_MetadataReadOnly)); + throw new System.InvalidOperationException(SR.Image_MetadataReadOnly); } // Store these for debugging stress failures. @@ -1176,7 +1176,7 @@ public void RemoveQuery(String query) if (_readOnly) { - throw new System.InvalidOperationException(SR.Get(SRID.Image_MetadataReadOnly)); + throw new System.InvalidOperationException(SR.Image_MetadataReadOnly); } EnsureBitmapMetadata(); @@ -1548,7 +1548,7 @@ private void EnsureBitmapMetadata() if (_metadataHandle == null) { - throw new System.InvalidOperationException(SR.Get(SRID.Image_MetadataInitializationIncomplete)); + throw new System.InvalidOperationException(SR.Image_MetadataInitializationIncomplete); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataEnumerator.cs index 8369b385d8c..b2780bec519 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapMetadataEnumerator.cs @@ -18,7 +18,6 @@ using MS.Win32.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -138,12 +137,12 @@ public String Current if (!_fStarted) { #pragma warning suppress 56503 // Suppress presharp warning: Follows a pattern similar to Nullable. - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { #pragma warning suppress 56503 // Suppress presharp warning: Follows a pattern similar to Nullable. - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalette.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalette.cs index 478c71d980f..c959f970cfb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalette.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapPalette.cs @@ -23,7 +23,6 @@ using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -55,7 +54,7 @@ public BitmapPalette(IList colors) if (count < 1 || count > 256) { - throw new InvalidOperationException(SR.Get(SRID.Image_PaletteZeroColors, null)); + throw new InvalidOperationException(SR.Format(SR.Image_PaletteZeroColors, null)); } Color[] colorArray = new Color[count]; @@ -136,7 +135,7 @@ internal BitmapPalette(WICPaletteType paletteType, break; default: - throw new System.ArgumentException(SR.Get(SRID.Image_PaletteFixedType, paletteType)); + throw new System.ArgumentException(SR.Format(SR.Image_PaletteFixedType, paletteType)); } _palette = CreateInternalPalette(); @@ -327,7 +326,7 @@ private void UpdateManaged() if (numColors < 1 || numColors > 256) { - throw new InvalidOperationException(SR.Get(SRID.Image_PaletteZeroColors, null)); + throw new InvalidOperationException(SR.Format(SR.Image_PaletteZeroColors, null)); } else { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSizeOptions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSizeOptions.cs index 3b39d9130bf..7f54f22a319 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSizeOptions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSizeOptions.cs @@ -16,7 +16,6 @@ using System.Globalization; using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -120,7 +119,7 @@ public static BitmapSizeOptions FromHeight(int pixelHeight) { if (pixelHeight <= 0) { - throw new System.ArgumentOutOfRangeException("pixelHeight", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new System.ArgumentOutOfRangeException("pixelHeight", SR.ParameterMustBeGreaterThanZero); } BitmapSizeOptions sizeOptions = new BitmapSizeOptions(); @@ -141,7 +140,7 @@ public static BitmapSizeOptions FromWidth(int pixelWidth) { if (pixelWidth <= 0) { - throw new System.ArgumentOutOfRangeException("pixelWidth", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new System.ArgumentOutOfRangeException("pixelWidth", SR.ParameterMustBeGreaterThanZero); } BitmapSizeOptions sizeOptions = new BitmapSizeOptions(); @@ -164,12 +163,12 @@ public static BitmapSizeOptions FromWidthAndHeight(int pixelWidth, int pixelHeig { if (pixelWidth <= 0) { - throw new System.ArgumentOutOfRangeException("pixelWidth", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new System.ArgumentOutOfRangeException("pixelWidth", SR.ParameterMustBeGreaterThanZero); } if (pixelHeight <= 0) { - throw new System.ArgumentOutOfRangeException("pixelHeight", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new System.ArgumentOutOfRangeException("pixelHeight", SR.ParameterMustBeGreaterThanZero); } BitmapSizeOptions sizeOptions = new BitmapSizeOptions(); @@ -197,7 +196,7 @@ public static BitmapSizeOptions FromRotation(Rotation rotation) case Rotation.Rotate270: break; default: - throw new ArgumentException(SR.Get(SRID.Image_SizeOptionsAngle), "rotation"); + throw new ArgumentException(SR.Image_SizeOptionsAngle, "rotation"); } BitmapSizeOptions sizeOptions = new BitmapSizeOptions(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSource.cs index 2e03153eeac..c95b64f60bd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapSource.cs @@ -24,7 +24,6 @@ using System.IO.Packaging; using UnsafeNativeMethods = MS.Win32.PresentationCore.UnsafeNativeMethods; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; // SecurityHelper namespace System.Windows.Media.Imaging @@ -659,7 +658,7 @@ unsafe internal void CriticalCopyPixels(Int32Rect sourceRect, Array pixels, int throw new System.ArgumentNullException("pixels"); if (pixels.Rank != 1) - throw new ArgumentException(SR.Get(SRID.Collection_BadRank), "pixels"); + throw new ArgumentException(SR.Collection_BadRank, "pixels"); if (offset < 0) { @@ -678,7 +677,7 @@ unsafe internal void CriticalCopyPixels(Int32Rect sourceRect, Array pixels, int elementSize = 8; if (elementSize == -1) - throw new ArgumentException(SR.Get(SRID.Image_InvalidArrayForPixel)); + throw new ArgumentException(SR.Image_InvalidArrayForPixel); int destBufferSize = checked(elementSize * (pixels.Length - offset)); @@ -733,7 +732,7 @@ internal void CriticalCopyPixels(Int32Rect sourceRect, IntPtr buffer, int buffer throw new ArgumentNullException("buffer"); if (stride <= 0) - throw new ArgumentOutOfRangeException("stride", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("stride", SR.ParameterMustBeGreaterThanZero); if (sourceRect.Width <= 0) sourceRect.Width = PixelWidth; @@ -742,18 +741,18 @@ internal void CriticalCopyPixels(Int32Rect sourceRect, IntPtr buffer, int buffer sourceRect.Height = PixelHeight; if (sourceRect.Width > PixelWidth) - throw new ArgumentOutOfRangeException("sourceRect.Width", SR.Get(SRID.ParameterCannotBeGreaterThan, PixelWidth)); + throw new ArgumentOutOfRangeException("sourceRect.Width", SR.Format(SR.ParameterCannotBeGreaterThan, PixelWidth)); if (sourceRect.Height > PixelHeight) - throw new ArgumentOutOfRangeException("sourceRect.Height", SR.Get(SRID.ParameterCannotBeGreaterThan, PixelHeight)); + throw new ArgumentOutOfRangeException("sourceRect.Height", SR.Format(SR.ParameterCannotBeGreaterThan, PixelHeight)); int minStride = checked(((sourceRect.Width * Format.BitsPerPixel) + 7) / 8); if (stride < minStride) - throw new ArgumentOutOfRangeException("stride", SR.Get(SRID.ParameterCannotBeLessThan, minStride)); + throw new ArgumentOutOfRangeException("stride", SR.Format(SR.ParameterCannotBeLessThan, minStride)); int minRequiredDestSize = checked((stride * (sourceRect.Height - 1)) + minStride); if (bufferSize < minRequiredDestSize) - throw new ArgumentOutOfRangeException("buffer", SR.Get(SRID.ParameterCannotBeLessThan, minRequiredDestSize)); + throw new ArgumentOutOfRangeException("buffer", SR.Format(SR.ParameterCannotBeLessThan, minRequiredDestSize)); lock (_syncObject) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapVisualManager.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapVisualManager.cs index 9b14c657f32..e8f0fcb9249 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapVisualManager.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/BitmapVisualManager.cs @@ -18,7 +18,6 @@ using System.Windows.Media; using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Win32.PresentationCore; namespace System.Windows.Media.Imaging @@ -47,7 +46,7 @@ public BitmapVisualManager(RenderTargetBitmap bitmapTarget) if (bitmapTarget.IsFrozen) { - throw new ArgumentException(SR.Get(SRID.Image_CantBeFrozen, null)); + throw new ArgumentException(SR.Format(SR.Image_CantBeFrozen, null)); } _bitmapTarget = bitmapTarget; @@ -87,7 +86,7 @@ internal void Render(Visual visual, Matrix worldTransform, Rect windowClip) // they subsequently try to render to the BitmapImage. if (_bitmapTarget.IsFrozen) { - throw new ArgumentException(SR.Get(SRID.Image_CantBeFrozen)); + throw new ArgumentException(SR.Image_CantBeFrozen); } int sizeX = _bitmapTarget.PixelWidth; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CachedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CachedBitmap.cs index 002de7d5226..88024c2ae66 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CachedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CachedBitmap.cs @@ -25,7 +25,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -142,7 +141,7 @@ int stride throw new System.ArgumentNullException ("pixels"); if (pixels.Rank != 1) - throw new ArgumentException (SR.Get (SRID.Collection_BadRank), "pixels"); + throw new ArgumentException(SR.Collection_BadRank, "pixels"); int elementSize = -1; @@ -156,7 +155,7 @@ int stride elementSize = 8; if (elementSize == -1) - throw new ArgumentException(SR.Get(SRID.Image_InvalidArrayForPixel)); + throw new ArgumentException(SR.Image_InvalidArrayForPixel); int destBufferSize = elementSize * pixels.Length; @@ -417,12 +416,12 @@ int stride ) { if (pixelFormat.Palettized == true && palette == null) - throw new InvalidOperationException(SR.Get(SRID.Image_IndexedPixelFormatRequiresPalette)); + throw new InvalidOperationException(SR.Image_IndexedPixelFormatRequiresPalette); if (pixelFormat.Format == PixelFormatEnum.Default && pixelFormat.Guid == WICPixelFormatGUIDs.WICPixelFormatDontCare) { throw new System.ArgumentException( - SR.Get(SRID.Effect_PixelFormat, pixelFormat), + SR.Format(SR.Effect_PixelFormat, pixelFormat), "pixelFormat" ); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ColorConvertedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ColorConvertedBitmap.cs index e0759d99343..1ae39129aec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ColorConvertedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ColorConvertedBitmap.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -165,7 +164,7 @@ internal override bool IsValidForFinalizeCreation(bool throwIfInvalid) { if (throwIfInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_NoArgument, "Source")); + throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source")); } return false; } @@ -174,7 +173,7 @@ internal override bool IsValidForFinalizeCreation(bool throwIfInvalid) { if (throwIfInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Color_NullColorContext)); + throw new InvalidOperationException(SR.Color_NullColorContext); } return false; } @@ -183,7 +182,7 @@ internal override bool IsValidForFinalizeCreation(bool throwIfInvalid) { if (throwIfInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_NoArgument, "DestinationColorContext")); + throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "DestinationColorContext")); } return false; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CroppedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CroppedBitmap.cs index af4cc6930ce..f86b620ac9e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CroppedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CroppedBitmap.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -178,7 +177,7 @@ internal override bool IsValidForFinalizeCreation(bool throwIfInvalid) { if (throwIfInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_NoArgument, "Source")); + throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source")); } return false; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/FormatConvertedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/FormatConvertedBitmap.cs index 652dfe1113a..5fe3dbe453d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/FormatConvertedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/FormatConvertedBitmap.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -58,7 +57,7 @@ public FormatConvertedBitmap(BitmapSource source, PixelFormat destinationFormat, } if (alphaThreshold < (double)(0.0) || alphaThreshold > (double)(100.0)) { - throw new ArgumentException(SR.Get(SRID.Image_AlphaThresholdOutOfRange)); + throw new ArgumentException(SR.Image_AlphaThresholdOutOfRange); } _bitmapInit.BeginInit(); @@ -193,7 +192,7 @@ internal override bool IsValidForFinalizeCreation(bool throwIfInvalid) { if (throwIfInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_NoArgument, "Source")); + throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source")); } return false; } @@ -203,7 +202,7 @@ internal override bool IsValidForFinalizeCreation(bool throwIfInvalid) { if (throwIfInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_IndexedPixelFormatRequiresPalette)); + throw new InvalidOperationException(SR.Image_IndexedPixelFormatRequiresPalette); } return false; } @@ -211,7 +210,7 @@ internal override bool IsValidForFinalizeCreation(bool throwIfInvalid) { if (throwIfInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_PaletteColorsDoNotMatchFormat)); + throw new InvalidOperationException(SR.Image_PaletteColorsDoNotMatchFormat); } return false; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ImagingCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ImagingCache.cs index 55d40149577..823fafefa5c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ImagingCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/ImagingCache.cs @@ -22,7 +22,6 @@ using System.Windows.Media.Imaging; using MS.Win32; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InplaceBitmapMetadataWriter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InplaceBitmapMetadataWriter.cs index 960d56183ef..114ab99eeba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InplaceBitmapMetadataWriter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InplaceBitmapMetadataWriter.cs @@ -146,7 +146,7 @@ public bool TrySave() /// The new Freezable. protected override Freezable CreateInstanceCore() { - throw new InvalidOperationException(SR.Get(SRID.Image_InplaceMetadataNoCopy)); + throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); } /// @@ -154,7 +154,7 @@ protected override Freezable CreateInstanceCore() /// protected override void CloneCore(Freezable sourceFreezable) { - throw new InvalidOperationException(SR.Get(SRID.Image_InplaceMetadataNoCopy)); + throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); } /// @@ -162,7 +162,7 @@ protected override void CloneCore(Freezable sourceFreezable) /// protected override void CloneCurrentValueCore(Freezable sourceFreezable) { - throw new InvalidOperationException(SR.Get(SRID.Image_InplaceMetadataNoCopy)); + throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); } /// @@ -170,7 +170,7 @@ protected override void CloneCurrentValueCore(Freezable sourceFreezable) /// protected override void GetAsFrozenCore(Freezable sourceFreezable) { - throw new InvalidOperationException(SR.Get(SRID.Image_InplaceMetadataNoCopy)); + throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); } /// @@ -178,7 +178,7 @@ protected override void GetAsFrozenCore(Freezable sourceFreezable) /// protected override void GetCurrentValueAsFrozenCore(Freezable sourceFreezable) { - throw new InvalidOperationException(SR.Get(SRID.Image_InplaceMetadataNoCopy)); + throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InteropBitmapSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InteropBitmapSource.cs index 2b33a553640..8b662538c75 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InteropBitmapSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/InteropBitmapSource.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Composition; using MS.Internal.PresentationCore; // SecurityHelper using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; namespace System.Windows.Interop @@ -129,12 +128,12 @@ internal InteropBitmap( _bitmapInit.BeginInit(); if (pixelWidth <= 0) { - throw new ArgumentOutOfRangeException("pixelWidth", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("pixelWidth", SR.ParameterMustBeGreaterThanZero); } if (pixelHeight <= 0) { - throw new ArgumentOutOfRangeException("pixelHeight", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("pixelHeight", SR.ParameterMustBeGreaterThanZero); } Guid formatGuid = format.Guid; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapEncoder.cs index 2bddf8c1382..80f6d375a37 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/JpegBitmapEncoder.cs @@ -20,7 +20,6 @@ using System.Windows.Media.Imaging; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -66,7 +65,7 @@ public int QualityLevel { if ((value < 1) || (value > 100)) { - throw new System.ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeBetween, 1, 100)); + throw new System.ArgumentOutOfRangeException("value", SR.Format(SR.ParameterMustBeBetween, 1, 100)); } _qualityLevel = value; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/LateBoundBitmapDecoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/LateBoundBitmapDecoder.cs index 6de09f2d0f9..63a2ff9718e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/LateBoundBitmapDecoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/LateBoundBitmapDecoder.cs @@ -27,7 +27,6 @@ using System.Windows.Media.Imaging; using MS.Internal.PresentationCore; // SecurityHelper using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Net; using System.Net.Cache; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PropVariant.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PropVariant.cs index 15a696c3c83..3c5748ba293 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PropVariant.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/PropVariant.cs @@ -124,7 +124,7 @@ int cbFrom { if (cbFrom>cbTo) { - throw new InvalidOperationException(SR.Get(SRID.Image_InsufficientBufferSize)); + throw new InvalidOperationException(SR.Image_InsufficientBufferSize); } byte* pCurFrom = (byte*)pbFrom; @@ -334,7 +334,7 @@ internal void Init(object value) } else { - throw new System.InvalidOperationException(SR.Get(SRID.Image_PropertyNotSupported)); + throw new System.InvalidOperationException(SR.Image_PropertyNotSupported); } } else @@ -445,7 +445,7 @@ internal void Init(object value) } else { - throw new System.InvalidOperationException(SR.Get(SRID.Image_PropertyNotSupported)); + throw new System.InvalidOperationException(SR.Image_PropertyNotSupported); } } } @@ -766,7 +766,7 @@ internal object ToObject(object syncObject) } } - throw new System.NotSupportedException(SR.Get(SRID.Image_PropertyNotSupported)); + throw new System.NotSupportedException(SR.Image_PropertyNotSupported); } internal bool RequiresSyncObject diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/RenderTargetBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/RenderTargetBitmap.cs index 6364c2e1dde..19def24cdac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/RenderTargetBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/RenderTargetBitmap.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -57,19 +56,19 @@ PixelFormat pixelFormat else if (pixelFormat.Format != PixelFormatEnum.Pbgra32) { throw new System.ArgumentException( - SR.Get(SRID.Effect_PixelFormat, pixelFormat), + SR.Format(SR.Effect_PixelFormat, pixelFormat), "pixelFormat" ); } if (pixelWidth <= 0) { - throw new ArgumentOutOfRangeException("pixelWidth", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("pixelWidth", SR.ParameterMustBeGreaterThanZero); } if (pixelHeight <= 0) { - throw new ArgumentOutOfRangeException("pixelHeight", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("pixelHeight", SR.ParameterMustBeGreaterThanZero); } if (dpiX < DoubleUtil.DBL_EPSILON) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TransformedBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TransformedBitmap.cs index edd37f6da19..4ba07d3983b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TransformedBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/TransformedBitmap.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -57,12 +56,12 @@ public TransformedBitmap(BitmapSource source, Transform newTransform) if (newTransform == null) { - throw new InvalidOperationException(SR.Get(SRID.Image_NoArgument, "Transform")); + throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Transform")); } if (!CheckTransform(newTransform)) { - throw new InvalidOperationException(SR.Get(SRID.Image_OnlyOrthogonal)); + throw new InvalidOperationException(SR.Image_OnlyOrthogonal); } _bitmapInit.BeginInit(); @@ -298,7 +297,7 @@ internal override bool IsValidForFinalizeCreation(bool throwIfInvalid) { if (throwIfInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_NoArgument, "Source")); + throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source")); } return false; } @@ -308,7 +307,7 @@ internal override bool IsValidForFinalizeCreation(bool throwIfInvalid) { if (throwIfInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_NoArgument, "Transform")); + throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Transform")); } return false; } @@ -317,7 +316,7 @@ internal override bool IsValidForFinalizeCreation(bool throwIfInvalid) { if (throwIfInvalid) { - throw new InvalidOperationException(SR.Get(SRID.Image_OnlyOrthogonal)); + throw new InvalidOperationException(SR.Image_OnlyOrthogonal); } return false; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnmanagedBitmapWrapper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnmanagedBitmapWrapper.cs index 65939675b11..1c24a767263 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnmanagedBitmapWrapper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/UnmanagedBitmapWrapper.cs @@ -25,7 +25,6 @@ using MS.Internal.PresentationCore; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapEncoder.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapEncoder.cs index f0257595fd6..511e7d3be79 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapEncoder.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WmpBitmapEncoder.cs @@ -20,7 +20,6 @@ using System.Windows.Media.Imaging; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Imaging { @@ -66,7 +65,7 @@ public float ImageQualityLevel { if ((value < 0.0) || (value > 1.0)) { - throw new System.ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeBetween, 0.0, 1.0)); + throw new System.ArgumentOutOfRangeException("value", SR.Format(SR.ParameterMustBeBetween, 0.0, 1.0)); } _imagequalitylevel= value; @@ -230,7 +229,7 @@ public byte QualityLevel { if ((value < 1) || (value > 255)) { - throw new System.ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeBetween, 1, 255)); + throw new System.ArgumentOutOfRangeException("value", SR.Format(SR.ParameterMustBeBetween, 1, 255)); } _qualitylevel = value; @@ -251,7 +250,7 @@ public byte SubsamplingLevel { if ((value < 0) || (value > 3)) { - throw new System.ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeBetween, 0, 3)); + throw new System.ArgumentOutOfRangeException("value", SR.Format(SR.ParameterMustBeBetween, 0, 3)); } _subsamplinglevel = value; @@ -272,7 +271,7 @@ public byte OverlapLevel { if ((value < 0) || (value > 2)) { - throw new System.ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeBetween, 0, 2)); + throw new System.ArgumentOutOfRangeException("value", SR.Format(SR.ParameterMustBeBetween, 0, 2)); } _overlaplevel = value; @@ -293,7 +292,7 @@ public short HorizontalTileSlices { if ((value < 0) || (value > 4096)) { - throw new System.ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeBetween, 0, 4096)); + throw new System.ArgumentOutOfRangeException("value", SR.Format(SR.ParameterMustBeBetween, 0, 4096)); } _horizontaltileslices = value; @@ -314,7 +313,7 @@ public short VerticalTileSlices { if ((value < 0) || (value > 4096)) { - throw new System.ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeBetween, 0, 4096)); + throw new System.ArgumentOutOfRangeException("value", SR.Format(SR.ParameterMustBeBetween, 0, 4096)); } _verticaltileslices = value; @@ -365,7 +364,7 @@ public byte AlphaQualityLevel { if ((value < 0) || (value > 255)) { - throw new System.ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeBetween, 0, 255)); + throw new System.ArgumentOutOfRangeException("value", SR.Format(SR.ParameterMustBeBetween, 0, 255)); } _alphaqualitylevel = value; @@ -401,7 +400,7 @@ public byte ImageDataDiscardLevel { if ((value < 0) || (value > 3)) { - throw new System.ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeBetween, 0, 3)); + throw new System.ArgumentOutOfRangeException("value", SR.Format(SR.ParameterMustBeBetween, 0, 3)); } _imagedatadiscardlevel = value; @@ -422,7 +421,7 @@ public byte AlphaDataDiscardLevel { if ((value < 0) || (value > 4)) { - throw new System.ArgumentOutOfRangeException("value", SR.Get(SRID.ParameterMustBeBetween, 0, 4)); + throw new System.ArgumentOutOfRangeException("value", SR.Format(SR.ParameterMustBeBetween, 0, 4)); } _alphadatadiscardlevel = value; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WriteableBitmap.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WriteableBitmap.cs index 7f8416ceb00..97053f108f3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WriteableBitmap.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/WriteableBitmap.cs @@ -23,7 +23,6 @@ using System.Windows.Media.Animation; using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; // SecurityHelper using System.Threading; @@ -87,13 +86,13 @@ BitmapPalette palette if (pixelFormat.Palettized && palette == null) { - throw new InvalidOperationException(SR.Get(SRID.Image_IndexedPixelFormatRequiresPalette)); + throw new InvalidOperationException(SR.Image_IndexedPixelFormatRequiresPalette); } if (pixelFormat.Format == PixelFormatEnum.Extended) { // We don't support third-party pixel formats yet. - throw new ArgumentException(SR.Get(SRID.Effect_PixelFormat), "pixelFormat"); + throw new ArgumentException(SR.Effect_PixelFormat, "pixelFormat"); } if (pixelWidth < 0) @@ -176,7 +175,7 @@ public void AddDirtyRect(Int32Rect dirtyRect) if (_lockCount == 0) { - throw new InvalidOperationException(SR.Get(SRID.Image_MustBeLocked)); + throw new InvalidOperationException(SR.Image_MustBeLocked); } // @@ -259,7 +258,7 @@ public bool TryLock(Duration timeout) if (_lockCount == UInt32.MaxValue) { - throw new InvalidOperationException(SR.Get(SRID.Image_LockCountLimit)); + throw new InvalidOperationException(SR.Image_LockCountLimit); } if (_lockCount == 0) @@ -323,7 +322,7 @@ public void Unlock() if (_lockCount == 0) { - throw new InvalidOperationException(SR.Get(SRID.Image_MustBeLocked)); + throw new InvalidOperationException(SR.Image_MustBeLocked); } Invariant.Assert(_lockCount > 0, "Lock count should never be negative!"); @@ -411,7 +410,7 @@ int destinationY // We accept arrays of arbitrary value types - but not reference types. if (elementType == null || !elementType.IsValueType) { - throw new ArgumentException(SR.Get(SRID.Image_InvalidArrayForPixel)); + throw new ArgumentException(SR.Image_InvalidArrayForPixel); } // Get the address of the data in the array by pinning it. @@ -454,12 +453,12 @@ int stride if (bufferSize < 1) { - throw new ArgumentOutOfRangeException("bufferSize", SR.Get(SRID.ParameterCannotBeLessThan, 1)); + throw new ArgumentOutOfRangeException("bufferSize", SR.Format(SR.ParameterCannotBeLessThan, 1)); } if (stride < 1) { - throw new ArgumentOutOfRangeException("stride", SR.Get(SRID.ParameterCannotBeLessThan, 1)); + throw new ArgumentOutOfRangeException("stride", SR.Format(SR.ParameterCannotBeLessThan, 1)); } if (sourceRect.IsEmpty || sourceRect.Width <= 0 || sourceRect.Height <= 0) @@ -521,18 +520,18 @@ int offset if (stride < 1) { - throw new ArgumentOutOfRangeException("stride", SR.Get(SRID.ParameterCannotBeLessThan, 1)); + throw new ArgumentOutOfRangeException("stride", SR.Format(SR.ParameterCannotBeLessThan, 1)); } if (offset < 0) { - throw new ArgumentOutOfRangeException("offset", SR.Get(SRID.ParameterCannotBeLessThan, 0)); + throw new ArgumentOutOfRangeException("offset", SR.Format(SR.ParameterCannotBeLessThan, 0)); } // We accept arrays of arbitrary value types - but not reference types. if (elementType == null || !elementType.IsValueType) { - throw new ArgumentException(SR.Get(SRID.Image_InvalidArrayForPixel)); + throw new ArgumentException(SR.Image_InvalidArrayForPixel); } checked @@ -847,19 +846,19 @@ bool backwardsCompat if (sourceRect.X < 0) { Debug.Assert(!backwardsCompat); - throw new ArgumentOutOfRangeException("sourceRect", SR.Get(SRID.ParameterCannotBeNegative)); + throw new ArgumentOutOfRangeException("sourceRect", SR.ParameterCannotBeNegative); } if (sourceRect.Y < 0) { Debug.Assert(!backwardsCompat); - throw new ArgumentOutOfRangeException("sourceRect", SR.Get(SRID.ParameterCannotBeNegative)); + throw new ArgumentOutOfRangeException("sourceRect", SR.ParameterCannotBeNegative); } if (sourceRect.Width < 0) { Debug.Assert(!backwardsCompat); - throw new ArgumentOutOfRangeException("sourceRect", SR.Get(SRID.ParameterMustBeBetween, 0, _pixelWidth)); + throw new ArgumentOutOfRangeException("sourceRect", SR.Format(SR.ParameterMustBeBetween, 0, _pixelWidth)); } if (sourceRect.Width > _pixelWidth) @@ -870,14 +869,14 @@ bool backwardsCompat } else { - throw new ArgumentOutOfRangeException("sourceRect", SR.Get(SRID.ParameterMustBeBetween, 0, _pixelWidth)); + throw new ArgumentOutOfRangeException("sourceRect", SR.Format(SR.ParameterMustBeBetween, 0, _pixelWidth)); } } if (sourceRect.Height < 0) { Debug.Assert(!backwardsCompat); - throw new ArgumentOutOfRangeException("sourceRect", SR.Get(SRID.ParameterMustBeBetween, 0, _pixelHeight)); + throw new ArgumentOutOfRangeException("sourceRect", SR.Format(SR.ParameterMustBeBetween, 0, _pixelHeight)); } if (sourceRect.Height > _pixelHeight) @@ -888,7 +887,7 @@ bool backwardsCompat } else { - throw new ArgumentOutOfRangeException("sourceRect", SR.Get(SRID.ParameterMustBeBetween, 0, _pixelHeight)); + throw new ArgumentOutOfRangeException("sourceRect", SR.Format(SR.ParameterMustBeBetween, 0, _pixelHeight)); } } @@ -900,7 +899,7 @@ bool backwardsCompat } else { - throw new ArgumentOutOfRangeException("sourceRect", SR.Get(SRID.ParameterCannotBeNegative)); + throw new ArgumentOutOfRangeException("sourceRect", SR.ParameterCannotBeNegative); } } @@ -912,7 +911,7 @@ bool backwardsCompat } else { - throw new ArgumentOutOfRangeException("destinationX", SR.Get(SRID.ParameterMustBeBetween, 0, _pixelWidth - sourceRect.Width)); + throw new ArgumentOutOfRangeException("destinationX", SR.Format(SR.ParameterMustBeBetween, 0, _pixelWidth - sourceRect.Width)); } } @@ -924,7 +923,7 @@ bool backwardsCompat } else { - throw new ArgumentOutOfRangeException("destinationY", SR.Get(SRID.ParameterMustBeBetween, 0, _pixelHeight - sourceRect.Height)); + throw new ArgumentOutOfRangeException("destinationY", SR.Format(SR.ParameterMustBeBetween, 0, _pixelHeight - sourceRect.Height)); } } @@ -936,7 +935,7 @@ bool backwardsCompat } else { - throw new ArgumentOutOfRangeException("destinationY", SR.Get(SRID.ParameterMustBeBetween, 0, _pixelHeight - sourceRect.Height)); + throw new ArgumentOutOfRangeException("destinationY", SR.Format(SR.ParameterMustBeBetween, 0, _pixelHeight - sourceRect.Height)); } } @@ -956,7 +955,7 @@ bool backwardsCompat if (sourceBufferStride < 1) { Debug.Assert(!backwardsCompat); - throw new ArgumentOutOfRangeException("sourceBufferStride", SR.Get(SRID.ParameterCannotBeLessThan, 1)); + throw new ArgumentOutOfRangeException("sourceBufferStride", SR.Format(SR.ParameterCannotBeLessThan, 1)); } if (sourceRect.Width == 0 || sourceRect.Height == 0) @@ -980,7 +979,7 @@ bool backwardsCompat } else { - throw new ArgumentException(SR.Get(SRID.Image_InsufficientBufferSize), "sourceBufferSize"); + throw new ArgumentException(SR.Image_InsufficientBufferSize, "sourceBufferSize"); } } @@ -1176,7 +1175,7 @@ private void ValidateArrayAndGetInfo(Array sourceBuffer, } else { - throw new ArgumentException(SR.Get(SRID.Image_InsufficientBuffer), "sourceBuffer"); + throw new ArgumentException(SR.Image_InsufficientBuffer, "sourceBuffer"); } } else @@ -1202,7 +1201,7 @@ private void ValidateArrayAndGetInfo(Array sourceBuffer, } else { - throw new ArgumentException(SR.Get(SRID.Image_InsufficientBuffer), "sourceBuffer"); + throw new ArgumentException(SR.Image_InsufficientBuffer, "sourceBuffer"); } } else @@ -1218,7 +1217,7 @@ private void ValidateArrayAndGetInfo(Array sourceBuffer, } else { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank), backwardsCompat ? "pixels" : "sourceBuffer"); + throw new ArgumentException(SR.Collection_BadRank, backwardsCompat ? "pixels" : "sourceBuffer"); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineGeometry.cs index 34c864211e5..e30c2833faa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineGeometry.cs @@ -22,7 +22,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineSegment.cs index 1e695727b24..f2e0c427f91 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LineSegment.cs @@ -22,7 +22,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LinearGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LinearGradientBrush.cs index db324faffce..a3e4d00da1f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LinearGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/LinearGradientBrush.cs @@ -24,7 +24,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixTransform.cs index d16ea8ea66a..d0de643ddff 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MatrixTransform.cs @@ -22,7 +22,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContext.cs index 54f51c0027d..c04d2ada659 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContext.cs @@ -33,7 +33,6 @@ using Microsoft.Win32.SafeHandles; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -427,7 +426,7 @@ private void NotifyBadPixelShader() // It's never correct to not have an event handler hooked up in // the case when an invalid shader is encountered. Raise an // exception directing the app to hook up an event handler. - throw new InvalidOperationException(SR.Get(SRID.MediaContext_NoBadShaderHandler)); + throw new InvalidOperationException(SR.MediaContext_NoBadShaderHandler); } } @@ -450,9 +449,9 @@ private void NotifyPartitionIsZombie(int failureCode) case HRESULT.E_OUTOFMEMORY: throw new System.OutOfMemoryException(); case HRESULT.D3DERR_OUTOFVIDEOMEMORY: - throw new System.OutOfMemoryException(SR.Get(SRID.MediaContext_OutOfVideoMemory)); + throw new System.OutOfMemoryException(SR.MediaContext_OutOfVideoMemory); default: - throw new System.InvalidOperationException(SR.Get(SRID.MediaContext_RenderThreadError)); + throw new System.InvalidOperationException(SR.MediaContext_RenderThreadError); } } @@ -1821,7 +1820,7 @@ private void RenderMessageHandlerCore( tickLoopCount++; if (tickLoopCount > 153) { - throw new InvalidOperationException(SR.Get(SRID.MediaContext_InfiniteTickLoop)); + throw new InvalidOperationException(SR.MediaContext_InfiniteTickLoop); } _timeManager.Tick(); @@ -1960,7 +1959,7 @@ private void FireInvokeOnRenderCallbacks() callbackLoopCount++; if (callbackLoopCount > 153) { - throw new InvalidOperationException(SR.Get(SRID.MediaContext_InfiniteLayoutLoop)); + throw new InvalidOperationException(SR.MediaContext_InfiniteLayoutLoop); } FrugalObjectList callbacks = _invokeOnRenderCallbacks; @@ -2333,7 +2332,7 @@ internal void VerifyWriteAccess() { if (!WriteAccessEnabled) { - throw new InvalidOperationException(SR.Get(SRID.MediaContext_APINotAllowed)); + throw new InvalidOperationException(SR.MediaContext_APINotAllowed); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContextNotificationWindow.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContextNotificationWindow.cs index 67fdc06451e..48ab426d965 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContextNotificationWindow.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaContextNotificationWindow.cs @@ -28,7 +28,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using DllImport=MS.Internal.PresentationCore.DllImport; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayer.cs index c6c5df2135f..167f17522ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayer.cs @@ -24,7 +24,6 @@ using System.Net; using Microsoft.Win32; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; // @@ -828,7 +827,7 @@ DUCE.Channel channel break; default: - throw new System.NotSupportedException(SR.Get(SRID.Media_UnknownChannelType)); + throw new System.NotSupportedException(SR.Media_UnknownChannelType); } // diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayerState.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayerState.cs index 820b3ee7522..a4e8c451732 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayerState.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaPlayerState.cs @@ -26,7 +26,6 @@ using System.Net; using Microsoft.Win32; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; // @@ -265,7 +264,7 @@ internal double Volume VerifyAPI(); if (Double.IsNaN(value)) { - throw new ArgumentException(SR.Get(SRID.ParameterValueCannotBeNaN), "value"); + throw new ArgumentException(SR.ParameterValueCannotBeNaN, "value"); } if (DoubleUtil.GreaterThanOrClose(value, 1)) @@ -315,7 +314,7 @@ internal double Balance VerifyAPI(); if (Double.IsNaN(value)) { - throw new ArgumentException(SR.Get(SRID.ParameterValueCannotBeNaN), "value"); + throw new ArgumentException(SR.ParameterValueCannotBeNaN, "value"); } if (DoubleUtil.GreaterThanOrClose(value, 1)) @@ -850,7 +849,7 @@ private void OpenMedia(Uri source) catch (InvalidOperationException) { source = null; - _mediaEventsHelper.RaiseMediaFailed(new System.NotSupportedException(SR.Get(SRID.Media_PackURIsAreNotSupported, null))); + _mediaEventsHelper.RaiseMediaFailed(new System.NotSupportedException(SR.Format(SR.Media_PackURIsAreNotSupported, null))); } } @@ -935,7 +934,7 @@ private double PrivateSpeedRatio if (Double.IsNaN(value)) { - throw new ArgumentException(SR.Get(SRID.ParameterValueCannotBeNaN), "value"); + throw new ArgumentException(SR.ParameterValueCannotBeNaN, "value"); } HRESULT.Check(MILMedia.SetRate(_nativeMedia, value)); @@ -1001,7 +1000,7 @@ private void VerifyAPI() if (_nativeMedia == null || _nativeMedia.IsInvalid) { - throw new System.NotSupportedException(SR.Get(SRID.Image_BadVersion)); + throw new System.NotSupportedException(SR.Image_BadVersion); } } @@ -1015,7 +1014,7 @@ private void VerifyAPI() { if (Clock != null) { - throw new InvalidOperationException(SR.Get(SRID.Media_NotAllowedWhileTimingEngineInControl)); + throw new InvalidOperationException(SR.Media_NotAllowedWhileTimingEngineInControl); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaSystem.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaSystem.cs index 3d769a48389..fe607d5ae59 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaSystem.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaSystem.cs @@ -24,7 +24,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods.MilCoreApi; using SafeNativeMethods=MS.Win32.PresentationCore.SafeNativeMethods; @@ -196,7 +195,7 @@ private static void ConnectTransport() { if (IsTransportConnected) { - throw new System.InvalidOperationException(SR.Get(SRID.MediaSystem_OutOfOrderConnectOrDisconnect)); + throw new System.InvalidOperationException(SR.MediaSystem_OutOfOrderConnectOrDisconnect); } // @@ -286,7 +285,7 @@ internal static void AssertSameContext( other.Dispatcher != null && reference.Dispatcher != other.Dispatcher) { - throw new ArgumentException(SR.Get(SRID.MediaSystem_ApiInvalidContext)); + throw new ArgumentException(SR.MediaSystem_ApiInvalidContext); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaTimeline.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaTimeline.cs index 119e06a8e1e..95934e40efe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaTimeline.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/MediaTimeline.cs @@ -20,7 +20,6 @@ using System.Collections.Generic; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -139,7 +138,7 @@ protected internal override Clock AllocateClock() { if (Source == null) { - throw new InvalidOperationException(SR.Get(SRID.Media_UriNotSpecified)); + throw new InvalidOperationException(SR.Media_UriNotSpecified); } MediaClock mediaClock = new MediaClock(this); @@ -260,7 +259,7 @@ protected override Duration GetNaturalDurationCore(Clock clock) public override string ToString() { if (null == Source) - throw new InvalidOperationException(SR.Get(SRID.Media_UriNotSpecified)); + throw new InvalidOperationException(SR.Media_UriNotSpecified); return Source.ToString(); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Parsers.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Parsers.cs index d707c758c1f..a3968f5c8c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Parsers.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Parsers.cs @@ -20,7 +20,6 @@ using System.Windows; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal { @@ -48,7 +47,7 @@ static private int ParseHexChar(char c ) { return (intChar-s_aUpper + 10); } - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); } static private Color ParseHexColor(string trimmedColor) @@ -100,7 +99,7 @@ static private Color ParseContextColor(string trimmedColor, IFormatProvider form { if (!trimmedColor.StartsWith(s_ContextColor, StringComparison.OrdinalIgnoreCase)) { - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); } string tokens = trimmedColor.Substring(s_ContextColor.Length); @@ -108,7 +107,7 @@ static private Color ParseContextColor(string trimmedColor, IFormatProvider form string[] preSplit = tokens.Split(' '); if (preSplit.GetLength(0)< 2) { - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); } tokens = tokens.Substring(preSplit[0].Length); @@ -146,7 +145,7 @@ static private Color ParseContextColor(string trimmedColor, IFormatProvider form // If the number of color values found does not match the number of channels in the profile, we must throw if (result.ColorContext.NumChannels != values.Length) { - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); } return result; @@ -156,7 +155,7 @@ static private Color ParseScRgbColor(string trimmedColor, IFormatProvider format { if (!trimmedColor.StartsWith("sc#", StringComparison.Ordinal)) { - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); } string tokens = trimmedColor.Substring(3, trimmedColor.Length - 3); @@ -177,7 +176,7 @@ static private Color ParseScRgbColor(string trimmedColor, IFormatProvider format // We should be out of tokens at this point if (th.NextToken()) { - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); } return Color.FromScRgb(values[0], values[1], values[2], values[3]); @@ -217,7 +216,7 @@ internal static Color ParseColor(string color, IFormatProvider formatProvider, I (isScRgbColor == false) && (isContextColor== false)) { - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); } //Is it a number? @@ -239,7 +238,7 @@ internal static Color ParseColor(string color, IFormatProvider formatProvider, I if (kc == KnownColor.UnknownColor) { - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); } return Color.FromUInt32((uint)kc); @@ -262,7 +261,7 @@ internal static Brush ParseBrush(string brush, IFormatProvider formatProvider, I if (trimmedColor.Length == 0) { - throw new FormatException(SR.Get(SRID.Parser_Empty)); + throw new FormatException(SR.Parser_Empty); } // Note that because trimmedColor is exactly brush.Trim() we don't have to worry about @@ -295,7 +294,7 @@ internal static Brush ParseBrush(string brush, IFormatProvider formatProvider, I } // If it's not a color, so the content is illegal. - throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); + throw new FormatException(SR.Parsers_IllegalToken); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigure.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigure.cs index 0afea3b88ee..9ee52833b52 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigure.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathFigure.cs @@ -23,7 +23,6 @@ using System.Windows.Markup; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -97,7 +96,7 @@ public PathFigure GetFlattenedPathFigure(double tolerance, ToleranceType type) } else { - throw new InvalidOperationException(SR.Get(SRID.PathGeometry_InternalReadBackError)); + throw new InvalidOperationException(SR.PathGeometry_InternalReadBackError); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathGeometry.cs index 51d0d42a6b6..f6c7b8a86ff 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathGeometry.cs @@ -30,7 +30,6 @@ using MS.Win32; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media @@ -496,7 +495,7 @@ internal unsafe void AddFigureToList(bool isFilled, bool isClosed, MilPoint2F* p { if (pointIndex+sameSegCount > pointCount) { - throw new System.InvalidOperationException(SR.Get(SRID.PathGeometry_InternalReadBackError)); + throw new System.InvalidOperationException(SR.PathGeometry_InternalReadBackError); } if (sameSegCount>1) @@ -527,7 +526,7 @@ internal unsafe void AddFigureToList(bool isFilled, bool isClosed, MilPoint2F* p if (pointIndex+pointBezierCount > pointCount) { - throw new System.InvalidOperationException(SR.Get(SRID.PathGeometry_InternalReadBackError)); + throw new System.InvalidOperationException(SR.PathGeometry_InternalReadBackError); } if (sameSegCount>1) @@ -560,7 +559,7 @@ internal unsafe void AddFigureToList(bool isFilled, bool isClosed, MilPoint2F* p } else { - throw new System.InvalidOperationException(SR.Get(SRID.PathGeometry_InternalReadBackError)); + throw new System.InvalidOperationException(SR.PathGeometry_InternalReadBackError); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathStreamGeometryContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathStreamGeometryContext.cs index 6f4e7c922c2..75f7f4e9d6e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathStreamGeometryContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PathStreamGeometryContext.cs @@ -25,7 +25,6 @@ using System.Windows.Media.Media3D; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Security; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormat.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormat.cs index c95cb70cca8..755a02d2cae 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormat.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormat.cs @@ -21,7 +21,6 @@ using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media @@ -337,7 +336,7 @@ internal PixelFormat(string pixelFormatString) break; default: - throw new System.ArgumentException (SR.Get(SRID.Image_BadPixelFormat, pixelFormatString), + throw new System.ArgumentException (SR.Format(SR.Image_BadPixelFormat, pixelFormatString), "pixelFormatString"); } @@ -431,7 +430,7 @@ static private Guid GetGuidFromFormat(PixelFormatEnum format) return WICPixelFormatGUIDs.WICPixelFormat32bppCMYK; } - throw new System.ArgumentException (SR.Get(SRID.Image_BadPixelFormat, format), "format"); + throw new System.ArgumentException (SR.Format(SR.Image_BadPixelFormat, format), "format"); } private PixelFormatFlags FormatFlags @@ -585,7 +584,7 @@ internal IntPtr CreatePixelFormatInfo() if (hr == (int)WinCodecErrors.WINCODEC_ERR_COMPONENTINITIALIZEFAILURE || hr == (int)WinCodecErrors.WINCODEC_ERR_COMPONENTNOTFOUND) { - throw new System.NotSupportedException(SR.Get(SRID.Image_NoPixelFormatFound)); + throw new System.NotSupportedException(SR.Image_NoPixelFormatFound); } HRESULT.Check(hr); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormatConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormatConverter.cs index 7136f6dfbab..ce1da2960d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormatConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PixelFormatConverter.cs @@ -20,7 +20,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -113,7 +112,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul if (!(value is PixelFormat)) { - throw new ArgumentException(SR.Get(SRID.General_Expected_Type,"PixelFormat")); + throw new ArgumentException(SR.Format(SR.General_Expected_Type,"PixelFormat")); } if (destinationType == typeof(InstanceDescriptor)) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyBezierSegment.cs index 93577a6b95f..8a4513c2b07 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyBezierSegment.cs @@ -22,7 +22,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyLineSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyLineSegment.cs index 91fa6a2a9ed..4c4452d32b1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyLineSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyLineSegment.cs @@ -22,7 +22,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyQuadraticBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyQuadraticBezierSegment.cs index f05093da33e..2d85067649c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyQuadraticBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/PolyQuadraticBezierSegment.cs @@ -22,7 +22,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/QuadraticBezierSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/QuadraticBezierSegment.cs index 94b6412c929..5e86d38dce9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/QuadraticBezierSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/QuadraticBezierSegment.cs @@ -22,7 +22,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RadialGradientBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RadialGradientBrush.cs index 84439f72416..abe3fa8bda6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RadialGradientBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RadialGradientBrush.cs @@ -24,7 +24,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RectangleGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RectangleGeometry.cs index 2a06a8fc037..5d0daeb910b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RectangleGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RectangleGeometry.cs @@ -21,7 +21,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RequestCachePolicyConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RequestCachePolicyConverter.cs index 944ecb84a6f..787229272d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RequestCachePolicyConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RequestCachePolicyConverter.cs @@ -19,7 +19,6 @@ using System.Net.Cache; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -83,7 +82,7 @@ public override object ConvertFrom(ITypeDescriptorContext td, System.Globalizati if (null == s) { - throw new ArgumentException(SR.Get(SRID.General_BadType, "ConvertFrom"), "value"); + throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value"); } HttpRequestCacheLevel level = (HttpRequestCacheLevel)Enum.Parse(typeof(HttpRequestCacheLevel), s, true); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RotateTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RotateTransform.cs index 787425b991f..f5530b96d92 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RotateTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/RotateTransform.cs @@ -21,7 +21,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ScaleTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ScaleTransform.cs index 10c266b3918..830ad3abcbe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ScaleTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/ScaleTransform.cs @@ -22,7 +22,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SkewTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SkewTransform.cs index 701fa1eaf4b..b68954c50a3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SkewTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SkewTransform.cs @@ -21,7 +21,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SolidColorBrush.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SolidColorBrush.cs index d16cf604609..4a2c8ec165c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SolidColorBrush.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/SolidColorBrush.cs @@ -28,7 +28,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -184,7 +183,7 @@ internal static object DeserializeFrom(BinaryReader reader, ITypeDescriptorConte } else { - throw new Exception(SR.Get(SRID.BrushUnknownBamlType)); + throw new Exception(SR.BrushUnknownBamlType); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamAsIStream.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamAsIStream.cs index 420c0b65ece..a1e0e9ddfec 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamAsIStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamAsIStream.cs @@ -17,7 +17,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; @@ -564,7 +563,7 @@ private void Verify() { if (this.dataStream == null) { - throw new System.ObjectDisposedException(SR.Get(SRID.Media_StreamClosed)); + throw new System.ObjectDisposedException(SR.Media_StreamClosed); } } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometry.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometry.cs index 9c816371464..72efbe652be 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometry.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometry.cs @@ -30,7 +30,6 @@ using MS.Win32; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometryContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometryContext.cs index de47ec93225..e3f5fd66f89 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometryContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/StreamGeometryContext.cs @@ -27,7 +27,6 @@ using System.Windows.Media.Media3D; using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffect.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffect.cs index f7c465580b8..4ca8591d59c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffect.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TextEffect.cs @@ -21,7 +21,6 @@ using System.ComponentModel; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { @@ -54,7 +53,7 @@ int positionCount { if (positionCount < 0) { - throw new ArgumentOutOfRangeException("positionCount", SR.Get(SRID.ParameterCannotBeNegative)); + throw new ArgumentOutOfRangeException("positionCount", SR.ParameterCannotBeNegative); } Transform = transform; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TransformGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TransformGroup.cs index c5af9d9ab2d..411c8faf5af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TransformGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TransformGroup.cs @@ -22,7 +22,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TranslateTransform.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TranslateTransform.cs index f51d17fa7e4..3f8cf0551c3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TranslateTransform.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/TranslateTransform.cs @@ -22,7 +22,6 @@ using System.Windows.Media.Composition; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Visual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Visual.cs index b752c4a57e9..c341fa1e510 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Visual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Visual.cs @@ -31,7 +31,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; //------------------------------------------------------------------------------ // This section lists various things that we could improve on the Visual class. @@ -2546,7 +2545,7 @@ internal bool HasVisualChildren /// protected virtual Visual GetVisualChild(int index) { - throw new ArgumentOutOfRangeException("index", index, SR.Get(SRID.Visual_ArgumentOutOfRange)); + throw new ArgumentOutOfRangeException("index", index, SR.Visual_ArgumentOutOfRange); } /// @@ -2611,7 +2610,7 @@ protected void AddVisualChild(Visual child) if (child._parent != null) { - throw new ArgumentException(SR.Get(SRID.Visual_HasParent)); + throw new ArgumentException(SR.Visual_HasParent); } // invalid during a VisualTreeChanged event @@ -2680,7 +2679,7 @@ protected void RemoveVisualChild(Visual child) if (child._parent != this) { - throw new ArgumentException(SR.Get(SRID.Visual_NotChild)); + throw new ArgumentException(SR.Visual_NotChild); } // invalid during a VisualTreeChanged event @@ -2766,7 +2765,7 @@ internal uint TreeLevel { if(value > TreeLevelLimit) { - throw new InvalidOperationException(SR.Get(SRID.LayoutManager_DeepRecursion, TreeLevelLimit)); + throw new InvalidOperationException(SR.Format(SR.LayoutManager_DeepRecursion, TreeLevelLimit)); } _flags = (VisualFlags)(((uint)_flags & 0x001FFFFF) | (value << 21)); @@ -2913,7 +2912,7 @@ protected set { // If a BitmapEffect is set, the user cannot set an Effect, since // mixing of legacy BitmapEffects is not allowed with Effects. - throw new Exception(SR.Get(SRID.Effect_CombinedLegacyAndNew)); + throw new Exception(SR.Effect_CombinedLegacyAndNew); } else { @@ -3045,7 +3044,7 @@ protected set // If no BitmapEffect is set and an Effect is set, the Effect has been // provided by the user and not by emulation. Since mixing of legacy // BitmapEffects is not allowed with Effects, setting a BitmapEffect is illegal. - throw new Exception(SR.Get(SRID.Effect_CombinedLegacyAndNew)); + throw new Exception(SR.Effect_CombinedLegacyAndNew); } else { @@ -3142,7 +3141,7 @@ protected set // If no BitmapEffect is set and an Effect is set, the Effect has been // provided by the user. Since mixing of legacy BitmapEffects is not allowed with // Effects, setting a BitmapEffect is illegal. - throw new Exception(SR.Get(SRID.Effect_CombinedLegacyAndNew)); + throw new Exception(SR.Effect_CombinedLegacyAndNew); } else { @@ -4414,7 +4413,7 @@ public GeneralTransform TransformToVisual(Visual visual) if (ancestorAsVisual == null) { - throw new System.InvalidOperationException(SR.Get(SRID.Visual_NoCommonAncestor)); + throw new System.InvalidOperationException(SR.Visual_NoCommonAncestor); } GeneralTransform g0; @@ -4623,7 +4622,7 @@ internal bool TrySimpleTransformToAncestor(Visual ancestor, if (g != ancestor) { - throw new System.InvalidOperationException(SR.Get(inverse ? SRID.Visual_NotADescendant : SRID.Visual_NotAnAncestor)); + throw new System.InvalidOperationException(inverse ? SR.Visual_NotADescendant : SR.Visual_NotAnAncestor); } // At this point, we will have 0 or more transforms in the GeneralTransformGroup @@ -4719,7 +4718,7 @@ internal bool TrySimpleTransformToAncestor(Visual3D ancestor, // if containingVisual3D is null then ancestor is not the ancestor if (containingVisual3D == null) { - throw new System.InvalidOperationException(SR.Get(SRID.Visual_NotAnAncestor)); + throw new System.InvalidOperationException(SR.Visual_NotAnAncestor); } GeneralTransform transform2D = this.TransformToAncestor(containingVisual3D.Visual); @@ -4776,14 +4775,14 @@ public Point PointToScreen(Point point) if (inputSource == null) { - throw new InvalidOperationException(SR.Get(SRID.Visual_NoPresentationSource)); + throw new InvalidOperationException(SR.Visual_NoPresentationSource); } // Translate the point from the visual to the root. GeneralTransform gUp = this.TransformToAncestor(inputSource.RootVisual); if (gUp == null || !gUp.TryTransform(point, out point)) { - throw new InvalidOperationException(SR.Get(SRID.Visual_CannotTransformPoint)); + throw new InvalidOperationException(SR.Visual_CannotTransformPoint); } // Translate the point from the root to the screen @@ -4805,7 +4804,7 @@ public Point PointFromScreen(Point point) if (inputSource == null) { - throw new InvalidOperationException(SR.Get(SRID.Visual_NoPresentationSource)); + throw new InvalidOperationException(SR.Visual_NoPresentationSource); } // Translate the point from the screen to the root @@ -4816,7 +4815,7 @@ public Point PointFromScreen(Point point) GeneralTransform gDown = inputSource.RootVisual.TransformToDescendant(this); if (gDown == null || !gDown.TryTransform(point, out point)) { - throw new InvalidOperationException(SR.Get(SRID.Visual_CannotTransformPoint)); + throw new InvalidOperationException(SR.Visual_CannotTransformPoint); } return point; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualCollection.cs index ed51b482335..7b5031abe3e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualCollection.cs @@ -22,7 +22,6 @@ using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; //------------------------------------------------------------------------------ // - There is an exception thrown inside of ConnectChild which could render @@ -119,7 +118,7 @@ internal void VerifyNotReadOnly() { if (IsReadOnlyInternal) { - throw new InvalidOperationException(SR.Get(SRID.VisualCollection_ReadOnly)); + throw new InvalidOperationException(SR.VisualCollection_ReadOnly); } } @@ -198,7 +197,7 @@ public void CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } if ((index < 0) || @@ -279,7 +278,7 @@ internal int InternalCapacity { if (value < _size) { - throw new ArgumentOutOfRangeException(nameof(value), SR.Get(SRID.VisualCollection_NotEnoughCapacity)); + throw new ArgumentOutOfRangeException(nameof(value), SR.VisualCollection_NotEnoughCapacity); } if (value > 0) { @@ -373,12 +372,12 @@ public Visual this[int index] { if (child != null) { - throw new System.ArgumentException(SR.Get(SRID.VisualCollection_EntryInUse)); + throw new System.ArgumentException(SR.VisualCollection_EntryInUse); } if ((value._parent != null) // Only a visual that isn't a visual parent or || value.IsRootElement) // are a root node of a visual target can be set into the collection. { - throw new System.ArgumentException(SR.Get(SRID.VisualCollection_VisualHasParent)); + throw new System.ArgumentException(SR.VisualCollection_VisualHasParent); } ConnectChild(index, value); @@ -411,7 +410,7 @@ private void ConnectChild(int index, Visual value) // might be iterating during a property invalidation tree walk. if (_owner.IsVisualChildrenIterationInProgress) { - throw new InvalidOperationException(SR.Get(SRID.CannotModifyVisualChildrenDuringTreeWalk)); + throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); } Debug.Assert(value != null); @@ -451,7 +450,7 @@ private void DisconnectChild(int index) // might be iterating during a property invalidation tree walk. if (oldParent.IsVisualChildrenIterationInProgress) { - throw new InvalidOperationException(SR.Get(SRID.CannotModifyVisualChildrenDuringTreeWalk)); + throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); } _items[index] = null; @@ -479,7 +478,7 @@ public int Add(Visual visual) ((visual._parent != null) // Only visuals that are not connected to another tree || visual.IsRootElement)) // or a visual target can be added. { - throw new System.ArgumentException(SR.Get(SRID.VisualCollection_VisualHasParent)); + throw new System.ArgumentException(SR.VisualCollection_VisualHasParent); } @@ -728,7 +727,7 @@ public void Insert(int index, Visual visual) ((visual._parent != null) // Only visuals that are not connected to another tree || visual.IsRootElement)) // or a visual target can be added. { - throw new System.ArgumentException(SR.Get(SRID.VisualCollection_VisualHasParent)); + throw new System.ArgumentException(SR.VisualCollection_VisualHasParent); } if ((_items == null) || (_size == _items.Length)) @@ -984,7 +983,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -1016,13 +1015,13 @@ public Visual Current if (_index == -1) { // Not started. - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { // Reached the end. Debug.Assert(_index == -2); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } return _currentElement; @@ -1040,7 +1039,7 @@ public void Reset() _collection.VerifyAPIReadOnly(); if (_version != _collection.Version) - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); _index = -1; // not started. } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTarget.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTarget.cs index 5c03b926b59..82d30668f34 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTarget.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTarget.cs @@ -14,7 +14,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTreeHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTreeHelper.cs index a9356fdfe5f..a81bfaca114 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTreeHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/VisualTreeHelper.cs @@ -18,7 +18,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaclock.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaclock.cs index 94672f5f6dd..1146c970713 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaclock.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaclock.cs @@ -22,7 +22,6 @@ using System.IO; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using UnsafeNativeMethods=MS.Win32.PresentationCore.UnsafeNativeMethods; namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventshelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventshelper.cs index 4e11f6c7148..a783a8627d0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventshelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/mediaeventshelper.cs @@ -20,7 +20,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/printcontext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/printcontext.cs index 5b5eb67aa10..b430355d9b9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/printcontext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/printcontext.cs @@ -492,7 +492,7 @@ static private void AssertPositive(int val, string name) { if (val <= 0) { - throw new ArgumentOutOfRangeException(name, SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException(name, SR.ParameterMustBeGreaterThanZero); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterBufferReference.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterBufferReference.cs index 9aa88ea1b8c..73c276cca2a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterBufferReference.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterBufferReference.cs @@ -17,7 +17,6 @@ using MS.Internal; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { @@ -87,7 +86,7 @@ int offsetToFirstChar { if (offsetToFirstChar < 0) { - throw new ArgumentOutOfRangeException("offsetToFirstChar", SR.Get(SRID.ParameterCannotBeNegative)); + throw new ArgumentOutOfRangeException("offsetToFirstChar", SR.ParameterCannotBeNegative); } // maximum offset is one less than CharacterBuffer.Count, except that zero is always a valid offset @@ -95,7 +94,7 @@ int offsetToFirstChar int maxOffset = (charBuffer == null) ? 0 : Math.Max(0, charBuffer.Count - 1); if (offsetToFirstChar > maxOffset) { - throw new ArgumentOutOfRangeException("offsetToFirstChar", SR.Get(SRID.ParameterCannotBeGreaterThan, maxOffset)); + throw new ArgumentOutOfRangeException("offsetToFirstChar", SR.Format(SR.ParameterCannotBeGreaterThan, maxOffset)); } _charBuffer = charBuffer; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterString.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterString.cs index 77649e9829f..5e823504761 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterString.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CharacterString.cs @@ -17,7 +17,6 @@ using System.Security; using MS.Internal; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting @@ -98,7 +97,7 @@ int characterLength { if (characterLength < 0) { - throw new ArgumentOutOfRangeException("characterLength", SR.Get(SRID.ParameterCannotBeNegative)); + throw new ArgumentOutOfRangeException("characterLength", SR.ParameterCannotBeNegative); } int maxLength = (characterBufferReference.CharacterBuffer != null) ? @@ -107,7 +106,7 @@ int characterLength if (characterLength > maxLength) { - throw new ArgumentOutOfRangeException("characterLength", SR.Get(SRID.ParameterCannotBeGreaterThan, maxLength)); + throw new ArgumentOutOfRangeException("characterLength", SR.Format(SR.ParameterCannotBeGreaterThan, maxLength)); } _charBufferRef = characterBufferReference; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CultureSpecificCharacterBufferRange.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CultureSpecificCharacterBufferRange.cs index f43d5db27ee..cde95d10861 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CultureSpecificCharacterBufferRange.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/CultureSpecificCharacterBufferRange.cs @@ -12,7 +12,6 @@ using System.Windows.Media.TextFormatting; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/NumberSubstitution.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/NumberSubstitution.cs index f782687c43d..27a5a8b521d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/NumberSubstitution.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/NumberSubstitution.cs @@ -19,7 +19,6 @@ using MS.Internal.FontCache; // for HashFn using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; // Allow suppression of presharp warnings #pragma warning disable 1634, 1691 @@ -99,7 +98,7 @@ private static CultureInfo ThrowIfInvalidCultureOverride(CultureInfo culture) { if (!IsValidCultureOverride(culture)) { - throw new ArgumentException(SR.Get(SRID.SpecificNumberCultureRequired)); + throw new ArgumentException(SR.SpecificNumberCultureRequired); } return culture; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCharacters.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCharacters.cs index abe05cd1cab..906c36458b4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCharacters.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextCharacters.cs @@ -24,7 +24,6 @@ using MS.Internal.TextFormatting; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { @@ -119,7 +118,7 @@ TextRunProperties textRunProperties { if (length <= 0) { - throw new ArgumentOutOfRangeException("length", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("length", SR.ParameterMustBeGreaterThanZero); } if (textRunProperties == null) @@ -139,7 +138,7 @@ TextRunProperties textRunProperties if (textRunProperties.FontRenderingEmSize <= 0) { - throw new ArgumentOutOfRangeException("textRunProperties.FontRenderingEmSize", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("textRunProperties.FontRenderingEmSize", SR.ParameterMustBeGreaterThanZero); } _characterBufferReference = characterBufferReference; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfLine.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfLine.cs index d8e77d4a100..d7ce8736e23 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfLine.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfLine.cs @@ -17,7 +17,6 @@ using System.Windows; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { @@ -50,7 +49,7 @@ TextRunProperties textRunProperties ) { if (length <= 0) - throw new ArgumentOutOfRangeException("length", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("length", SR.ParameterMustBeGreaterThanZero); if (textRunProperties != null && textRunProperties.Typeface == null) throw new ArgumentNullException("textRunProperties.Typeface"); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfSegment.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfSegment.cs index 2b45adb86cc..da2b36065ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfSegment.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextEndOfSegment.cs @@ -18,7 +18,6 @@ using System.Windows.Media; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { @@ -39,7 +38,7 @@ public class TextEndOfSegment : TextRun public TextEndOfSegment(int length) { if (length <= 0) - throw new ArgumentOutOfRangeException("length", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("length", SR.ParameterMustBeGreaterThanZero); _length = length; } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatter.cs index f732c25d926..282cb65fd23 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatter.cs @@ -126,7 +126,7 @@ static internal TextFormatter FromCurrentDispatcher(TextFormattingMode textForma Dispatcher dispatcher = Dispatcher.CurrentDispatcher; if (dispatcher == null) - throw new ArgumentException(SR.Get(SRID.CurrentDispatcherNotFound)); + throw new ArgumentException(SR.CurrentDispatcherNotFound); TextFormatter defaultTextFormatter; if (textFormattingMode == TextFormattingMode.Display) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatterContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatterContext.cs index 4acb709fece..a70a3584210 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatterContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextFormatterContext.cs @@ -28,7 +28,6 @@ using IndexedGlyphRun = System.Windows.Media.TextFormatting.IndexedGlyphRun; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting @@ -146,7 +145,7 @@ out ploc if (lserr != LsErr.None) { - ThrowExceptionFromLsError(SR.Get(SRID.CreateContextFailure, lserr), lserr); + ThrowExceptionFromLsError(SR.Format(SR.CreateContextFailure, lserr), lserr); } if (_specialCharacters == null) @@ -286,7 +285,7 @@ internal void SetBreaking(BreakStrategies breaking) if (lserr != LsErr.None) { - ThrowExceptionFromLsError(SR.Get(SRID.SetBreakingFailure, lserr), lserr); + ThrowExceptionFromLsError(SR.Format(SR.SetBreakingFailure, lserr), lserr); } _breaking = breaking; @@ -388,7 +387,7 @@ ref deviceInfo if(lserr != LsErr.None) { - ThrowExceptionFromLsError(SR.Get(SRID.SetDocFailure, lserr), lserr); + ThrowExceptionFromLsError(SR.Format(SR.SetDocFailure, lserr), lserr); } } @@ -408,7 +407,7 @@ int tabStopCount if(lserr != LsErr.None) { - ThrowExceptionFromLsError(SR.Get(SRID.SetTabsFailure, lserr), lserr); + ThrowExceptionFromLsError(SR.Format(SR.SetTabsFailure, lserr), lserr); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextHidden.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextHidden.cs index c6a618a2d10..be5399bfe24 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextHidden.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextHidden.cs @@ -17,7 +17,6 @@ using System.Windows; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { @@ -41,7 +40,7 @@ int length { if (length <= 0) { - throw new ArgumentOutOfRangeException("length", SR.Get(SRID.ParameterMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("length", SR.ParameterMustBeGreaterThanZero); } _length = length; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLineBreak.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLineBreak.cs index 84d4e030a61..d9b6098b5ff 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLineBreak.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextLineBreak.cs @@ -23,7 +23,6 @@ using MS.Internal.TextFormatting; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting @@ -93,7 +92,7 @@ public TextLineBreak Clone() if (lserr != LsErr.None) { - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.CloneBreakRecordFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.CloneBreakRecordFailure, lserr), lserr); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphCache.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphCache.cs index c02abdd3f3b..2f51438c565 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphCache.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextParagraphCache.cs @@ -24,7 +24,6 @@ using MS.Internal.TextFormatting; using MS.Internal.PresentationCore; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting @@ -92,12 +91,12 @@ ref _penalizedAsJustified if(callbackException != null) { // rethrow exception thrown in callbacks - throw new InvalidOperationException(SR.Get(SRID.CreateParaBreakingSessionFailure, lserr), callbackException); + throw new InvalidOperationException(SR.Format(SR.CreateParaBreakingSessionFailure, lserr), callbackException); } else { // throw with LS error codes - TextFormatterContext.ThrowExceptionFromLsError(SR.Get(SRID.CreateParaBreakingSessionFailure, lserr), lserr); + TextFormatterContext.ThrowExceptionFromLsError(SR.Format(SR.CreateParaBreakingSessionFailure, lserr), lserr); } } @@ -179,7 +178,7 @@ private void Dispose(bool disposing) private int VerifyMaxLineWidth(double maxLineWidth) { if (double.IsNaN(maxLineWidth)) - throw new ArgumentOutOfRangeException("maxLineWidth", SR.Get(SRID.ParameterValueCannotBeNaN)); + throw new ArgumentOutOfRangeException("maxLineWidth", SR.ParameterValueCannotBeNaN); if (maxLineWidth == 0 || double.IsPositiveInfinity(maxLineWidth)) { @@ -190,7 +189,7 @@ private int VerifyMaxLineWidth(double maxLineWidth) if ( maxLineWidth < 0 || maxLineWidth > Constants.RealInfiniteWidth) { - throw new ArgumentOutOfRangeException("maxLineWidth", SR.Get(SRID.ParameterMustBeBetween, 0, Constants.RealInfiniteWidth)); + throw new ArgumentOutOfRangeException("maxLineWidth", SR.Format(SR.ParameterMustBeBetween, 0, Constants.RealInfiniteWidth)); } // convert real value to ideal value diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSimpleMarkerProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSimpleMarkerProperties.cs index bcb2d2ca0df..7c4a11fcca1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSimpleMarkerProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/textformatting/TextSimpleMarkerProperties.cs @@ -18,7 +18,6 @@ using MS.Internal.TextFormatting; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.TextFormatting { @@ -61,13 +60,13 @@ TextParagraphProperties textParagraphProperties // validate autoNumberingIndex if (autoNumberingIndex < 1) { - throw new ArgumentOutOfRangeException("autoNumberingIndex", SR.Get(SRID.ParameterCannotBeLessThan, 1)); + throw new ArgumentOutOfRangeException("autoNumberingIndex", SR.Format(SR.ParameterCannotBeLessThan, 1)); } } else { // invalid style - throw new ArgumentException(SR.Get(SRID.Enum_Invalid, typeof(TextMarkerStyle)), "style"); + throw new ArgumentException(SR.Format(SR.Enum_Invalid, typeof(TextMarkerStyle)), "style"); } _textSource = new TextMarkerSource( diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ContainerUIElement3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ContainerUIElement3D.cs index 6195f717242..ab4a564325c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ContainerUIElement3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ContainerUIElement3D.cs @@ -20,7 +20,6 @@ using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Matrix3DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Matrix3DValueSerializer.cs index 3e6903309fc..e617d9a51d5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Matrix3DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Matrix3DValueSerializer.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DCollectionValueSerializer.cs index e15ee1253ef..6bc37722190 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DCollectionValueSerializer.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DValueSerializer.cs index 142cd55c174..1464c5db770 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point3DValueSerializer.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point4DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point4DValueSerializer.cs index 9df1cb86fbe..cd07c14c0fe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point4DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Point4DValueSerializer.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/QuaternionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/QuaternionValueSerializer.cs index 12527cfb42e..3abb25f5cc6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/QuaternionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/QuaternionValueSerializer.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Rect3DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Rect3DValueSerializer.cs index f1ce866da93..dc26bf24bdd 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Rect3DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Rect3DValueSerializer.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Size3DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Size3DValueSerializer.cs index 8d836188d93..06f81d33f3d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Size3DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Size3DValueSerializer.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DCollectionValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DCollectionValueSerializer.cs index 883db0dac03..28c61e01e25 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DCollectionValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DCollectionValueSerializer.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DValueSerializer.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DValueSerializer.cs index 0ca5d42d152..cb2d254586b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DValueSerializer.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Converters/Generated/Vector3DValueSerializer.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform2DTo3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform2DTo3D.cs index 1e145a8e331..1e764731467 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform2DTo3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform2DTo3D.cs @@ -14,7 +14,6 @@ using System.Windows.Media.Animation; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -107,7 +106,7 @@ public Point3D Transform(Point point) if (!TryTransform(point, out transformedPoint)) { - throw new InvalidOperationException(SR.Get(SRID.GeneralTransform_TransformFailed, null)); + throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null)); } return transformedPoint; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3D.cs index 1590ca53360..64b19ad6338 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3D.cs @@ -63,7 +63,7 @@ public Point3D Transform(Point3D point) if (!TryTransform(point, out transformedPoint)) { - throw new InvalidOperationException(SR.Get(SRID.GeneralTransform_TransformFailed, null)); + throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null)); } return transformedPoint; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DGroup.cs index 6c804053ab9..af67b620b10 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DGroup.cs @@ -23,7 +23,6 @@ using MS.Internal.PresentationCore; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DTo2D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DTo2D.cs index 3fc14575539..0aa41944241 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DTo2D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/GeneralTransform3DTo2D.cs @@ -12,7 +12,6 @@ using System.Windows.Media.Animation; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -70,7 +69,7 @@ public Point Transform(Point3D point) if (!TryTransform(point, out transformedPoint)) { - throw new InvalidOperationException(SR.Get(SRID.GeneralTransform_TransformFailed, null)); + throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null)); } return transformedPoint; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs index d0619bd3b71..6b8bb4a0f81 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AffineTransform3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs index 3161a3f344b..660760932f8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AmbientLight.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs index 6806e55b22a..d7f7590d3ea 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/AxisAngleRotation3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs index fc693d5b0b4..428348f22c6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Camera.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs index e9bd0259e6d..ef9a21f3485 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DiffuseMaterial.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs index cd4a338008d..69eff2f0f40 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/DirectionalLight.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs index 9b06319996f..4deb1aedc51 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/EmissiveMaterial.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs index 18a98ebd3a1..87eeb1232d4 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs index d7dda9c17bb..815786e1420 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DCollection.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; @@ -141,7 +140,7 @@ public void Insert(int index, GeneralTransform3D value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -249,7 +248,7 @@ public GeneralTransform3D this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -422,7 +421,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -437,7 +436,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -529,7 +528,7 @@ private GeneralTransform3D Cast(object value) if (!(value is GeneralTransform3D)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform3D")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform3D")); } return (GeneralTransform3D) value; @@ -555,7 +554,7 @@ internal int AddWithoutFiringPublicEvents(GeneralTransform3D value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); GeneralTransform3D newValue = value; @@ -811,7 +810,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -829,7 +828,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -863,12 +862,12 @@ public GeneralTransform3D Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -946,7 +945,7 @@ public GeneralTransform3DCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } GeneralTransform3D newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -963,7 +962,7 @@ public GeneralTransform3DCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs index c7b591c7255..7a86707782f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeneralTransform3DGroup.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs index b6eccc17170..ff03d7c712a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Geometry3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs index 3a6a5916df4..11126a64fcc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/GeometryModel3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs index 1a8e5fba56d..ad36dc44eb1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Light.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs index b229f9a9812..cc4914ce303 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Material.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs index 9757f4d6eae..134d0182b33 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialCollection.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; @@ -153,7 +152,7 @@ public void Insert(int index, Material value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -261,7 +260,7 @@ public Material this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -436,7 +435,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -451,7 +450,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -543,7 +542,7 @@ private Material Cast(object value) if (!(value is Material)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Material")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Material")); } return (Material) value; @@ -569,7 +568,7 @@ internal int AddWithoutFiringPublicEvents(Material value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); Material newValue = value; @@ -852,7 +851,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -870,7 +869,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -904,12 +903,12 @@ public Material Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -987,7 +986,7 @@ public MaterialCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } Material newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -1005,7 +1004,7 @@ public MaterialCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs index 0c24d179e7e..d30e4777198 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MaterialGroup.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs index 728f5d0972e..4d9d24f127b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3DConverter.cs index 4595866caec..15870b19aeb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Matrix3DConverter.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs index 297cfb85da1..8d76a9d820c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixCamera.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs index 23317258bfa..e1c2d149960 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MatrixTransform3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs index 7fc0801a0bc..713f37c5d82 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/MeshGeometry3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs index f9f3a23e614..6abee12c6d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs index 2d216ad1462..613e87cde43 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DCollection.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; @@ -153,7 +152,7 @@ public void Insert(int index, Model3D value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -261,7 +260,7 @@ public Model3D this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -436,7 +435,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -451,7 +450,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -543,7 +542,7 @@ private Model3D Cast(object value) if (!(value is Model3D)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Model3D")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Model3D")); } return (Model3D) value; @@ -569,7 +568,7 @@ internal int AddWithoutFiringPublicEvents(Model3D value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); Model3D newValue = value; @@ -852,7 +851,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -870,7 +869,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -904,12 +903,12 @@ public Model3D Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -987,7 +986,7 @@ public Model3DCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } Model3D newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -1005,7 +1004,7 @@ public Model3DCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs index 8f222d49b1d..9b84f16db6c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Model3DGroup.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs index 8815bb17ecc..a0f75c8fa8e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/OrthographicCamera.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs index 23ce11e5a94..28c61c0f07a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PerspectiveCamera.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs index 1b32bd0461d..2467d386c27 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs index 3e0107cda01..95448e17082 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollection.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; @@ -386,7 +385,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -401,7 +400,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -477,7 +476,7 @@ private Point3D Cast(object value) if (!(value is Point3D)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point3D")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point3D")); } return (Point3D) value; @@ -835,7 +834,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -853,7 +852,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -887,12 +886,12 @@ public Point3D Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollectionConverter.cs index c00b10be886..e995dba13da 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DCollectionConverter.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DConverter.cs index 00810d3ee4a..644cc18e96a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point3DConverter.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs index d7ecdc66254..d7c178e923c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4DConverter.cs index 7144b4e73b7..5d79c455f7f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Point4DConverter.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs index 5e8506ee61c..a992f59de52 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLight.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs index bf0975c4d84..2b53ed15629 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/PointLightBase.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs index 0d5b7a17972..ab8281573e6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ProjectionCamera.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs index e86779c37b1..e8b6d43b6d6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Quaternion.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionConverter.cs index 1543637c5d7..686d82ac2ac 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionConverter.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs index 1ad56e66a24..442c69ff0bb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/QuaternionRotation3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs index 9b53320c884..8a48a23541e 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3DConverter.cs index 13613c8b76f..eeddc9e5a69 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rect3DConverter.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs index bef0aad09b8..ec74fe258eb 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/RotateTransform3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs index 0e60d819ec7..d1de334cb49 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Rotation3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs index dcd8b814217..84f4a9c9f59 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/ScaleTransform3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs index 311686635e3..39f24cd0628 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3DConverter.cs index 969440647e5..0d11e9c1738 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Size3DConverter.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs index 548ee8f1917..5fe5b44d51a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpecularMaterial.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs index 7a4253011c2..383392b4a17 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/SpotLight.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs index bc828c05738..9d3d9b8c0e6 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs index ac6ad7260eb..891a2a9d9ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DCollection.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; @@ -153,7 +152,7 @@ public void Insert(int index, Transform3D value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -261,7 +260,7 @@ public Transform3D this[int index] { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); @@ -436,7 +435,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -451,7 +450,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -543,7 +542,7 @@ private Transform3D Cast(object value) if (!(value is Transform3D)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform3D")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform3D")); } return (Transform3D) value; @@ -569,7 +568,7 @@ internal int AddWithoutFiringPublicEvents(Transform3D value) if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } WritePreamble(); Transform3D newValue = value; @@ -852,7 +851,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -870,7 +869,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -904,12 +903,12 @@ public Transform3D Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -987,7 +986,7 @@ public Transform3DCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } Transform3D newValue = item; OnFreezablePropertyChanged(/* oldValue = */ null, newValue); @@ -1005,7 +1004,7 @@ public Transform3DCollection(IEnumerable collection) { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); OnInsert(item); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs index 85fa102651c..e6b2e004b18 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Transform3DGroup.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs index f6c91946b68..062e54d136a 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/TranslateTransform3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs index 213c6371500..ee60fd98a22 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3D.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs index feb09d4145f..6783b37190b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollection.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; // These types are aliased to match the unamanaged names used in interop using BOOL = System.UInt32; @@ -386,7 +385,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -401,7 +400,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } @@ -477,7 +476,7 @@ private Vector3D Cast(object value) if (!(value is Vector3D)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector3D")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector3D")); } return (Vector3D) value; @@ -835,7 +834,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -853,7 +852,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -887,12 +886,12 @@ public Vector3D Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollectionConverter.cs index 80938e8d97c..106f07de087 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DCollectionConverter.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DConverter.cs index cf1dcfc1433..3e5acae5cc9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Vector3DConverter.cs @@ -30,7 +30,6 @@ using System.Windows.Media.Composition; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using System.Windows.Media.Imaging; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Visual3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Visual3D.cs index a83eaf733fd..997a3789d3b 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Visual3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Generated/Visual3D.cs @@ -27,7 +27,6 @@ using System.Windows.Media.Composition; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -87,7 +86,7 @@ public void ApplyAnimationClock( if (!AnimationStorage.IsPropertyAnimatable(this, dp)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); + throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); #pragma warning restore 56506 } @@ -95,18 +94,18 @@ public void ApplyAnimationClock( && !AnimationStorage.IsAnimationValid(dp, clock.Timeline)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); + throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); #pragma warning restore 56506 } if (!HandoffBehaviorEnum.IsDefined(handoffBehavior)) { - throw new ArgumentException(SR.Get(SRID.Animation_UnrecognizedHandoffBehavior)); + throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); } if (IsSealed) { - throw new InvalidOperationException(SR.Get(SRID.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); + throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); } AnimationStorage.ApplyAnimationClock(this, dp, clock, handoffBehavior); @@ -159,24 +158,24 @@ public void BeginAnimation(DependencyProperty dp, AnimationTimeline animation, H if (!AnimationStorage.IsPropertyAnimatable(this, dp)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); + throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); #pragma warning restore 56506 } if ( animation != null && !AnimationStorage.IsAnimationValid(dp, animation)) { - throw new ArgumentException(SR.Get(SRID.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); + throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); } if (!HandoffBehaviorEnum.IsDefined(handoffBehavior)) { - throw new ArgumentException(SR.Get(SRID.Animation_UnrecognizedHandoffBehavior)); + throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); } if (IsSealed) { - throw new InvalidOperationException(SR.Get(SRID.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); + throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); } AnimationStorage.BeginAnimation(this, dp, animation, handoffBehavior); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MaterialGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MaterialGroup.cs index ae528e5d3b3..64e1a24c0af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MaterialGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MaterialGroup.cs @@ -19,7 +19,6 @@ using MS.Internal.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3D.cs index 273b8435553..6b1c0c0d170 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Matrix3D.cs @@ -33,7 +33,6 @@ using MS.Internal; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -664,7 +663,7 @@ public void Invert() { if (!InvertCore()) { - throw new InvalidOperationException(SR.Get(SRID.Matrix3D_NotInvertible, null)); + throw new InvalidOperationException(SR.Format(SR.Matrix3D_NotInvertible, null)); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixCamera.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixCamera.cs index 283bfb8d753..562f91390cc 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixCamera.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/MatrixCamera.cs @@ -14,7 +14,6 @@ using CultureInfo = System.Globalization.CultureInfo; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -113,7 +112,7 @@ internal override RayHitTestParameters RayFromViewportPoint(Point p, Size viewSi // singular matrices. // Need to handle singular matrix cameras - throw new NotSupportedException(SR.Get(SRID.HitTest_Singular)); + throw new NotSupportedException(SR.HitTest_Singular); } cameraToWorld.Invert(); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3DGroup.cs index c1f4d4350a2..a7905da23ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Model3DGroup.cs @@ -22,7 +22,6 @@ using MS.Internal.Media3D; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelUIElement3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelUIElement3D.cs index d72021f47be..acd41418e5c 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelUIElement3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelUIElement3D.cs @@ -20,7 +20,6 @@ using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelVisual3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelVisual3D.cs index 9824cd3cfa5..b7e09f1986d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelVisual3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/ModelVisual3D.cs @@ -20,7 +20,6 @@ using System.Windows.Markup; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -97,7 +96,7 @@ void IAddChild.AddChild(Object value) if (visual3D == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, typeof(Visual3D).Name)); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, typeof(Visual3D).Name)); } Children.Add(visual3D); @@ -110,7 +109,7 @@ void IAddChild.AddText(string text) { if (!Char.IsWhiteSpace(c)) { - throw new System.InvalidOperationException(SR.Get(SRID.AddText_Invalid, this.GetType().Name)); + throw new System.InvalidOperationException(SR.Format(SR.AddText_Invalid, this.GetType().Name)); } } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Quaternion.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Quaternion.cs index 629d3cfab8b..dd0a2bc4d40 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Quaternion.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Quaternion.cs @@ -41,7 +41,6 @@ using Float = System.Single; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -90,7 +89,7 @@ public Quaternion(Vector3D axisOfRotation, double angleInDegrees) double angleInRadians = angleInDegrees * (Math.PI / 180.0); double length = axisOfRotation.Length; if (length == 0) - throw new System.InvalidOperationException(SR.Get(SRID.Quaternion_ZeroAxisSpecified)); + throw new System.InvalidOperationException(SR.Quaternion_ZeroAxisSpecified); Vector3D v = (axisOfRotation / length) * Math.Sin(0.5 * angleInRadians); _x = v.X; _y = v.Y; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rect3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rect3D.cs index 5fa61b1bc60..eba76596f22 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rect3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Rect3D.cs @@ -21,7 +21,6 @@ using System.ComponentModel.Design.Serialization; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -77,7 +76,7 @@ public Rect3D(double x, double y, double z, double sizeX, double sizeY, double s { if (sizeX < 0 || sizeY < 0 || sizeZ < 0) { - throw new System.ArgumentException(SR.Get(SRID.Size3D_DimensionCannotBeNegative)); + throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); } _x = x; @@ -162,7 +161,7 @@ public Point3D Location { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Rect3D_CannotModifyEmptyRect)); + throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); } _x = value._x; @@ -193,7 +192,7 @@ public Size3D Size { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Rect3D_CannotModifyEmptyRect)); + throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); } _sizeX = value._x; @@ -216,12 +215,12 @@ public double SizeX { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Rect3D_CannotModifyEmptyRect)); + throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); } if (value < 0) { - throw new System.ArgumentException(SR.Get(SRID.Size3D_DimensionCannotBeNegative)); + throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); } _sizeX = value; @@ -241,12 +240,12 @@ public double SizeY { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Rect3D_CannotModifyEmptyRect)); + throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); } if (value < 0) { - throw new System.ArgumentException(SR.Get(SRID.Size3D_DimensionCannotBeNegative)); + throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); } _sizeY = value; @@ -266,12 +265,12 @@ public double SizeZ { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Rect3D_CannotModifyEmptyRect)); + throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); } if (value < 0) { - throw new System.ArgumentException(SR.Get(SRID.Size3D_DimensionCannotBeNegative)); + throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); } _sizeZ = value; @@ -291,7 +290,7 @@ public double X { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Rect3D_CannotModifyEmptyRect)); + throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); } _x = value; @@ -311,7 +310,7 @@ public double Y { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Rect3D_CannotModifyEmptyRect)); + throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); } _y = value; @@ -331,7 +330,7 @@ public double Z { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Rect3D_CannotModifyEmptyRect)); + throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); } _z = value; @@ -540,7 +539,7 @@ public void Offset(double offsetX, double offsetY, double offsetZ) { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Rect3D_CannotCallMethod)); + throw new System.InvalidOperationException(SR.Rect3D_CannotCallMethod); } _x += offsetX; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Size3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Size3D.cs index 2500295782b..722f4b46df8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Size3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Size3D.cs @@ -17,7 +17,6 @@ using System; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -39,7 +38,7 @@ public Size3D(double x, double y, double z) { if (x < 0 || y < 0 || z < 0) { - throw new System.ArgumentException(SR.Get(SRID.Size3D_DimensionCannotBeNegative)); + throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); } @@ -95,12 +94,12 @@ public double X { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Size3D_CannotModifyEmptySize)); + throw new System.InvalidOperationException(SR.Size3D_CannotModifyEmptySize); } if (value < 0) { - throw new System.ArgumentException(SR.Get(SRID.Size3D_DimensionCannotBeNegative)); + throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); } _x = value; @@ -120,12 +119,12 @@ public double Y { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Size3D_CannotModifyEmptySize)); + throw new System.InvalidOperationException(SR.Size3D_CannotModifyEmptySize); } if (value < 0) { - throw new System.ArgumentException(SR.Get(SRID.Size3D_DimensionCannotBeNegative)); + throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); } _y = value; @@ -146,12 +145,12 @@ public double Z { if (IsEmpty) { - throw new System.InvalidOperationException(SR.Get(SRID.Size3D_CannotModifyEmptySize)); + throw new System.InvalidOperationException(SR.Size3D_CannotModifyEmptySize); } if (value < 0) { - throw new System.ArgumentException(SR.Get(SRID.Size3D_DimensionCannotBeNegative)); + throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); } _z = value; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3DGroup.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3DGroup.cs index 5fb5b7cf684..d75c18c5f4d 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3DGroup.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Transform3DGroup.cs @@ -30,7 +30,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport2DVisual3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport2DVisual3D.cs index a273d5e9138..35780a10233 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport2DVisual3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport2DVisual3D.cs @@ -23,7 +23,6 @@ using System.Collections; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -378,7 +377,7 @@ private void AddVisualChild(Visual child) if (child._parent != null) { - throw new ArgumentException(SR.Get(SRID.Visual_HasParent)); + throw new ArgumentException(SR.Visual_HasParent); } // Set the parent pointer. @@ -409,7 +408,7 @@ private void RemoveVisualChild(Visual child) if (child._parent != this) { - throw new ArgumentException(SR.Get(SRID.Visual_NotChild)); + throw new ArgumentException(SR.Visual_NotChild); } // NOTE: We'll let the VisualBrush handle final cleanup from the channel @@ -520,7 +519,7 @@ private void SwapInCyclicBrush(Material material) // the IsVisualHostMaterialProperty should not be set on a MaterialGroup - verify that if ((Boolean)matGroup.GetValue(Viewport2DVisual3D.IsVisualHostMaterialProperty)) { - throw new ArgumentException(SR.Get(SRID.Viewport2DVisual3D_MaterialGroupIsInteractiveMaterial), "material"); + throw new ArgumentException(SR.Viewport2DVisual3D_MaterialGroupIsInteractiveMaterial, "material"); } // iterate over the children and put them on the stack of materials to modify @@ -544,7 +543,7 @@ private void SwapInCyclicBrush(Material material) // throw if there is more than 1 interactive material if (numMaterialsSwapped > 1) { - throw new ArgumentException(SR.Get(SRID.Viewport2DVisual3D_MultipleInteractiveMaterials), "material"); + throw new ArgumentException(SR.Viewport2DVisual3D_MultipleInteractiveMaterials, "material"); } } @@ -845,7 +844,7 @@ protected override int Visual3DChildrenCount /// protected override Visual3D GetVisual3DChild(int index) { - throw new ArgumentOutOfRangeException("index", index, SR.Get(SRID.Visual_ArgumentOutOfRange)); + throw new ArgumentOutOfRangeException("index", index, SR.Visual_ArgumentOutOfRange); } /// @@ -877,7 +876,7 @@ internal override DependencyObject InternalGet2DOr3DVisualChild(int index) if (index != 0 || visualChild == null) { - throw new ArgumentOutOfRangeException("index", index, SR.Get(SRID.Visual_ArgumentOutOfRange)); + throw new ArgumentOutOfRangeException("index", index, SR.Visual_ArgumentOutOfRange); } return visualChild; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport3DVisual.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport3DVisual.cs index 8386e57766f..cc7703d38ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport3DVisual.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Viewport3DVisual.cs @@ -22,7 +22,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -334,7 +333,7 @@ void IVisual3DContainer.AddChild(Visual3D child) // might be iterating during a property invalidation tree walk. if (IsVisualChildrenIterationInProgress) { - throw new InvalidOperationException(SR.Get(SRID.CannotModifyVisualChildrenDuringTreeWalk)); + throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); } // invalid during a VisualTreeChanged event @@ -385,7 +384,7 @@ void IVisual3DContainer.RemoveChild(Visual3D child) // might be iterating during a property invalidation tree walk. if (IsVisualChildrenIterationInProgress) { - throw new InvalidOperationException(SR.Get(SRID.CannotModifyVisualChildrenDuringTreeWalk)); + throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); } // invalid during a VisualTreeChanged event @@ -513,7 +512,7 @@ internal override HitTestResultBehavior HitTestPointInternal( /// protected override GeometryHitTestResult HitTestCore(GeometryHitTestParameters hitTestParameters) { - throw new NotSupportedException(SR.Get(SRID.HitTest_Invalid, typeof(GeometryHitTestParameters).Name, this.GetType().Name)); + throw new NotSupportedException(SR.Format(SR.HitTest_Invalid, typeof(GeometryHitTestParameters).Name, this.GetType().Name)); } internal Point WorldToViewport(Point4D point) diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3D.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3D.cs index c12cbf34e8c..727542073f5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3D.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3D.cs @@ -16,7 +16,6 @@ using System.Windows.Media; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -238,7 +237,7 @@ protected void AddVisual3DChild(Visual3D child) // might be iterating during a property invalidation tree walk. if (IsVisualChildrenIterationInProgress) { - throw new InvalidOperationException(SR.Get(SRID.CannotModifyVisualChildrenDuringTreeWalk)); + throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); } // invalid during a VisualTreeChanged event @@ -289,7 +288,7 @@ protected void RemoveVisual3DChild(Visual3D child) // might be iterating during a property invalidation tree walk. if (IsVisualChildrenIterationInProgress) { - throw new InvalidOperationException(SR.Get(SRID.CannotModifyVisualChildrenDuringTreeWalk)); + throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); } Debug.Assert(child != null); @@ -1004,7 +1003,7 @@ protected virtual int Visual3DChildrenCount /// protected virtual Visual3D GetVisual3DChild(int index) { - throw new ArgumentOutOfRangeException("index", index, SR.Get(SRID.Visual_ArgumentOutOfRange)); + throw new ArgumentOutOfRangeException("index", index, SR.Visual_ArgumentOutOfRange); } /// @@ -1759,7 +1758,7 @@ private GeneralTransform3D InternalTransformToAncestor(Visual3D ancestor, bool i if (g != ancestor) { - throw new System.InvalidOperationException(SR.Get(inverse ? SRID.Visual_NotADescendant : SRID.Visual_NotAnAncestor)); + throw new System.InvalidOperationException(inverse ? SR.Visual_NotADescendant : SR.Visual_NotAnAncestor); } // construct the generaltransform3d to return and invert it if necessary diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3DCollection.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3DCollection.cs index 8b8790316f2..78d1728aadf 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3DCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media3D/Visual3DCollection.cs @@ -19,7 +19,6 @@ using MS.Internal.PresentationCore; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media.Media3D { @@ -181,7 +180,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -196,7 +195,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, "Visual3DCollection"), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, "Visual3DCollection"), e); } } @@ -479,7 +478,7 @@ private Visual3D Cast(object value) if (!(value is Visual3D)) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "Visual3D")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Visual3D")); } return (Visual3D) value; @@ -489,14 +488,14 @@ private void VerifyAPIForAdd(Visual3D value) { if (value == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } VerifyAPIReadWrite(value); if (value.InternalVisualParent != null) { - throw new System.ArgumentException(SR.Get(SRID.VisualCollection_VisualHasParent)); + throw new System.ArgumentException(SR.VisualCollection_VisualHasParent); } } @@ -647,7 +646,7 @@ public bool MoveNext() { if (_list._version != _version) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } int count = _list.Count; @@ -667,7 +666,7 @@ public void Reset() { if (_list._version != _version) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } _index = -1; @@ -701,7 +700,7 @@ public Visual3D Current { if ((_index < 0) || (_index >= _list.Count)) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_VerifyContext)); + throw new InvalidOperationException(SR.Enumerator_VerifyContext); } return _list[_index]; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Navigation/BaseUriHelper.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Navigation/BaseUriHelper.cs index e79bd709b7d..b885542ed60 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Navigation/BaseUriHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Navigation/BaseUriHelper.cs @@ -291,7 +291,7 @@ internal static void GetAssemblyNameAndPart(Uri uri, out string partName, out st if ((count > 4) || (count < 2)) { - throw new UriFormatException(SR.Get(SRID.WrongFirstSegment)); + throw new UriFormatException(SR.WrongFirstSegment); } // @@ -312,7 +312,7 @@ internal static void GetAssemblyNameAndPart(Uri uri, out string partName, out st } else { - throw new UriFormatException(SR.Get(SRID.WrongFirstSegment)); + throw new UriFormatException(SR.WrongFirstSegment); } } else @@ -323,7 +323,7 @@ internal static void GetAssemblyNameAndPart(Uri uri, out string partName, out st } else { - throw new UriFormatException(SR.Get(SRID.WrongFirstSegment)); + throw new UriFormatException(SR.WrongFirstSegment); } } } // end of for loop @@ -392,7 +392,7 @@ static internal Uri ConvertPackUriToAbsoluteExternallyVisibleUri(Uri packUri) } else { - throw new InvalidOperationException(SR.Get(SRID.CannotNavigateToApplicationResourcesInWebBrowser, packUri)); + throw new InvalidOperationException(SR.Format(SR.CannotNavigateToApplicationResourcesInWebBrowser, packUri)); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/OleServicesContext.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/OleServicesContext.cs index 934f1e2d7ad..134a0dde0a8 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/OleServicesContext.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/OleServicesContext.cs @@ -18,7 +18,6 @@ using System.Windows.Input; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; namespace System.Windows @@ -112,7 +111,7 @@ internal int OleSetClipboard(IComDataObject dataObject) { if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new ThreadStateException(SR.Get(SRID.OleServicesContext_ThreadMustBeSTA)); + throw new ThreadStateException(SR.OleServicesContext_ThreadMustBeSTA); } return UnsafeNativeMethods.OleSetClipboard(dataObject); @@ -125,7 +124,7 @@ internal int OleGetClipboard(ref IComDataObject dataObject) { if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new ThreadStateException(SR.Get(SRID.OleServicesContext_ThreadMustBeSTA)); + throw new ThreadStateException(SR.OleServicesContext_ThreadMustBeSTA); } return UnsafeNativeMethods.OleGetClipboard(ref dataObject); @@ -138,7 +137,7 @@ internal int OleFlushClipboard() { if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new ThreadStateException(SR.Get(SRID.OleServicesContext_ThreadMustBeSTA)); + throw new ThreadStateException(SR.OleServicesContext_ThreadMustBeSTA); } return UnsafeNativeMethods.OleFlushClipboard(); @@ -154,7 +153,7 @@ internal int OleIsCurrentClipboard(IComDataObject dataObject) { if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new ThreadStateException(SR.Get(SRID.OleServicesContext_ThreadMustBeSTA)); + throw new ThreadStateException(SR.OleServicesContext_ThreadMustBeSTA); } return UnsafeNativeMethods.OleIsCurrentClipboard(dataObject); @@ -168,7 +167,7 @@ internal void OleDoDragDrop(IComDataObject dataObject, UnsafeNativeMethods.IOleD { if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new ThreadStateException(SR.Get(SRID.OleServicesContext_ThreadMustBeSTA)); + throw new ThreadStateException(SR.OleServicesContext_ThreadMustBeSTA); } InputManager inputManager = (InputManager)Dispatcher.CurrentDispatcher.InputManager; @@ -196,7 +195,7 @@ internal int OleRegisterDragDrop(HandleRef windowHandle, UnsafeNativeMethods.IOl { if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new ThreadStateException(SR.Get(SRID.OleServicesContext_ThreadMustBeSTA)); + throw new ThreadStateException(SR.OleServicesContext_ThreadMustBeSTA); } return UnsafeNativeMethods.RegisterDragDrop(windowHandle, dropTarget); @@ -209,7 +208,7 @@ internal int OleRevokeDragDrop(HandleRef windowHandle) { if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new ThreadStateException(SR.Get(SRID.OleServicesContext_ThreadMustBeSTA)); + throw new ThreadStateException(SR.OleServicesContext_ThreadMustBeSTA); } return UnsafeNativeMethods.RevokeDragDrop(windowHandle); @@ -235,7 +234,7 @@ private void SetDispatcherThread() if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new ThreadStateException(SR.Get(SRID.OleServicesContext_ThreadMustBeSTA)); + throw new ThreadStateException(SR.OleServicesContext_ThreadMustBeSTA); } // Initialize Ole services. @@ -244,7 +243,7 @@ private void SetDispatcherThread() if (!NativeMethods.Succeeded(hr)) { - throw new SystemException(SR.Get(SRID.OleServicesContext_oleInitializeFailure, hr)); + throw new SystemException(SR.Format(SR.OleServicesContext_oleInitializeFailure, hr)); } // Add Dispatcher.Shutdown event handler. @@ -265,7 +264,7 @@ private void OnDispatcherShutdown(object sender, EventArgs args) { if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) { - throw new ThreadStateException(SR.Get(SRID.OleServicesContext_ThreadMustBeSTA)); + throw new ThreadStateException(SR.OleServicesContext_ThreadMustBeSTA); } // Uninitialize Ole services. diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/PresentationSource.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/PresentationSource.cs index c070525140c..091cc91f047 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/PresentationSource.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/PresentationSource.cs @@ -19,7 +19,6 @@ using MS.Internal.PresentationCore; // SecurityHelper using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -132,7 +131,7 @@ public static void AddSourceChangedHandler(IInputElement element, SourceChangedE // Either UIElement, ContentElement or UIElement3D. if (!InputElement.IsValid(element)) { - throw new ArgumentException(SR.Get(SRID.Invalid_IInputElement, element.GetType()), nameof(element)); + throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), nameof(element)); } DependencyObject o = (DependencyObject)element; @@ -176,7 +175,7 @@ public static void AddSourceChangedHandler(IInputElement element, SourceChangedE } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, o.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); } } } @@ -201,7 +200,7 @@ public static void RemoveSourceChangedHandler(IInputElement e, SourceChangedEven // Either UIElement, ContentElement or UIElement3D. if (!InputElement.IsValid(e)) { - throw new ArgumentException(SR.Get(SRID.Invalid_IInputElement, e.GetType()), nameof(e)); + throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, e.GetType()), nameof(e)); } DependencyObject o = (DependencyObject)e; @@ -260,7 +259,7 @@ public static void RemoveSourceChangedHandler(IInputElement e, SourceChangedEven } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, o.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); } } } @@ -743,7 +742,7 @@ private static bool UpdateSourceOfElement(DependencyObject doTarget, } else { - throw new InvalidOperationException(SR.Get(SRID.Invalid_IInputElement, doTarget.GetType())); + throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doTarget.GetType())); } calledOut = true; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventArgs.cs index 9fad0b5535f..5c70a1fa8fa 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/QueryContinueDragEventArgs.cs @@ -13,7 +13,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -92,7 +91,7 @@ public DragAction Action { if (!DragDrop.IsValidDragAction(value)) { - throw new ArgumentException(SR.Get(SRID.DragDrop_DragActionInvalid, "value")); + throw new ArgumentException(SR.Format(SR.DragDrop_DragActionInvalid, "value")); } _action = value; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventArgs.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventArgs.cs index 21763d90a96..3c9712d51c5 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventArgs.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/RoutedEventArgs.cs @@ -6,7 +6,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; using MS.Internal.PresentationCore; using System.Collections.Specialized ; using System.Windows.Input; @@ -96,7 +95,7 @@ public RoutedEvent RoutedEvent set { if (UserInitiated && InvokingHandler) - throw new InvalidOperationException(SR.Get(SRID.RoutedEventCannotChangeWhileRouting)); + throw new InvalidOperationException(SR.RoutedEventCannotChangeWhileRouting); _routedEvent = value; } @@ -136,7 +135,7 @@ public bool Handled { if (_routedEvent == null) { - throw new InvalidOperationException(SR.Get(SRID.RoutedEventArgsMustHaveRoutedEvent)); + throw new InvalidOperationException(SR.RoutedEventArgsMustHaveRoutedEvent); } @@ -188,11 +187,11 @@ public object Source set { if (InvokingHandler && UserInitiated) - throw new InvalidOperationException(SR.Get(SRID.RoutedEventCannotChangeWhileRouting)); + throw new InvalidOperationException(SR.RoutedEventCannotChangeWhileRouting); if (_routedEvent == null) { - throw new InvalidOperationException(SR.Get(SRID.RoutedEventArgsMustHaveRoutedEvent)); + throw new InvalidOperationException(SR.RoutedEventArgsMustHaveRoutedEvent); } @@ -292,7 +291,7 @@ protected virtual void InvokeEventHandler(Delegate genericHandler, object generi if (_routedEvent == null) { - throw new InvalidOperationException(SR.Get(SRID.RoutedEventArgsMustHaveRoutedEvent)); + throw new InvalidOperationException(SR.RoutedEventArgsMustHaveRoutedEvent); } InvokingHandler = true; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollectionConverter.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollectionConverter.cs index 4657846a777..3ae332c02b3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollectionConverter.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/TextDecorationCollectionConverter.cs @@ -19,7 +19,6 @@ using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -81,7 +80,7 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c if (null == value) { - throw new ArgumentException(SR.Get(SRID.General_BadType, "ConvertFrom"), "input"); + throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "input"); } return ConvertFromString(value); @@ -164,7 +163,7 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c if (index < 0) { - throw new ArgumentException(SR.Get(SRID.InvalidTextDecorationCollectionString, text)); + throw new ArgumentException(SR.Format(SR.InvalidTextDecorationCollectionString, text)); } return textDecorations; diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement.cs index 49d9a88f4f3..c10811f2598 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIElement.cs @@ -586,7 +586,7 @@ public void Measure(Size availableSize) { //enforce that Measure can not receive NaN size . if (double.IsNaN(availableSize.Width) || double.IsNaN(availableSize.Height)) - throw new InvalidOperationException(SR.Get(SRID.UIElement_Layout_NaNMeasure)); + throw new InvalidOperationException(SR.UIElement_Layout_NaNMeasure); bool neverMeasured = NeverMeasured; @@ -679,11 +679,11 @@ public void Measure(Size availableSize) //enforce that MeasureCore can not return PositiveInfinity size even if given Infinte availabel size. //Note: NegativeInfinity can not be returned by definition of Size structure. if (double.IsPositiveInfinity(desiredSize.Width) || double.IsPositiveInfinity(desiredSize.Height)) - throw new InvalidOperationException(SR.Get(SRID.UIElement_Layout_PositiveInfinityReturned, this.GetType().FullName)); + throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_PositiveInfinityReturned, this.GetType().FullName)); //enforce that MeasureCore can not return NaN size . if (double.IsNaN(desiredSize.Width) || double.IsNaN(desiredSize.Height)) - throw new InvalidOperationException(SR.Get(SRID.UIElement_Layout_NaNReturned, this.GetType().FullName)); + throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_NaNReturned, this.GetType().FullName)); //reset measure dirtiness @@ -807,8 +807,8 @@ public void Arrange(Rect finalRect) { DependencyObject parent = GetUIParent() as UIElement; throw new InvalidOperationException( - SR.Get( - SRID.UIElement_Layout_InfinityArrange, + SR.Format( + SR.UIElement_Layout_InfinityArrange, (parent == null ? "" : parent.GetType().FullName), this.GetType().FullName)); } @@ -1661,12 +1661,12 @@ internal static void BuildRouteHelper(DependencyObject e, EventRoute route, Rout if (args.Source == null) { - throw new ArgumentException(SR.Get(SRID.SourceNotSet)); + throw new ArgumentException(SR.SourceNotSet); } if (args.RoutedEvent != route.RoutedEvent) { - throw new ArgumentException(SR.Get(SRID.Mismatched_RoutedEvent)); + throw new ArgumentException(SR.Mismatched_RoutedEvent); } // Route via visual tree @@ -1724,7 +1724,7 @@ internal static void BuildRouteHelper(DependencyObject e, EventRoute route, Rout // that we will process. if (cElements++ > MAX_ELEMENTS_IN_ROUTE) { - throw new InvalidOperationException(SR.Get(SRID.TreeLoop)); + throw new InvalidOperationException(SR.TreeLoop); } // Allow the element to adjust source @@ -1922,7 +1922,7 @@ internal static void AddHandler(DependencyObject d, RoutedEvent routedEvent, Del } else { - throw new ArgumentException(SR.Get(SRID.Invalid_IInputElement, d.GetType())); + throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType())); } } } @@ -1962,7 +1962,7 @@ internal static void RemoveHandler(DependencyObject d, RoutedEvent routedEvent, } else { - throw new ArgumentException(SR.Get(SRID.Invalid_IInputElement, d.GetType())); + throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType())); } } } @@ -4348,7 +4348,7 @@ internal static void InvalidateForceInheritPropertyOnChildren(Visual v, Dependen /// Setting to false will immediately complete any current manipulation or inertia /// on this element and raise a ManipulationCompleted event. /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public bool IsManipulationEnabled { get @@ -4402,7 +4402,7 @@ private static bool IsDefaultValue(DependencyObject dependencyObject, Dependency /// /// Indicates that a manipulation is about to start and allows for configuring its behavior. /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler ManipulationStarting { add { AddHandler(ManipulationStartingEvent, value, false); } @@ -4427,7 +4427,7 @@ protected virtual void OnManipulationStarting(ManipulationStartingEventArgs e) { /// /// Indicates that a manipulation has started. /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler ManipulationStarted { add { AddHandler(ManipulationStartedEvent, value, false); } @@ -4452,7 +4452,7 @@ protected virtual void OnManipulationStarted(ManipulationStartedEventArgs e) { } /// /// Provides data regarding changes to a currently occurring manipulation. /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler ManipulationDelta { add { AddHandler(ManipulationDeltaEvent, value, false); } @@ -4477,7 +4477,7 @@ protected virtual void OnManipulationDelta(ManipulationDeltaEventArgs e) { } /// /// Allows a handler to customize the parameters of an inertia processor. /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler ManipulationInertiaStarting { add { AddHandler(ManipulationInertiaStartingEvent, value, false); } @@ -4502,7 +4502,7 @@ protected virtual void OnManipulationInertiaStarting(ManipulationInertiaStarting /// /// Allows a handler to provide feedback when a manipulation has encountered a boundary. /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler ManipulationBoundaryFeedback { add { AddHandler(ManipulationBoundaryFeedbackEvent, value, false); } @@ -4527,7 +4527,7 @@ protected virtual void OnManipulationBoundaryFeedback(ManipulationBoundaryFeedba /// /// Indicates that a manipulation has completed. /// - [CustomCategory(SRID.Touch_Category)] + [CustomCategory(nameof(SR.Touch_Category))] public event EventHandler ManipulationCompleted { add { AddHandler(ManipulationCompletedEvent, value, false); } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIPropertyMetadata.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIPropertyMetadata.cs index dd43ebdeb0b..c0bf7c945e0 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIPropertyMetadata.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/UIPropertyMetadata.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows { @@ -111,7 +110,7 @@ public bool IsAnimationProhibited { if (Sealed) { - throw new InvalidOperationException(SR.Get(SRID.TypeMetadataCannotChangeAfterUse)); + throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); } WriteFlag(MetadataFlags.UI_IsAnimationProhibitedID, value); diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/clipboard.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/clipboard.cs index 3eb7ed0b363..af0ef18b269 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/clipboard.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/clipboard.cs @@ -25,7 +25,6 @@ using System.Windows.Threading; using SR = MS.Internal.PresentationCore.SR; -using SRID = MS.Internal.PresentationCore.SRID; using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; namespace System.Windows @@ -95,7 +94,7 @@ public static bool ContainsData(string format) if (format.Length == 0) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } return ContainsDataInternal(format); @@ -187,7 +186,7 @@ public static object GetData(string format) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } return GetDataInternal(format); @@ -288,7 +287,7 @@ public static void SetData(string format, object data) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } if (data == null) @@ -311,7 +310,7 @@ public static void SetFileDropList(StringCollection fileDropList) if (fileDropList.Count == 0) { - throw new ArgumentException(SR.Get(SRID.DataObject_FileDropListIsEmpty, fileDropList)); + throw new ArgumentException(SR.Format(SR.DataObject_FileDropListIsEmpty, fileDropList)); } foreach (string fileDrop in fileDropList) @@ -322,7 +321,7 @@ public static void SetFileDropList(StringCollection fileDropList) } catch (ArgumentException) { - throw new ArgumentException(SR.Get(SRID.DataObject_FileDropListHasInvalidFileDropPath, fileDropList)); + throw new ArgumentException(SR.Format(SR.DataObject_FileDropListHasInvalidFileDropPath, fileDropList)); } } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/dataobject.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/dataobject.cs index f00e90f611d..f2fc29a64f3 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/dataobject.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/dataobject.cs @@ -33,7 +33,6 @@ namespace System.Windows using MS.Internal.PresentationCore; // SecurityHelper using SR=MS.Internal.PresentationCore.SR; - using SRID=MS.Internal.PresentationCore.SRID; using IComDataObject = System.Runtime.InteropServices.ComTypes.IDataObject; // PreSharp uses message numbers that the C# compiler doesn't know about. @@ -108,7 +107,7 @@ public DataObject(string format, object data) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } if (data == null) @@ -151,7 +150,7 @@ public DataObject(string format, object data, bool autoConvert) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } if (data == null) @@ -213,7 +212,7 @@ public object GetData(string format, bool autoConvert) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } return _innerData.GetData(format, autoConvert); @@ -232,7 +231,7 @@ public object GetData(string format) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } return GetData(format, true); @@ -283,7 +282,7 @@ public bool GetDataPresent(string format, bool autoConvert) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } dataPresent = _innerData.GetDataPresent(format, autoConvert); @@ -304,7 +303,7 @@ public bool GetDataPresent(string format) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } return GetDataPresent(format, true); @@ -357,7 +356,7 @@ public void SetData(string format, object data) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } if (data == null) @@ -405,7 +404,7 @@ public void SetData(string format, Object data, bool autoConvert) if (format == string.Empty) { - throw new ArgumentException(SR.Get(SRID.DataObject_EmptyFormatNotAllowed)); + throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); } _innerData.SetData(format, data, autoConvert); @@ -560,7 +559,7 @@ public void SetFileDropList(StringCollection fileDropList) if (fileDropList.Count == 0) { - throw new ArgumentException(SR.Get(SRID.DataObject_FileDropListIsEmpty, fileDropList)); + throw new ArgumentException(SR.Format(SR.DataObject_FileDropListIsEmpty, fileDropList)); } foreach (string fileDrop in fileDropList) @@ -571,7 +570,7 @@ public void SetFileDropList(StringCollection fileDropList) } catch (ArgumentException e) { - throw new ArgumentException(SR.Get(SRID.DataObject_FileDropListHasInvalidFileDropPath, e)); + throw new ArgumentException(SR.Format(SR.DataObject_FileDropListHasInvalidFileDropPath, e)); } } @@ -688,7 +687,7 @@ IEnumFORMATETC IComDataObject.EnumFormatEtc(DATADIR dwDirection) } else { - throw new ExternalException(SR.Get(SRID.DataObject_NotImplementedEnumFormatEtc, dwDirection), NativeMethods.E_NOTIMPL); + throw new ExternalException(SR.Format(SR.DataObject_NotImplementedEnumFormatEtc, dwDirection), NativeMethods.E_NOTIMPL); } } @@ -2750,7 +2749,7 @@ private void SetData(string format, object data, bool autoConvert, DVASPECT aspe { // If we want to support setting data into an OLE data Object, // the code should be here. - throw new InvalidOperationException(SR.Get(SRID.DataObject_CannotSetDataOnAFozenOLEDataDbject)); + throw new InvalidOperationException(SR.DataObject_CannotSetDataOnAFozenOLEDataDbject); } /// diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CharacterBuffer.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CharacterBuffer.cs index d985255b484..24b9b6918e4 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CharacterBuffer.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/CharacterBuffer.cs @@ -25,7 +25,6 @@ using System.Runtime.InteropServices; using System.Security; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal { @@ -396,7 +395,7 @@ int length if (length <= 0) { - throw new ArgumentOutOfRangeException("length", SR.Get(SRID.ParameterValueMustBeGreaterThanZero)); + throw new ArgumentOutOfRangeException("length", SR.ParameterValueMustBeGreaterThanZero); } _unsafeString = characterString; @@ -411,7 +410,7 @@ public override char this[int characterOffset] { get { if (characterOffset >= _length || characterOffset < 0) - throw new ArgumentOutOfRangeException("characterOffset", SR.Get(SRID.ParameterMustBeBetween,0,_length)); + throw new ArgumentOutOfRangeException("characterOffset", SR.Format(SR.ParameterMustBeBetween,0,_length)); return _unsafeString[characterOffset]; } set { throw new NotSupportedException(); } @@ -468,12 +467,12 @@ int characterLength if (characterOffset >= _length || characterOffset < 0) { - throw new ArgumentOutOfRangeException("characterOffset", SR.Get(SRID.ParameterMustBeBetween,0,_length)); + throw new ArgumentOutOfRangeException("characterOffset", SR.Format(SR.ParameterMustBeBetween,0,_length)); } if (characterLength < 0 || characterOffset + characterLength > _length) { - throw new ArgumentOutOfRangeException("characterLength", SR.Get(SRID.ParameterMustBeBetween,0, _length - characterOffset)); + throw new ArgumentOutOfRangeException("characterLength", SR.Format(SR.ParameterMustBeBetween,0, _length - characterOffset)); } stringBuilder.Append(new string(_unsafeString, characterOffset, characterLength)); diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentXValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentXValidation.cs index 4e251dad156..3a9456383ff 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentXValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentXValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentYValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentYValidation.cs index 72a9a5218d8..79fce7ec42e 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentYValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/AlignmentYValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BitmapScalingModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BitmapScalingModeValidation.cs index e9292555801..cd2859a7e97 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BitmapScalingModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BitmapScalingModeValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BrushMappingModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BrushMappingModeValidation.cs index 61e386b372d..283d3b20d43 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BrushMappingModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/BrushMappingModeValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/CachingHintValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/CachingHintValidation.cs index 88ef8a9b28a..1548ee2ebdf 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/CachingHintValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/CachingHintValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ClearTypeHintValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ClearTypeHintValidation.cs index 2e0f646845f..286faf64146 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ClearTypeHintValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ClearTypeHintValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ColorInterpolationModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ColorInterpolationModeValidation.cs index 61b28e0ee91..76f959bc102 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ColorInterpolationModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ColorInterpolationModeValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeModeValidation.cs index edf287db745..ac394b6ca87 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeModeValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeProfileValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeProfileValidation.cs index e7a0e7684b8..f5f34efd9df 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeProfileValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/EdgeProfileValidation.cs @@ -14,10 +14,8 @@ #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/FillRuleValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/FillRuleValidation.cs index 2caa67e917d..dff9b440635 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/FillRuleValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/FillRuleValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GeometryCombineModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GeometryCombineModeValidation.cs index a28207c270f..80f36295ea4 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GeometryCombineModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GeometryCombineModeValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GradientSpreadMethodValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GradientSpreadMethodValidation.cs index 841a02be669..e4027a64d93 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GradientSpreadMethodValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/GradientSpreadMethodValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/KernelTypeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/KernelTypeValidation.cs index 411a895165c..bf06aa1ae53 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/KernelTypeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/KernelTypeValidation.cs @@ -14,10 +14,8 @@ #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineCapValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineCapValidation.cs index 28f3606164d..04ef5019863 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineCapValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineCapValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineJoinValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineJoinValidation.cs index 0bd7e86836e..e6d2bfd49c2 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineJoinValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/PenLineJoinValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RenderingBiasValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RenderingBiasValidation.cs index 25c0a3b924f..19e37827887 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RenderingBiasValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RenderingBiasValidation.cs @@ -14,10 +14,8 @@ #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RotationValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RotationValidation.cs index 226f0e73b4a..a4a4d7ddceb 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RotationValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/RotationValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media.Imaging diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ShaderRenderModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ShaderRenderModeValidation.cs index f9a8087a77e..b8f0ffff882 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ShaderRenderModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/ShaderRenderModeValidation.cs @@ -14,10 +14,8 @@ #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media.Effects diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/StretchValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/StretchValidation.cs index 49989db2df7..3933e2df0ef 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/StretchValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/StretchValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/SweepDirectionValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/SweepDirectionValidation.cs index 02c86070615..1a0d75a5544 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/SweepDirectionValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/SweepDirectionValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationLocationValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationLocationValidation.cs index 0ffa3f14429..2b5285a46cc 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationLocationValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationLocationValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationUnitValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationUnitValidation.cs index b597c2a5d69..c943519f8bf 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationUnitValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationUnitValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextHintingModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextHintingModeValidation.cs index 96a23d9e13e..37a2fa74235 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextHintingModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextHintingModeValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextRenderingModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextRenderingModeValidation.cs index 3e9f8714719..2f254df5f08 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextRenderingModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextRenderingModeValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TileModeValidation.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TileModeValidation.cs index 62354695f7a..adb354b0dc2 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TileModeValidation.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TileModeValidation.cs @@ -18,10 +18,8 @@ using MS.Internal.PresentationCore; #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace System.Windows.Media diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/GenericEnumerator.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/GenericEnumerator.cs index 92190f89ddf..f9331191cc7 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/GenericEnumerator.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/GenericEnumerator.cs @@ -17,10 +17,8 @@ #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; -using SRID=System.Windows.SRID; #endif namespace MS.Internal @@ -60,7 +58,7 @@ private void VerifyCurrent() if ( (-1 == _position) || (_position >= _count)) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_VerifyContext)); + throw new InvalidOperationException(SR.Enumerator_VerifyContext); } } @@ -91,7 +89,7 @@ public bool MoveNext() { if (_getGenerationID() != _originalGenerationID) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } _position++; @@ -119,7 +117,7 @@ public void Reset() { if (_getGenerationID() != _originalGenerationID) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } else { diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/PackagingUtilities.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/PackagingUtilities.cs index 531a2394793..5313d1c9879 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/PackagingUtilities.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/IO/Packaging/PackagingUtilities.cs @@ -17,7 +17,7 @@ using System.Xml; // For XmlReader using System.Diagnostics; // For Debug.Assert using System.Text; // For Encoding -using System.Windows; // For Exception strings - SRID +using System.Windows; // For Exception strings - SR using System.Security; // for SecurityCritical using Microsoft.Win32; // for Registry classes diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/BitStream.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/BitStream.cs index ef99e1993d0..6b733fa34eb 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/BitStream.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Ink/BitStream.cs @@ -11,7 +11,6 @@ using System.Diagnostics; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal.Ink { @@ -66,7 +65,7 @@ internal BitStreamReader(byte[] buffer, uint bufferLengthInBits) { if (bufferLengthInBits > (buffer.Length * Native.BitsPerByte)) { - throw new ArgumentOutOfRangeException("bufferLengthInBits", SR.Get(SRID.InvalidBufferLength)); + throw new ArgumentOutOfRangeException("bufferLengthInBits", SR.InvalidBufferLength); } _bufferLengthInBits = bufferLengthInBits; @@ -80,7 +79,7 @@ internal long ReadUInt64(int countOfBits) // we only support 1-64 bits currently, not multiple bytes, and not 0 bits if (countOfBits > Native.BitsPerLong || countOfBits <= 0) { - throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.Get(SRID.CountOfBitsOutOfRange)); + throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.CountOfBitsOutOfRange); } long retVal = 0; while (countOfBits > 0) @@ -109,7 +108,7 @@ internal ushort ReadUInt16(int countOfBits) // we only support 1-16 bits currently, not multiple bytes, and not 0 bits if (countOfBits > Native.BitsPerShort || countOfBits <= 0) { - throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.Get(SRID.CountOfBitsOutOfRange)); + throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.CountOfBitsOutOfRange); } ushort retVal = 0; @@ -137,7 +136,7 @@ internal uint ReadUInt16Reverse(int countOfBits) // we only support 1-8 bits currently, not multiple bytes, and not 0 bits if (countOfBits > Native.BitsPerShort|| countOfBits <= 0) { - throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.Get(SRID.CountOfBitsOutOfRange)); + throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.CountOfBitsOutOfRange); } ushort retVal = 0; @@ -167,7 +166,7 @@ internal uint ReadUInt32(int countOfBits) // we only support 1-8 bits currently, not multiple bytes, and not 0 bits if (countOfBits > Native.BitsPerInt || countOfBits <= 0) { - throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.Get(SRID.CountOfBitsOutOfRange)); + throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.CountOfBitsOutOfRange); } uint retVal = 0; @@ -195,7 +194,7 @@ internal uint ReadUInt32Reverse(int countOfBits) // we only support 1-8 bits currently, not multiple bytes, and not 0 bits if (countOfBits > Native.BitsPerInt || countOfBits <= 0) { - throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.Get(SRID.CountOfBitsOutOfRange)); + throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.CountOfBitsOutOfRange); } uint retVal = 0; @@ -240,18 +239,18 @@ internal byte ReadByte(int countOfBits) // if the end of the stream has been reached, then throw an exception if (EndOfStream) { - throw new System.IO.EndOfStreamException(SR.Get(SRID.EndOfStreamReached)); + throw new System.IO.EndOfStreamException(SR.EndOfStreamReached); } // we only support 1-8 bits currently, not multiple bytes, and not 0 bits if (countOfBits > Native.BitsPerByte || countOfBits <= 0) { - throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.Get(SRID.CountOfBitsOutOfRange)); + throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.CountOfBitsOutOfRange); } if (countOfBits > _bufferLengthInBits) { - throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.Get(SRID.CountOfBitsGreatThanRemainingBits)); + throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.CountOfBitsGreatThanRemainingBits); } _bufferLengthInBits -= (uint)countOfBits; @@ -383,7 +382,7 @@ internal void Write(uint bits, int countOfBits) { // validate that a subset of the bits in a single byte are being written if (countOfBits <= 0 || countOfBits > Native.BitsPerInt) - throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.Get(SRID.CountOfBitsOutOfRange)); + throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.CountOfBitsOutOfRange); // calculate the number of full bytes @@ -422,7 +421,7 @@ internal void WriteReverse(uint bits, int countOfBits) { // validate that a subset of the bits in a single byte are being written if (countOfBits <= 0 || countOfBits > Native.BitsPerInt) - throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.Get(SRID.CountOfBitsOutOfRange)); + throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.CountOfBitsOutOfRange); // calculate the number of full bytes // Example: 10 bits would require 1 full byte @@ -451,7 +450,7 @@ internal void Write(byte bits, int countOfBits) { // validate that a subset of the bits in a single byte are being written if (countOfBits <= 0 || countOfBits > Native.BitsPerByte) - throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.Get(SRID.CountOfBitsOutOfRange)); + throw new ArgumentOutOfRangeException("countOfBits", countOfBits, SR.CountOfBitsOutOfRange); byte buffer; // if there is remaining bits in the last byte in the stream diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SecurityHelper.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SecurityHelper.cs index 2f94ec635ae..36f0433d7f3 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SecurityHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SecurityHelper.cs @@ -111,7 +111,7 @@ internal static int MapUrlToZoneWrapper(Uri uri) // if (targetZone < 0) { - throw new SecurityException( SR.Get(SRID.Invalid_URI) ); + throw new SecurityException( SR.Invalid_URI ); } pSec = null; curSecMgr = null; diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SequentialUshortCollection.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SequentialUshortCollection.cs index 4f81b704cfa..0459f8d774a 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SequentialUshortCollection.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/SequentialUshortCollection.cs @@ -24,7 +24,6 @@ using System.Runtime.InteropServices; using SR=MS.Internal.PresentationCore.SR; -using SRID=MS.Internal.PresentationCore.SRID; namespace MS.Internal { @@ -61,7 +60,7 @@ public void CopyTo(ushort[] array, int arrayIndex) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // The extra "arrayIndex >= array.Length" check in because even if _collection.Count diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalList.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalList.cs index 3b6e7a5c7cd..aed26fe66df 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalList.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Utility/FrugalList.cs @@ -14,7 +14,6 @@ //using MS.Internal.PresentationCore; //using SR=MS.Internal.WindowsBase.SR; -//using SRID=MS.Internal.WindowsBase.SRID; // These classes implement a frugal storage model for lists of type . // Performance measurements show that Avalon has many lists that contain diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimatableTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimatableTemplate.cs index 30030c17da3..dc412fed0dd 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimatableTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimatableTemplate.cs @@ -82,7 +82,6 @@ public override void Go(ResourceModel resourceModel) using System.Windows.Media.Composition; using SR = MS.Internal.PresentationCore.SR; - using SRID = MS.Internal.PresentationCore.SRID; namespace [[instance.Namespace]] { diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationBaseTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationBaseTemplate.cs index f968bc9e5a8..3151c98211c 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationBaseTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationBaseTemplate.cs @@ -73,7 +73,6 @@ public override void Go(ResourceModel resourceModel) string sridReference = [[inline]] using SR=System.Windows.SR; - using SRID=System.Windows.SRID; [[/inline]]; // Duplicate AnimatedTypeHelpers class across Core/Framework causes name conflicts, @@ -85,7 +84,6 @@ public override void Go(ResourceModel resourceModel) sridReference = [[inline]] using SR=MS.Internal.PresentationCore.SR; - using SRID=MS.Internal.PresentationCore.SRID; [[/inline]]; break; case "Framework": @@ -344,8 +342,8 @@ private string WriteTypedGetCurrentValueBody(AnimationBaseTemplateInstance insta if (!AnimatedTypeHelpers.IsValidAnimationValue[[instance.TypeName]](defaultDestinationValue)) { throw new ArgumentException( - SR.Get( - SRID.Animation_InvalidBaseValue, + SR.Format( + SR.Animation_InvalidBaseValue, defaultDestinationValue, defaultDestinationValue.GetType(), GetType()), diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationTemplate.cs index 0ace82c9934..f3171bb889a 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationTemplate.cs @@ -431,8 +431,8 @@ protected override [[instance.TypeName]] GetCurrentValueCore([[instance.TypeName && !AnimatedTypeHelpers.IsValidAnimationValue[[instance.TypeName]](defaultOriginValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "origin", defaultOriginValue.ToString(CultureInfo.InvariantCulture))); @@ -442,8 +442,8 @@ protected override [[instance.TypeName]] GetCurrentValueCore([[instance.TypeName && !AnimatedTypeHelpers.IsValidAnimationValue[[instance.TypeName]](defaultDestinationValue)) { throw new InvalidOperationException( - SR.Get( - SRID.Animation_Invalid_DefaultValue, + SR.Format( + SR.Animation_Invalid_DefaultValue, this.GetType(), "destination", defaultDestinationValue.ToString(CultureInfo.InvariantCulture))); diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationUsingKeyFramesTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationUsingKeyFramesTemplate.cs index 4f22674188c..18af0f6b99b 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationUsingKeyFramesTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/AnimationUsingKeyFramesTemplate.cs @@ -71,7 +71,6 @@ public override void Go(ResourceModel resourceModel) string sridReference = [[inline]] using SR=System.Windows.SR; - using SRID=System.Windows.SRID; [[/inline]]; // Duplicate AnimatedTypeHelpers class across Core/Framework causes name conflicts, @@ -83,7 +82,6 @@ public override void Go(ResourceModel resourceModel) sridReference = [[inline]] using SR=MS.Internal.PresentationCore.SR; - using SRID=MS.Internal.PresentationCore.SRID; [[/inline]]; break; case "Framework": @@ -326,7 +324,7 @@ protected virtual void AddChild(object child) } else { - throw new ArgumentException(SR.Get(SRID.Animation_ChildMustBeKeyFrame), "child"); + throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child"); } } @@ -379,7 +377,7 @@ void IAddChild.AddText(string childText) [EditorBrowsable(EditorBrowsableState.Advanced)] protected virtual void AddText(string childText) { - throw new InvalidOperationException(SR.Get(SRID.Animation_NoTextChildren)); + throw new InvalidOperationException(SR.Animation_NoTextChildren); } #endregion diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/Elements.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/Elements.cs index 93503dde0b2..2c3f15865ba 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/Elements.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/Elements.cs @@ -416,7 +416,7 @@ public void AddHandler( if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } EnsureEventHandlersStore(); @@ -477,7 +477,7 @@ public void RemoveHandler(RoutedEvent routedEvent, Delegate handler) if (!routedEvent.IsLegalHandler(handler)) { - throw new ArgumentException(SR.Get(SRID.HandlerTypeIllegal)); + throw new ArgumentException(SR.HandlerTypeIllegal); } EventHandlersStore store = EventHandlersStore; diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/FrameworkElementTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/FrameworkElementTemplate.cs index 29df84719a0..5332d9ba0fa 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/FrameworkElementTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/FrameworkElementTemplate.cs @@ -90,7 +90,6 @@ public override void Go(ResourceModel resourceModel) using System.Windows.Markup; using SR=System.Windows.SR; - using SRID=System.Windows.SRID; namespace [[instance.ClassNamespace]] { @@ -141,7 +140,7 @@ public void RegisterName(string name, object scopedElement) } else { - throw new InvalidOperationException(SR.Get(SRID.NameScopeNotFound, name, "register")); + throw new InvalidOperationException(SR.Format(SR.NameScopeNotFound, name, "register")); } } @@ -159,7 +158,7 @@ public void UnregisterName(string name) } else { - throw new InvalidOperationException(SR.Get(SRID.NameScopeNotFound, name, "unregister")); + throw new InvalidOperationException(SR.Format(SR.NameScopeNotFound, name, "unregister")); } } @@ -262,7 +261,7 @@ protected internal void AddLogicalChild(object child) // might be iterating during a property invalidation tree walk. if (IsLogicalChildrenIterationInProgress) { - throw new InvalidOperationException(SR.Get(SRID.CannotModifyLogicalChildrenDuringTreeWalk)); + throw new InvalidOperationException(SR.CannotModifyLogicalChildrenDuringTreeWalk); } // Now that the child is going to be added, the FE/FCE construction is considered finished, @@ -310,7 +309,7 @@ protected internal void RemoveLogicalChild(object child) // might be iterating during a property invalidation tree walk. if (IsLogicalChildrenIterationInProgress) { - throw new InvalidOperationException(SR.Get(SRID.CannotModifyLogicalChildrenDuringTreeWalk)); + throw new InvalidOperationException(SR.CannotModifyLogicalChildrenDuringTreeWalk); } // Child is present @@ -373,13 +372,13 @@ internal void ChangeLogicalParent(DependencyObject newParent) // This mitigates illegal tree state caused by logical child stealing if (_parent != null && newParent != null && _parent != newParent) { - throw new System.InvalidOperationException(SR.Get(SRID.HasLogicalParent)); + throw new System.InvalidOperationException(SR.HasLogicalParent); } // Trivial check to avoid loops if (newParent == this) { - throw new System.InvalidOperationException(SR.Get(SRID.CannotBeSelfParent)); + throw new System.InvalidOperationException(SR.CannotBeSelfParent); } // invalid during a VisualTreeChanged event @@ -723,7 +722,7 @@ internal void UpdateStyleProperty() } else { - throw new InvalidOperationException(SR.Get(SRID.CyclicStyleReferenceDetected, this)); + throw new InvalidOperationException(SR.Format(SR.CyclicStyleReferenceDetected, this)); } } } @@ -777,7 +776,7 @@ internal void UpdateThemeStyleProperty() } else { - throw new InvalidOperationException(SR.Get(SRID.CyclicThemeStyleReferenceDetected, this)); + throw new InvalidOperationException(SR.Format(SR.CyclicThemeStyleReferenceDetected, this)); } } diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/IAnimatableHelper.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/IAnimatableHelper.cs index e5487e4571b..e57fa1186ad 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/IAnimatableHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/IAnimatableHelper.cs @@ -80,7 +80,7 @@ public void ApplyAnimationClock( if (!AnimationStorage.IsPropertyAnimatable(this, dp)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); + throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); #pragma warning restore 56506 } @@ -88,18 +88,18 @@ public void ApplyAnimationClock( && !AnimationStorage.IsAnimationValid(dp, clock.Timeline)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); + throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); #pragma warning restore 56506 } if (!HandoffBehaviorEnum.IsDefined(handoffBehavior)) { - throw new ArgumentException(SR.Get(SRID.Animation_UnrecognizedHandoffBehavior)); + throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); } if (IsSealed) { - throw new InvalidOperationException(SR.Get(SRID.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); + throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); } AnimationStorage.ApplyAnimationClock(this, dp, clock, handoffBehavior); @@ -152,24 +152,24 @@ public void BeginAnimation(DependencyProperty dp, AnimationTimeline animation, H if (!AnimationStorage.IsPropertyAnimatable(this, dp)) { #pragma warning disable 56506 // Suppress presharp warning: Parameter 'dp' to this public method must be validated: A null-dereference can occur here. - throw new ArgumentException(SR.Get(SRID.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); + throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); #pragma warning restore 56506 } if ( animation != null && !AnimationStorage.IsAnimationValid(dp, animation)) { - throw new ArgumentException(SR.Get(SRID.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); + throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); } if (!HandoffBehaviorEnum.IsDefined(handoffBehavior)) { - throw new ArgumentException(SR.Get(SRID.Animation_UnrecognizedHandoffBehavior)); + throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); } if (IsSealed) { - throw new InvalidOperationException(SR.Get(SRID.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); + throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); } AnimationStorage.BeginAnimation(this, dp, animation, handoffBehavior); diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedEnum.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedEnum.cs index 8ee71d13ad0..cbce7249f35 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedEnum.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedEnum.cs @@ -142,10 +142,8 @@ void WriteEnumHeader(FileCodeSink enumFile, McgEnum enumType, string fileName) [[inline]] #if PRESENTATION_CORE using SR=MS.Internal.PresentationCore.SR; - using SRID=MS.Internal.PresentationCore.SRID; #else using SR=System.Windows.SR; - using SRID=System.Windows.SRID; #endif [[/inline]] ); diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedResource.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedResource.cs index 13f49c404df..0f1bf0fb35c 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedResource.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedResource.cs @@ -2791,7 +2791,7 @@ public static string WriteToInstanceDescriptor(McgResource resource) [[inline]] if (!CanFreeze) { - throw new NotSupportedException(SR.Get(SRID.Converter_ConvertToNotSupported)); + throw new NotSupportedException(SR.Converter_ConvertToNotSupported); } [[/inline]] ); diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedStruct.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedStruct.cs index 2008d436c85..349a7e079e2 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedStruct.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/ManagedStruct.cs @@ -732,7 +732,7 @@ private void WriteTypeConverter(McgResource resource) { if (!(context.Instance is [[resource.Name]])) { - throw new ArgumentException(SR.Get(SRID.General_Expected_Type, "[[resource.Name]]"), "context"); + throw new ArgumentException(SR.Format(SR.General_Expected_Type, "[[resource.Name]]"), "context"); } [[resource.Name]] value = ([[resource.Name]])context.Instance; @@ -754,7 +754,7 @@ private void WriteTypeConverter(McgResource resource) #pragma warning suppress 6506 // instance is obviously not null if (!instance.CanSerializeToString()) { - throw new NotSupportedException(SR.Get(SRID.Converter_ConvertToNotSupported)); + throw new NotSupportedException(SR.Converter_ConvertToNotSupported); } } diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/PolySegmentTemplate.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/PolySegmentTemplate.cs index 079e41def50..87f414383d7 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/PolySegmentTemplate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/PolySegmentTemplate.cs @@ -87,7 +87,6 @@ public override void Go(ResourceModel resourceModel) using System.Security; using SR=MS.Internal.PresentationCore.SR; - using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/renderdata.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/renderdata.cs index d80d66691f7..a1d05cb3c71 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/renderdata.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/generators/renderdata.cs @@ -1944,7 +1944,7 @@ private static string WritePopCheck() [[inline]] if (_stackDepth <= 0) { - throw new InvalidOperationException(SR.Get(SRID.DrawingContext_TooManyPops)); + throw new InvalidOperationException(SR.DrawingContext_TooManyPops); } [[/inline]] ); diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CollectionHelper.cs b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CollectionHelper.cs index bc74900f8ca..77558e6427a 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CollectionHelper.cs +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/helpers/CollectionHelper.cs @@ -241,7 +241,7 @@ public static string Collection_CheckAllNotNullAndFirePropertyChanged(McgResourc { if (item == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } OnFreezablePropertyChanged(/* oldValue = */ null, item); [[onInsert]] @@ -294,7 +294,7 @@ public static string Collection_CheckNullInsert(McgResource resource, string val [[inline]] if ([[value]] == null) { - throw new System.ArgumentException(SR.Get(SRID.Collection_NoNull)); + throw new System.ArgumentException(SR.Collection_NoNull); } [[/inline]]; } @@ -367,7 +367,7 @@ void ICollection.CopyTo(Array array, int index) if (array.Rank != 1) { - throw new ArgumentException(SR.Get(SRID.Collection_BadRank)); + throw new ArgumentException(SR.Collection_BadRank); } // Elsewhere in the collection we throw an AE when the type is @@ -382,7 +382,7 @@ void ICollection.CopyTo(Array array, int index) } catch (InvalidCastException e) { - throw new ArgumentException(SR.Get(SRID.Collection_BadDestArray, this.GetType().Name), e); + throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); } } [[/inline]]; @@ -724,7 +724,7 @@ public bool MoveNext() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -742,7 +742,7 @@ public void Reset() } else { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_CollectionChanged)); + throw new InvalidOperationException(SR.Enumerator_CollectionChanged); } } @@ -776,12 +776,12 @@ public [[type]] Current } else if (_index == -1) { - throw new InvalidOperationException(SR.Get(SRID.Enumerator_NotStarted)); + throw new InvalidOperationException(SR.Enumerator_NotStarted); } else { Debug.Assert(_index == -2, "expected -2, got " + _index + "\n"); - throw new InvalidOperationException(SR.Get(SRID.Enumerator_ReachedEnd)); + throw new InvalidOperationException(SR.Enumerator_ReachedEnd); } } } @@ -1179,7 +1179,7 @@ private [[type]] Cast(object value) if (!(value is [[type]])) { - throw new System.ArgumentException(SR.Get(SRID.Collection_BadType, this.GetType().Name, value.GetType().Name, "[[type]]")); + throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "[[type]]")); } return ([[type]]) value; diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/xml/Elements.xml b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/xml/Elements.xml index ff01668e2ad..26568f774e3 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/xml/Elements.xml +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/xml/Elements.xml @@ -99,16 +99,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/xml/Resource.xml b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/xml/Resource.xml index 68bbccc5733..15546cb2224 100644 --- a/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/xml/Resource.xml +++ b/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/xml/Resource.xml @@ -2326,7 +2326,6 @@ - @@ -2730,7 +2729,6 @@ - @@ -2893,7 +2891,6 @@ -