Fix #1314 - remove namespaces from options
This commit is contained in:
parent
a8dd0355d0
commit
a1a560ddda
|
|
@ -25,15 +25,11 @@ namespace Microsoft.AspNetCore.Razor.Language
|
||||||
|
|
||||||
document.Options = syntaxTree.Options;
|
document.Options = syntaxTree.Options;
|
||||||
|
|
||||||
var namespaces = new Dictionary<string, SourceSpan?>(StringComparer.Ordinal);
|
|
||||||
foreach (var defaultNamespace in syntaxTree.Options.NamespaceImports)
|
|
||||||
{
|
|
||||||
namespaces[defaultNamespace] = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var checksum = ChecksumIRNode.Create(codeDocument.Source);
|
var checksum = ChecksumIRNode.Create(codeDocument.Source);
|
||||||
builder.Insert(0, checksum);
|
builder.Insert(0, checksum);
|
||||||
|
|
||||||
|
var namespaces = new Dictionary<string, SourceSpan?>(StringComparer.Ordinal);
|
||||||
|
|
||||||
// The import documents should be inserted logically before the main document.
|
// The import documents should be inserted logically before the main document.
|
||||||
var imports = codeDocument.GetImportSyntaxTrees();
|
var imports = codeDocument.GetImportSyntaxTrees();
|
||||||
if (imports != null)
|
if (imports != null)
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Razor.Language
|
namespace Microsoft.AspNetCore.Razor.Language
|
||||||
{
|
{
|
||||||
|
|
@ -17,7 +15,6 @@ namespace Microsoft.AspNetCore.Razor.Language
|
||||||
private RazorParserOptions()
|
private RazorParserOptions()
|
||||||
{
|
{
|
||||||
Directives = new List<DirectiveDescriptor>();
|
Directives = new List<DirectiveDescriptor>();
|
||||||
NamespaceImports = new HashSet<string>(StringComparer.Ordinal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool DesignTimeMode { get; set; }
|
public bool DesignTimeMode { get; set; }
|
||||||
|
|
@ -29,7 +26,5 @@ namespace Microsoft.AspNetCore.Razor.Language
|
||||||
public bool StopParsingAfterFirstDirective { get; set; }
|
public bool StopParsingAfterFirstDirective { get; set; }
|
||||||
|
|
||||||
public ICollection<DirectiveDescriptor> Directives { get; }
|
public ICollection<DirectiveDescriptor> Directives { get; }
|
||||||
|
|
||||||
public HashSet<string> NamespaceImports { get; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue