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 4a5b428a098..3f152a34a55 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
@@ -359,7 +359,7 @@ public void Dispose()
///
public void AddHook(HwndSourceHook hook)
{
- Verify.IsNotNull(hook, "hook");
+ ArgumentNullException.ThrowIfNull(hook, nameof(hook));
CheckDisposed(true);
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj
index 5ffebd18529..482d8fe0b69 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/PresentationFramework.csproj
@@ -1315,7 +1315,6 @@
-
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/Strings.resx b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/Strings.resx
index bc3332c3dc9..b811827ee20 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/Strings.resx
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/Strings.resx
@@ -3834,6 +3834,12 @@ Do you want to replace it?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.
+
+ This operation requires the thread's apartment state to be '{0}'.
+
+
+ No file exists at '{0}'.
+
This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.cs.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.cs.xlf
index 4624ca73dfb..2c31a96de5a 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.cs.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.cs.xlf
@@ -6272,6 +6272,16 @@ Chcete ho nahradit?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.Konverze prováděná funkcí ValueSerializer se nezdařila, protože nebyl dodán kontext IValueSerializerContext {0}.
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ Tato operace vyžaduje, aby stav vlákna modelu apartment byl {0}.
+
+
+
+ No file exists at '{0}'.
+ V {0} neexistuje žádný soubor.
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.de.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.de.xlf
index 84ab6fd3d39..df5015099fd 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.de.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.de.xlf
@@ -6272,6 +6272,16 @@ Möchten Sie das Element ersetzen?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.Fehler beim Konvertieren durch "ValueSerializer", da "{0}" nicht für "IValueSerializerContext" bereitgestellt wurde.
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ Für diesen Vorgang muss der Apartmentzustand des Threads "{0}" sein.
+
+
+
+ No file exists at '{0}'.
+ Unter "{0}" sind keine Dateien vorhanden.
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.es.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.es.xlf
index 096ede01734..a6dc8010626 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.es.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.es.xlf
@@ -6272,6 +6272,16 @@ Do you want to replace it?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.Error de conversión mediante ValueSerializer porque IValueSerializerContext no se proporcionó '{0}'.
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ Esta operación requiere que el estado del apartamento del subproceso sea "{0}".
+
+
+
+ No file exists at '{0}'.
+ No hay ningún archivo en "{0}".
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.fr.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.fr.xlf
index 6729539463d..3b35c4e6d40 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.fr.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.fr.xlf
@@ -6272,6 +6272,16 @@ Voulez-vous le remplacer ?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.Échec de la conversion par un ValueSerializer parce que le IValueSerializerContext n'était pas fourni '{0}'.
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ Pour cette opération, l'état de cloisonnement du thread doit être '{0}'.
+
+
+
+ No file exists at '{0}'.
+ Aucun fichier n'existe à l'emplacement '{0}'.
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.it.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.it.xlf
index 99b0f744e8f..bab20767494 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.it.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.it.xlf
@@ -6267,6 +6267,16 @@ Sostituirlo?
'{0}' is not a valid value for this property. Valid values are from Int32.MinValue through Int32.MaxValue.'{0}' non è un valore valido per questa proprietà. I valori validi sono compresi nell'intervallo da Int32.MinValue a Int32.MaxValue.
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ Questa operazione richiede che lo stato dell'apartment del thread sia '{0}'.
+
+
+
+ No file exists at '{0}'.
+ Non esiste alcun file in '{0}'.
+ Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ja.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ja.xlf
index 08915578b59..f962153a4ab 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ja.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ja.xlf
@@ -6272,6 +6272,16 @@ Do you want to replace it?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.IValueSerializerContext に '{0}' が提供されないため、ValueSerializer による変換に失敗しました。
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ この操作を実行するには、スレッドのアパートメント状態が '{0}' である必要があります。
+
+
+
+ No file exists at '{0}'.
+ '{0}' にファイルがありません。
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ko.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ko.xlf
index 7b048a21d95..7bcf49edd63 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ko.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ko.xlf
@@ -6272,6 +6272,16 @@ Do you want to replace it?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.IValueSerializerContext에 '{0}'이(가) 제공되지 않아 ValueSerializer에서 변환에 실패했습니다.
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ 이 작업을 수행하려면 스레드의 아파트가 '{0}' 상태여야 합니다.
+
+
+
+ No file exists at '{0}'.
+ '{0}'에 파일이 없습니다.
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.pl.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.pl.xlf
index 29d5a111f84..562a56f7da4 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.pl.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.pl.xlf
@@ -6272,6 +6272,16 @@ Czy chcesz go zastąpić?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.Konwersja według ValueSerializer nie powiodła się, ponieważ nie dostarczono IValueSerializerContext „{0}”.
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ Ta operacja wymaga stanu apartamentu wątku „{0}”.
+
+
+
+ No file exists at '{0}'.
+ Żaden plik nie istnieje w „{0}”.
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.pt-BR.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.pt-BR.xlf
index 21df203b6f8..04cd90e5f7b 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.pt-BR.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.pt-BR.xlf
@@ -6272,6 +6272,16 @@ Deseja substituí-lo?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.Falha na conversão executada por ValueSerializer porque IValueSerializerContext não foi fornecido '{0}'.
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ Esta operação exige que o estado do apartment do thread seja '{0}'.
+
+
+
+ No file exists at '{0}'.
+ Não existe arquivo em '{0}'.
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ru.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ru.xlf
index f59c152a90b..b5f4e449578 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ru.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.ru.xlf
@@ -6272,6 +6272,16 @@ Do you want to replace it?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.Преобразование с помощью ValueSerializer не удалось, так как для IValueSerializerContext не было задано значение "{0}".
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ Эта операция требует, чтобы подразделение потока находилось в состоянии "{0}".
+
+
+
+ No file exists at '{0}'.
+ Файл не существует в "{0}".
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.tr.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.tr.xlf
index bd590be4cce..14171e97735 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.tr.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.tr.xlf
@@ -6272,6 +6272,16 @@ Değiştirmek istiyor musunuz?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.IValueSerializerContext için '{0}' sağlanmadığından, ValueSerializer temelinde dönüştürme yapılamadı.
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ Bu işlem iş parçacığı grup durumunun '{0}' olmasını gerektirir.
+
+
+
+ No file exists at '{0}'.
+ '{0}' konumunda dosya yok.
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.zh-Hans.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.zh-Hans.xlf
index 26805f30597..41a0b6625a8 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.zh-Hans.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.zh-Hans.xlf
@@ -6277,6 +6277,16 @@ Do you want to replace it?
This collection does not support changing values with specific indexes.此集合不支持更改具有特定索引的值。
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ 此操作要求线程的单元状态为“{0}”。
+
+
+
+ No file exists at '{0}'.
+ “{0}”处没有文件。
+ The collection cannot be modified.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.zh-Hant.xlf b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.zh-Hant.xlf
index 4831a672076..29f836a74c4 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.zh-Hant.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/Resources/xlf/Strings.zh-Hant.xlf
@@ -6272,6 +6272,16 @@ Do you want to replace it?
Conversion by a ValueSerializer failed because the IValueSerializerContext was not provided '{0}'.ValueSerializer 執行轉換失敗,因為 IValueSerializerContext 未提供 '{0}'。
+
+
+ This operation requires the thread's apartment state to be '{0}'.
+ 此作業需要執行緒的 Apartment 狀態為 '{0}'。
+
+
+
+ No file exists at '{0}'.
+ '{0}' 沒有任何檔案。
+ This collection does not support changing values with specific indexes.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/JumpList.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/JumpList.cs
index 7a444fb1276..47ed9d83b28 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/JumpList.cs
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/JumpList.cs
@@ -125,7 +125,13 @@ static JumpList()
///
public static void AddToRecentCategory(string itemPath)
{
- Verify.FileExists(itemPath, "itemPath");
+ ArgumentException.ThrowIfNullOrEmpty(itemPath, nameof(itemPath));
+
+ if (!File.Exists(itemPath))
+ {
+ throw new ArgumentException(SR.Format(SR.Verify_FileExists, itemPath), nameof(itemPath));
+ }
+
itemPath = Path.GetFullPath(itemPath);
NativeMethods2.SHAddToRecentDocs(itemPath);
}
@@ -138,7 +144,8 @@ public static void AddToRecentCategory(string itemPath)
///
public static void AddToRecentCategory(JumpPath jumpPath)
{
- Verify.IsNotNull(jumpPath, "jumpPath");
+ ArgumentNullException.ThrowIfNull(jumpPath, nameof(jumpPath));
+
AddToRecentCategory(jumpPath.Path);
}
@@ -150,7 +157,7 @@ public static void AddToRecentCategory(JumpPath jumpPath)
///
public static void AddToRecentCategory(JumpTask jumpTask)
{
- Verify.IsNotNull(jumpTask, "jumpTask");
+ ArgumentNullException.ThrowIfNull(jumpTask, nameof(jumpTask));
// SHAddToRecentDocs only allows IShellLinks in Windows 7 and later.
// Silently fail this if that's not the case.
@@ -212,7 +219,7 @@ public static void ReleaseShellObjects(List<_ShellObjectPair> list)
///
public static void SetJumpList(Application application, JumpList value)
{
- Verify.IsNotNull(application, "application");
+ ArgumentNullException.ThrowIfNull(application, nameof(application));
lock (s_lock)
{
@@ -238,7 +245,7 @@ public static void SetJumpList(Application application, JumpList value)
///
public static JumpList GetJumpList(Application application)
{
- Verify.IsNotNull(application, "application");
+ ArgumentNullException.ThrowIfNull(application, nameof(application));
JumpList value;
s_applicationMap.TryGetValue(application, out value);
@@ -443,7 +450,11 @@ private void ApplyFromApplication()
private void ApplyList()
{
Debug.Assert(_initializing == false);
- Verify.IsApartmentState(ApartmentState.STA);
+
+ if (Thread.CurrentThread.GetApartmentState() is not ApartmentState.STA)
+ {
+ throw new InvalidOperationException(SR.Format(SR.Verify_ApartmentState, ApartmentState.STA));
+ }
// We don't want to force applications to conditionally check this before constructing a JumpList,
// but if we're not on 7 then this isn't going to work. Fail fast.
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChrome.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChrome.cs
index e13f377b7b4..e0769edd863 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChrome.cs
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChrome.cs
@@ -85,19 +85,19 @@ private static void _OnChromeChanged(DependencyObject d, DependencyPropertyChang
chromeWorker.SetWindowChrome(newChrome);
}
- [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public static WindowChrome GetWindowChrome(Window window)
{
- Verify.IsNotNull(window, "window");
+ ArgumentNullException.ThrowIfNull(window, nameof(window));
+
return (WindowChrome)window.GetValue(WindowChromeProperty);
}
- [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public static void SetWindowChrome(Window window, WindowChrome chrome)
{
- Verify.IsNotNull(window, "window");
+ ArgumentNullException.ThrowIfNull(window, nameof(window));
+
window.SetValue(WindowChromeProperty, chrome);
}
@@ -107,30 +107,30 @@ public static void SetWindowChrome(Window window, WindowChrome chrome)
typeof(WindowChrome),
new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.Inherits));
- [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public static bool GetIsHitTestVisibleInChrome(IInputElement inputElement)
{
- Verify.IsNotNull(inputElement, "inputElement");
- var dobj = inputElement as DependencyObject;
- if (dobj == null)
+ ArgumentNullException.ThrowIfNull(inputElement, nameof(inputElement));
+
+ if (inputElement is not DependencyObject dependencyObject)
{
throw new ArgumentException("The element must be a DependencyObject", nameof(inputElement));
}
- return (bool)dobj.GetValue(IsHitTestVisibleInChromeProperty);
+
+ return (bool)dependencyObject.GetValue(IsHitTestVisibleInChromeProperty);
}
- [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public static void SetIsHitTestVisibleInChrome(IInputElement inputElement, bool hitTestVisible)
{
- Verify.IsNotNull(inputElement, "inputElement");
- var dobj = inputElement as DependencyObject;
- if (dobj == null)
+ ArgumentNullException.ThrowIfNull(inputElement, nameof(inputElement));
+
+ if (inputElement is not DependencyObject dependencyObject)
{
throw new ArgumentException("The element must be a DependencyObject", nameof(inputElement));
}
- dobj.SetValue(IsHitTestVisibleInChromeProperty, hitTestVisible);
+
+ dependencyObject.SetValue(IsHitTestVisibleInChromeProperty, hitTestVisible);
}
public static readonly DependencyProperty ResizeGripDirectionProperty = DependencyProperty.RegisterAttached(
@@ -139,30 +139,30 @@ public static void SetIsHitTestVisibleInChrome(IInputElement inputElement, bool
typeof(WindowChrome),
new FrameworkPropertyMetadata(ResizeGripDirection.None, FrameworkPropertyMetadataOptions.Inherits));
- [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public static ResizeGripDirection GetResizeGripDirection(IInputElement inputElement)
{
- Verify.IsNotNull(inputElement, "inputElement");
- var dobj = inputElement as DependencyObject;
- if (dobj == null)
+ ArgumentNullException.ThrowIfNull(inputElement, nameof(inputElement));
+
+ if (inputElement is not DependencyObject dependencyObject)
{
throw new ArgumentException("The element must be a DependencyObject", nameof(inputElement));
}
- return (ResizeGripDirection)dobj.GetValue(ResizeGripDirectionProperty);
+
+ return (ResizeGripDirection)dependencyObject.GetValue(ResizeGripDirectionProperty);
}
- [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public static void SetResizeGripDirection(IInputElement inputElement, ResizeGripDirection direction)
{
- Verify.IsNotNull(inputElement, "inputElement");
- var dobj = inputElement as DependencyObject;
- if (dobj == null)
+ ArgumentNullException.ThrowIfNull(inputElement, nameof(inputElement));
+
+ if (inputElement is not DependencyObject dependencyObject)
{
throw new ArgumentException("The element must be a DependencyObject", nameof(inputElement));
}
- dobj.SetValue(ResizeGripDirectionProperty, direction);
+
+ dependencyObject.SetValue(ResizeGripDirectionProperty, direction);
}
#endregion
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChromeWorker.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChromeWorker.cs
index 0e82cbb585b..32d9db5df83 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChromeWorker.cs
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Shell/WindowChromeWorker.cs
@@ -1,4 +1,4 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
@@ -200,14 +200,16 @@ private void _UnsetWindow(object sender, EventArgs e)
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public static WindowChromeWorker GetWindowChromeWorker(Window window)
{
- Verify.IsNotNull(window, "window");
+ ArgumentNullException.ThrowIfNull(window, nameof(window));
+
return (WindowChromeWorker)window.GetValue(WindowChromeWorkerProperty);
}
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public static void SetWindowChromeWorker(Window window, WindowChromeWorker chrome)
{
- Verify.IsNotNull(window, "window");
+ ArgumentNullException.ThrowIfNull(window, nameof(window));
+
window.SetValue(WindowChromeWorkerProperty, chrome);
}
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/NativeMethods.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/NativeMethods.cs
index 8f12e226b9b..70c69c78bc3 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/NativeMethods.cs
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/NativeMethods.cs
@@ -1544,76 +1544,6 @@ public static SafeGdiplusStartupToken Startup()
}
}
- internal sealed class SafeConnectionPointCookie : SafeHandleZeroOrMinusOneIsInvalid
- {
- private IConnectionPoint _cp;
- // handle holds the cookie value.
-
- [SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "IConnectionPoint")]
- public SafeConnectionPointCookie(IConnectionPointContainer target, object sink, Guid eventId)
- : base(true)
- {
- Verify.IsNotNull(target, "target");
- Verify.IsNotNull(sink, "sink");
- Verify.IsNotDefault(eventId, "eventId");
-
- handle = IntPtr.Zero;
-
- IConnectionPoint cp = null;
- try
- {
- int dwCookie;
- target.FindConnectionPoint(ref eventId, out cp);
- cp.Advise(sink, out dwCookie);
- if (dwCookie == 0)
- {
- throw new InvalidOperationException("IConnectionPoint::Advise returned an invalid cookie.");
- }
- handle = new IntPtr(dwCookie);
- _cp = cp;
- cp = null;
- }
- finally
- {
- Utility.SafeRelease(ref cp);
- }
- }
-
- public void Disconnect()
- {
- ReleaseHandle();
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
-
- protected override bool ReleaseHandle()
- {
- try
- {
- if (!this.IsInvalid)
- {
- int dwCookie = handle.ToInt32();
- handle = IntPtr.Zero;
-
- Assert.IsNotNull(_cp);
- try
- {
- _cp.Unadvise(dwCookie);
- }
- finally
- {
- Utility.SafeRelease(ref _cp);
- }
- }
- return true;
- }
- catch
- {
- return false;
- }
- }
- }
-
#endregion
#region Native Types
@@ -2889,21 +2819,6 @@ public static WM RegisterWindowMessage(string lpString)
return (WM)iRet;
}
- [DllImport("user32.dll", EntryPoint = "SetActiveWindow", SetLastError = true)]
- private static extern IntPtr _SetActiveWindow(IntPtr hWnd);
-
- public static IntPtr SetActiveWindow(IntPtr hwnd)
- {
- Verify.IsNotDefault(hwnd, "hwnd");
- IntPtr ret = _SetActiveWindow(hwnd);
- if (ret == IntPtr.Zero)
- {
- HRESULT.ThrowLastError();
- }
-
- return ret;
- }
-
// This is aliased as a macro in 32bit Windows.
public static IntPtr SetClassLongPtr(IntPtr hwnd, GCLP nIndex, IntPtr dwNewLong)
{
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Verify.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Verify.cs
deleted file mode 100644
index fcb6232a0b4..00000000000
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Standard/Verify.cs
+++ /dev/null
@@ -1,294 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-
-
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.IO;
-using System.Threading;
-
-// This file contains general utilities to aid in development.
-// Classes here generally shouldn't be exposed publicly since
-// they're not particular to any library functionality.
-// Because the classes here are internal, it's likely this file
-// might be included in multiple assemblies.
-
-namespace Standard
-{
- ///
- /// A static class for retail validated assertions.
- /// Instead of breaking into the debugger an exception is thrown.
- ///
- internal static class Verify
- {
- ///
- /// Ensure that the current thread's apartment state is what's expected.
- ///
- ///
- /// The required apartment state for the current thread.
- ///
- ///
- /// The message string for the exception to be thrown if the state is invalid.
- ///
- ///
- /// Thrown if the calling thread's apartment state is not the same as the requiredState.
- ///
- [DebuggerStepThrough]
- public static void IsApartmentState(ApartmentState requiredState, string message)
- {
- if (Thread.CurrentThread.GetApartmentState() != requiredState)
- {
- throw new InvalidOperationException(message);
- }
- }
-
- ///
- /// Ensure that an argument is neither null nor empty.
- ///
- /// The string to validate.
- /// The name of the parameter that will be presented if an exception is thrown.
- [SuppressMessage("Microsoft.Performance", "CA1820:TestForEmptyStringsUsingStringLength")]
- [DebuggerStepThrough]
- public static void IsNeitherNullNorEmpty(string value, string name)
- {
- // catch caller errors, mixing up the parameters. Name should never be empty.
- Assert.IsNeitherNullNorEmpty(name);
-
- // Notice that ArgumentNullException and ArgumentException take the parameters in opposite order :P
- const string errorMessage = "The parameter can not be either null or empty.";
- if (null == value)
- {
- throw new ArgumentNullException(name, errorMessage);
- }
- if ("" == value)
- {
- throw new ArgumentException(errorMessage, name);
- }
- }
-
- ///
- /// Ensure that an argument is neither null nor does it consist only of whitespace.
- ///
- /// The string to validate.
- /// The name of the parameter that will be presented if an exception is thrown.
- [SuppressMessage("Microsoft.Performance", "CA1820:TestForEmptyStringsUsingStringLength")]
- [DebuggerStepThrough]
- public static void IsNeitherNullNorWhitespace(string value, string name)
- {
- // catch caller errors, mixing up the parameters. Name should never be empty.
- Assert.IsNeitherNullNorEmpty(name);
-
- // Notice that ArgumentNullException and ArgumentException take the parameters in opposite order :P
- const string errorMessage = "The parameter can not be either null or empty or consist only of white space characters.";
- if (null == value)
- {
- throw new ArgumentNullException(name, errorMessage);
- }
- if ("" == value.Trim())
- {
- throw new ArgumentException(errorMessage, name);
- }
- }
-
- /// Verifies that an argument is not null.
- /// Type of the object to validate. Must be a class.
- /// The object to validate.
- /// The name of the parameter that will be presented if an exception is thrown.
- [DebuggerStepThrough]
- public static void IsNotDefault(T obj, string name) where T : struct
- {
- if (default(T).Equals(obj))
- {
- throw new ArgumentException("The parameter must not be the default value.", name);
- }
- }
-
- /// Verifies that an argument is not null.
- /// Type of the object to validate. Must be a class.
- /// The object to validate.
- /// The name of the parameter that will be presented if an exception is thrown.
- [DebuggerStepThrough]
- public static void IsNotNull(T obj, string name) where T : class
- {
- if (null == obj)
- {
- throw new ArgumentNullException(name);
- }
- }
-
- /// Verifies that an argument is null.
- /// Type of the object to validate. Must be a class.
- /// The object to validate.
- /// The name of the parameter that will be presented if an exception is thrown.
- [DebuggerStepThrough]
- public static void IsNull(T obj, string name) where T : class
- {
- if (null != obj)
- {
- throw new ArgumentException("The parameter must be null.", name);
- }
- }
-
- [DebuggerStepThrough]
- public static void PropertyIsNotNull(T obj, string name) where T : class
- {
- if (null == obj)
- {
- throw new InvalidOperationException($"The property {name} cannot be null at this time.");
- }
- }
-
- [DebuggerStepThrough]
- public static void PropertyIsNull(T obj, string name) where T : class
- {
- if (null != obj)
- {
- throw new InvalidOperationException($"The property {name} must be null at this time.");
- }
- }
-
- ///
- /// Verifies the specified statement is true. Throws an ArgumentException if it's not.
- ///
- /// The statement to be verified as true.
- /// Name of the parameter to include in the ArgumentException.
- [DebuggerStepThrough]
- public static void IsTrue(bool statement, string name)
- {
- if (!statement)
- {
- throw new ArgumentException("", name);
- }
- }
-
- ///
- /// Verifies the specified statement is true. Throws an ArgumentException if it's not.
- ///
- /// The statement to be verified as true.
- /// Name of the parameter to include in the ArgumentException.
- /// The message to include in the ArgumentException.
- [DebuggerStepThrough]
- public static void IsTrue(bool statement, string name, string message)
- {
- if (!statement)
- {
- throw new ArgumentException(message, name);
- }
- }
-
- [DebuggerStepThrough]
- public static void AreEqual(T expected, T actual, string parameterName, string message)
- {
- if (null == expected)
- {
- // Two nulls are considered equal, regardless of type semantics.
- if (null != actual && !actual.Equals(expected))
- {
- throw new ArgumentException(message, parameterName);
- }
- }
- else if (!expected.Equals(actual))
- {
- throw new ArgumentException(message, parameterName);
- }
- }
-
- [DebuggerStepThrough]
- public static void AreNotEqual(T notExpected, T actual, string parameterName, string message)
- {
- if (null == notExpected)
- {
- // Two nulls are considered equal, regardless of type semantics.
- if (null == actual || actual.Equals(notExpected))
- {
- throw new ArgumentException(message, parameterName);
- }
- }
- else if (notExpected.Equals(actual))
- {
- throw new ArgumentException(message, parameterName);
- }
- }
-
- [DebuggerStepThrough]
- public static void UriIsAbsolute(Uri uri, string parameterName)
- {
- Verify.IsNotNull(uri, parameterName);
- if (!uri.IsAbsoluteUri)
- {
- throw new ArgumentException("The URI must be absolute.", parameterName);
- }
- }
-
- ///
- /// Verifies that the specified value is within the expected range. The assertion fails if it isn't.
- ///
- /// The lower bound inclusive value.
- /// The value to verify.
- /// The upper bound exclusive value.
- [DebuggerStepThrough]
- public static void BoundedInteger(int lowerBoundInclusive, int value, int upperBoundExclusive, string parameterName)
- {
- if (value < lowerBoundInclusive || value >= upperBoundExclusive)
- {
- throw new ArgumentException(string.Create(CultureInfo.InvariantCulture, $"The integer value must be bounded with [{lowerBoundInclusive}, {upperBoundExclusive})"), parameterName);
- }
- }
-
- [DebuggerStepThrough]
- public static void BoundedDoubleInc(double lowerBoundInclusive, double value, double upperBoundInclusive, string message, string parameter)
- {
- if (value < lowerBoundInclusive || value > upperBoundInclusive)
- {
- throw new ArgumentException(message, parameter);
- }
- }
-
- [DebuggerStepThrough]
- public static void TypeSupportsInterface(Type type, Type interfaceType, string parameterName)
- {
- Assert.IsNeitherNullNorEmpty(parameterName);
- Verify.IsNotNull(type, "type");
- Verify.IsNotNull(interfaceType, "interfaceType");
-
- if (type.GetInterface(interfaceType.Name) == null)
- {
- throw new ArgumentException("The type of this parameter does not support a required interface", parameterName);
- }
- }
-
- [DebuggerStepThrough]
- public static void FileExists(string filePath, string parameterName)
- {
- Verify.IsNeitherNullNorEmpty(filePath, parameterName);
- if (!File.Exists(filePath))
- {
- throw new ArgumentException($"No file exists at \"{filePath}\"", parameterName);
- }
- }
-
- [DebuggerStepThrough]
- internal static void ImplementsInterface(object parameter, Type interfaceType, string parameterName)
- {
- Assert.IsNotNull(parameter);
- Assert.IsNotNull(interfaceType);
- Assert.IsTrue(interfaceType.IsInterface);
-
- bool isImplemented = false;
- foreach (var ifaceType in parameter.GetType().GetInterfaces())
- {
- if (ifaceType == interfaceType)
- {
- isImplemented = true;
- break;
- }
- }
-
- if (!isImplemented)
- {
- throw new ArgumentException($"The parameter must implement interface {interfaceType}.", parameterName);
- }
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemCommands.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemCommands.cs
index 1b0df57f6d7..2cedafc67cb 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemCommands.cs
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/SystemCommands.cs
@@ -1,4 +1,4 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
@@ -38,25 +38,29 @@ private static void _PostSystemCommand(Window window, SC command)
public static void CloseWindow(Window window)
{
- Verify.IsNotNull(window, "window");
+ ArgumentNullException.ThrowIfNull(window, nameof(window));
+
_PostSystemCommand(window, SC.CLOSE);
}
public static void MaximizeWindow(Window window)
{
- Verify.IsNotNull(window, "window");
+ ArgumentNullException.ThrowIfNull(window, nameof(window));
+
_PostSystemCommand(window, SC.MAXIMIZE);
}
public static void MinimizeWindow(Window window)
{
- Verify.IsNotNull(window, "window");
+ ArgumentNullException.ThrowIfNull(window, nameof(window));
+
_PostSystemCommand(window, SC.MINIMIZE);
}
public static void RestoreWindow(Window window)
{
- Verify.IsNotNull(window, "window");
+ ArgumentNullException.ThrowIfNull(window, nameof(window));
+
_PostSystemCommand(window, SC.RESTORE);
}
@@ -64,7 +68,8 @@ public static void RestoreWindow(Window window)
/// The location to display the system menu, in logical screen coordinates.
public static void ShowSystemMenu(Window window, Point screenLocation)
{
- Verify.IsNotNull(window, "window");
+ ArgumentNullException.ThrowIfNull(window, nameof(window));
+
DpiScale dpi = window.GetDpi();
ShowSystemMenuPhysicalCoordinates(window, DpiHelper.LogicalPixelsToDevice(screenLocation, dpi.DpiScaleX, dpi.DpiScaleY));
}
@@ -75,7 +80,8 @@ internal static void ShowSystemMenuPhysicalCoordinates(Window window, Point phys
const uint TPM_LEFTBUTTON = 0x0;
const uint TPM_RIGHTBUTTON = 0x2;
- Verify.IsNotNull(window, "window");
+ ArgumentNullException.ThrowIfNull(window, nameof(window));
+
IntPtr hwnd = new WindowInteropHelper(window).Handle;
if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd))
{
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/ManipulationProcessor2D.cs b/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/ManipulationProcessor2D.cs
index 4c4d195ccd0..30ba3776a57 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/ManipulationProcessor2D.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Windows.Input.Manipulations/System/Windows/Input/Manipulations/ManipulationProcessor2D.cs
@@ -1,4 +1,4 @@
-// Licensed to the .NET Foundation under one or more agreements.
+// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
@@ -306,8 +306,7 @@ public void CompleteManipulation(Int64 timestamp)
/// Set parameters on the manipulation processor.
///
/// Parameters to set.
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification="The parameter gets verified."),
- EditorBrowsable(EditorBrowsableState.Never)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
public void SetParameters(ManipulationParameters2D parameters)
{
ArgumentNullException.ThrowIfNull(parameters);
diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/Verify.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/Verify.cs
deleted file mode 100644
index 7fd16a886af..00000000000
--- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/Verify.cs
+++ /dev/null
@@ -1,122 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Threading;
-using System.IO;
-
-namespace MS.Internal
-{
- ///
- /// A static class for retail validated assertions.
- /// Instead of breaking into the debugger an exception is thrown.
- ///
- internal static class Verify
- {
- ///
- /// Ensure that the current thread's apartment state is what's expected.
- ///
- ///
- /// The required apartment state for the current thread.
- ///
- ///
- /// The message string for the exception to be thrown if the state is invalid.
- ///
- ///
- /// Thrown if the calling thread's apartment state is not the same as the requiredState.
- ///
- public static void IsApartmentState(ApartmentState requiredState)
- {
- if (Thread.CurrentThread.GetApartmentState() != requiredState)
- {
- throw new InvalidOperationException(SR.Format(SR.Verify_ApartmentState, requiredState));
- }
- }
-
- ///
- /// Ensure that an argument is neither null nor empty.
- ///
- /// The string to validate.
- /// The name of the parameter that will be presented if an exception is thrown.
- public static void IsNeitherNullNorEmpty(string value, string name)
- {
- // catch caller errors, mixing up the parameters. Name should never be empty.
- Debug.Assert(!string.IsNullOrEmpty(name));
-
- // Notice that ArgumentNullException and ArgumentException take the parameters in opposite order :P
- if (value == null)
- {
- throw new ArgumentNullException(name, SR.Verify_NeitherNullNorEmpty);
- }
- if (value == "")
- {
- throw new ArgumentException(SR.Verify_NeitherNullNorEmpty, name);
- }
- }
-
- /// Verifies that an argument is not null.
- /// Type of the object to validate. Must be a class.
- /// The object to validate.
- /// The name of the parameter that will be presented if an exception is thrown.
- public static void IsNotNull(T obj, string name) where T : class
- {
- if (obj == null)
- {
- throw new ArgumentNullException(name);
- }
- }
-
- ///
- /// Verifies the specified expression is true. Throws an ArgumentException if it's not.
- ///
- /// The expression to be verified as true.
- /// Name of the parameter to include in the ArgumentException.
- /// The message to include in the ArgumentException.
- public static void IsTrue(bool expression, string name, string message)
- {
- if (!expression)
- {
- throw new ArgumentException(message, name);
- }
- }
-
- ///
- /// Verifies two values are not equal to each other. Throws an ArgumentException if they are.
- ///
- /// The actual value.
- /// The value that 'actual' should not be.
- /// The name to display for 'actual' in the exception if this test fails.
- /// The message to include in the ArgumentException.
- public static void AreNotEqual(T actual, T notExpected, string parameterName, string message)
- {
- if (notExpected == null)
- {
- // Two nulls are considered equal, regardless of type semantics.
- if (actual == null || actual.Equals(notExpected))
- {
- throw new ArgumentException(SR.Format(SR.Verify_AreNotEqual, notExpected), parameterName);
- }
- }
- else if (notExpected.Equals(actual))
- {
- throw new ArgumentException(SR.Format(SR.Verify_AreNotEqual, notExpected), parameterName);
- }
- }
-
- ///
- /// Verifies the specified file exists. Throws an ArgumentException if it doesn't.
- ///
- /// The file path to check for existence.
- /// Name of the parameter to include in the ArgumentException.
- /// This method demands FileIOPermission(FileIOPermissionAccess.PathDiscovery)
- public static void FileExists(string filePath, string parameterName)
- {
- Verify.IsNeitherNullNorEmpty(filePath, parameterName);
-
- if (!File.Exists(filePath))
- {
- throw new ArgumentException(SR.Format(SR.Verify_FileExists, filePath), parameterName);
- }
- }
- }
-}
-
diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/Resources/Strings.resx b/src/Microsoft.DotNet.Wpf/src/WindowsBase/Resources/Strings.resx
index 928035b3159..7b85b341783 100644
--- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/Resources/Strings.resx
+++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/Resources/Strings.resx
@@ -1704,18 +1704,6 @@
'{0}' must be of type '{1}'.
-
- This operation requires the thread's apartment state to be '{0}'.
-
-
- The argument can neither be null nor empty.
-
-
- The argument can not be equal to '{0}'.
-
-
- No file exists at '{0}'.
-
Event argument is invalid.
diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/Resources/xlf/Strings.cs.xlf b/src/Microsoft.DotNet.Wpf/src/WindowsBase/Resources/xlf/Strings.cs.xlf
index 192ea0623f9..4e24c772acd 100644
--- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/Resources/xlf/Strings.cs.xlf
+++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/Resources/xlf/Strings.cs.xlf
@@ -2502,26 +2502,6 @@
Volající vlákno nemá přístup k tomuto objektu, protože jej vlastní jiné vlákno.
-
- This operation requires the thread's apartment state to be '{0}'.
- Tato operace vyžaduje, aby stav vlákna modelu apartment byl {0}.
-
-
-
- The argument can not be equal to '{0}'.
- Argument se nemůže rovnat {0}.
-
-
-
- No file exists at '{0}'.
- V {0} neexistuje žádný soubor.
-
-
-
- The argument can neither be null nor empty.
- Argument nemůže být null ani prázdný.
-
- Major and minor version number components cannot be negative.Součásti čísla hlavní verze a podverze nemůžou být záporné.
@@ -2774,4 +2754,4 @@