提交 ee7d5344 编写于 作者: M Manish Vasani

Fix one more location with an explicit cast

上级 44c4de62
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
using System.Diagnostics; using System.Diagnostics;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using Microsoft.CodeAnalysis.CodeStyle;
using Roslyn.Utilities; using Roslyn.Utilities;
#if CODE_STYLE #if CODE_STYLE
...@@ -104,6 +105,18 @@ string IEditorConfigStorageLocation2.GetEditorConfigString(object? value, Option ...@@ -104,6 +105,18 @@ string IEditorConfigStorageLocation2.GetEditorConfigString(object? value, Option
=> $"{KeyName} = {((IEditorConfigStorageLocation2)this).GetEditorConfigStringValue(value, optionSet)}"; => $"{KeyName} = {((IEditorConfigStorageLocation2)this).GetEditorConfigStringValue(value, optionSet)}";
string IEditorConfigStorageLocation2.GetEditorConfigStringValue(object? value, OptionSet optionSet) string IEditorConfigStorageLocation2.GetEditorConfigStringValue(object? value, OptionSet optionSet)
=> GetEditorConfigStringValue((T)value!, optionSet); {
T typedValue;
if (value is ICodeStyleOption codeStyleOption)
{
typedValue = (T)codeStyleOption.AsCodeStyleOption<T>();
}
else
{
typedValue = (T)value;
}
return GetEditorConfigStringValue(typedValue!, optionSet);
}
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册