diff --git a/src/VisualStudio/Core/Def/Implementation/ChangeSignature/AddParameterDialogViewModel.cs b/src/VisualStudio/Core/Def/Implementation/ChangeSignature/AddParameterDialogViewModel.cs
index 629a4e822facba949d397c58be6636941811cae2..31937b0e3df1d56b2c50a8e72eee8996fc18a3c2 100644
--- a/src/VisualStudio/Core/Def/Implementation/ChangeSignature/AddParameterDialogViewModel.cs
+++ b/src/VisualStudio/Core/Def/Implementation/ChangeSignature/AddParameterDialogViewModel.cs
@@ -141,6 +141,18 @@ internal bool TrySubmit()
return false;
}
+ if (IsCallsiteRegularValue && CallSiteValue.IsNullOrWhiteSpace())
+ {
+ SendFailureNotification(ServicesVSResources.Enter_a_call_site_value_or_choose_a_different_value_injection_kind);
+ return false;
+ }
+
+ if (IsOptional && DefaultValue.IsNullOrWhiteSpace())
+ {
+ SendFailureNotification(ServicesVSResources.Optional_parameters_must_provide_a_default_value);
+ return false;
+ }
+
return true;
}
diff --git a/src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureDialog.xaml.cs b/src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureDialog.xaml.cs
index 94435f10b9f3580867faae56f8b44b164aa5e70e..e7baae65a4d25e3e3bbf8b394d618d8c59c50c60 100644
--- a/src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureDialog.xaml.cs
+++ b/src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureDialog.xaml.cs
@@ -139,9 +139,9 @@ private void Add_Click(object sender, RoutedEventArgs e)
addParameterViewModel.TypeSymbol,
addParameterViewModel.TypeName,
addParameterViewModel.ParameterName,
- addParameterViewModel.CallSiteValue,
+ (addParameterViewModel.IsCallsiteOmitted || addParameterViewModel.IsCallsiteTodo) ? "" : addParameterViewModel.CallSiteValue,
addParameterViewModel.IsRequired,
- addParameterViewModel.DefaultValue,
+ addParameterViewModel.IsRequired ? "" : addParameterViewModel.DefaultValue,
addParameterViewModel.UseNamedArguments,
addParameterViewModel.IsCallsiteOmitted,
addParameterViewModel.IsCallsiteTodo,
diff --git a/src/VisualStudio/Core/Def/ServicesVSResources.resx b/src/VisualStudio/Core/Def/ServicesVSResources.resx
index 74e9515fc1f85c5235acbdc7b714cad2221906fd..fe1745c396327c01296d8970cf10e12c9a55bf13 100644
--- a/src/VisualStudio/Core/Def/ServicesVSResources.resx
+++ b/src/VisualStudio/Core/Def/ServicesVSResources.resx
@@ -1469,4 +1469,10 @@ I agree to all of the foregoing:
Please enter a type name"Type" is the programming language concept
+
+ Enter a call site value or choose a different value injection kind
+
+
+ Optional parameters must provide a default value
+
\ No newline at end of file
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
index 6da37764cfd35626310a2b01c212d1e737f2731a..745a20f80cc373abdd62c794bf282c0e1563eddc 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.cs.xlf
@@ -167,6 +167,11 @@
Element není platný.
+
+
+ Enter a call site value or choose a different value injection kind
+
+ Celé řešení
@@ -442,6 +447,11 @@
Otevřené dokumenty
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
index 37db312cc1e182345b1ed19ffc7958ee1ecf2a8a..58741c2a463be7daae7f639c109b8c57d3d7f82b 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.de.xlf
@@ -167,6 +167,11 @@
Das Element ist ungültig.
+
+
+ Enter a call site value or choose a different value injection kind
+
+ Gesamte Projektmappe
@@ -442,6 +447,11 @@
Geöffnete Dokumente
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
index 82ed2983fbdff476adaf70bcf6ba3d04305f2c1f..75575ff17921af5b183f87be0d05b93ae252d3f2 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.es.xlf
@@ -167,6 +167,11 @@
El elemento no es válido.
+
+
+ Enter a call site value or choose a different value injection kind
+
+ Toda la solución
@@ -442,6 +447,11 @@
Abrir documentos
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
index 964bd119a1a3f256917d02cdd6ffaf504504634c..bcb68757f6c812aaeecadcdc4aad386aa5acc20a 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.fr.xlf
@@ -167,6 +167,11 @@
L'élément n'est pas valide.
+
+
+ Enter a call site value or choose a different value injection kind
+
+ Solution complète
@@ -442,6 +447,11 @@
Documents ouverts
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
index 50327796de023d42a4e3661c3b557d6dafc025a3..4f16f0c99203356dcf58767ca32cd884c1102557 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.it.xlf
@@ -167,6 +167,11 @@
L'elemento non è valido.
+
+
+ Enter a call site value or choose a different value injection kind
+
+ Intera soluzione
@@ -442,6 +447,11 @@
Apri documenti
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
index e4055c2fa822eecedc866982466bf7d81c9f906b..9439ada527432cf664dc18953394a7b5f156177b 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ja.xlf
@@ -167,6 +167,11 @@
要素が有効ではありません。
+
+
+ Enter a call site value or choose a different value injection kind
+
+ ソリューション全体
@@ -442,6 +447,11 @@
開かれているドキュメント
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
index 85d206abe7a8b3903cf403889bc379d84c28239b..7121a9ec9d25a72965cf6a32167bf2c6fcb4c069 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ko.xlf
@@ -167,6 +167,11 @@
요소가 잘못되었습니다.
+
+
+ Enter a call site value or choose a different value injection kind
+
+ 전체 솔루션
@@ -442,6 +447,11 @@
문서 열기
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
index 730eb2fb264d94712bbbe8326f847a25378b9d3b..b2ec46183cb648e9014ce3b2578f4bd8cacd69f5 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pl.xlf
@@ -167,6 +167,11 @@
Element jest nieprawidłowy.
+
+
+ Enter a call site value or choose a different value injection kind
+
+ Całe rozwiązanie
@@ -442,6 +447,11 @@
Otwórz dokumenty
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
index 4057cad41ac172e5101aa08a676504719a37a598..aa84a7f96590366ac494347279f9ff544cd7d6e6 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.pt-BR.xlf
@@ -167,6 +167,11 @@
O elemento é inválido.
+
+
+ Enter a call site value or choose a different value injection kind
+
+ Solução Inteira
@@ -442,6 +447,11 @@
Abrir documentos
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
index e70b7d34ca082b2dbf661dc92b07a06123255222..b43c855dd26300e6fb67446b9919956ae0a3f25b 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.ru.xlf
@@ -167,6 +167,11 @@
Элемент недопустим.
+
+
+ Enter a call site value or choose a different value injection kind
+
+ Все решение
@@ -442,6 +447,11 @@
Открыть документы
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
index 93f64fd9b548538fd7d089b8735eb541b5b1d010..dc7e1cf8f3478578101c18937394f68561bbb6d4 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.tr.xlf
@@ -167,6 +167,11 @@
Öğe geçerli değil.
+
+
+ Enter a call site value or choose a different value injection kind
+
+ Tüm çözüm
@@ -442,6 +447,11 @@
Açık belgeler
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
index 1104291ec44d56b51acce87f5ee15463efd3b955..9219b2e4c99d0e54d6c887970312e54e69099e6c 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hans.xlf
@@ -167,6 +167,11 @@
元素无效。
+
+
+ Enter a call site value or choose a different value injection kind
+
+ 整个解决方案
@@ -442,6 +447,11 @@
打开文档
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value:
diff --git a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
index a7e7115532d29552711d23cd3cd961e87c537771..7e7e1cf0b424f54c20c39b01fa8fcdaaba9c5019 100644
--- a/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
+++ b/src/VisualStudio/Core/Def/xlf/ServicesVSResources.zh-Hant.xlf
@@ -167,6 +167,11 @@
元素無效。
+
+
+ Enter a call site value or choose a different value injection kind
+
+ 整個解決方案
@@ -442,6 +447,11 @@
開啟文件
+
+
+ Optional parameters must provide a default value
+
+ Optional with default value: