提交 7a69be81 编写于 作者: H Heejae Chang

changed WithXXX method to go through no validation code path

上级 868aa27c
......@@ -48,7 +48,11 @@ public override IEnumerable<string> PreprocessorSymbolNames
DocumentationMode documentationMode = DocumentationMode.Parse,
SourceCodeKind kind = SourceCodeKind.Regular,
IEnumerable<string> preprocessorSymbols = null)
: this(languageVersion, documentationMode, kind, preprocessorSymbols.ToImmutableArrayOrEmpty())
: this(languageVersion,
documentationMode,
kind,
preprocessorSymbols.ToImmutableArrayOrEmpty(),
ImmutableDictionary<string, string>.Empty)
{
// We test the mapped value, LanguageVersion, rather than the parameter, languageVersion,
// which has not had "Latest" mapped to the latest version yet.
......@@ -100,18 +104,19 @@ public override IEnumerable<string> PreprocessorSymbolNames
}
// No validation
internal CSharpParseOptions(
private CSharpParseOptions(
LanguageVersion languageVersion,
DocumentationMode documentationMode,
SourceCodeKind kind,
ImmutableArray<string> preprocessorSymbols)
ImmutableArray<string> preprocessorSymbols,
ImmutableDictionary<string, string> features)
: base(kind, documentationMode)
{
Debug.Assert(!preprocessorSymbols.IsDefault);
this.SpecifiedLanguageVersion = languageVersion;
this.LanguageVersion = languageVersion.MapSpecifiedToEffectiveVersion();
this.PreprocessorSymbols = preprocessorSymbols;
_features = ImmutableDictionary<string, string>.Empty;
_features = features;
}
public override string Language => LanguageNames.CSharp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册