Fix #1314 - remove namespaces from options

This commit is contained in:
Ryan Nowak 2017-05-12 17:21:34 -07:00
parent a8dd0355d0
commit a1a560ddda
2 changed files with 2 additions and 11 deletions

View File

@ -25,15 +25,11 @@ namespace Microsoft.AspNetCore.Razor.Language
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);
builder.Insert(0, checksum);
var namespaces = new Dictionary<string, SourceSpan?>(StringComparer.Ordinal);
// The import documents should be inserted logically before the main document.
var imports = codeDocument.GetImportSyntaxTrees();
if (imports != null)

View File

@ -1,9 +1,7 @@
// 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.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Razor.Language
{
@ -17,7 +15,6 @@ namespace Microsoft.AspNetCore.Razor.Language
private RazorParserOptions()
{
Directives = new List<DirectiveDescriptor>();
NamespaceImports = new HashSet<string>(StringComparer.Ordinal);
}
public bool DesignTimeMode { get; set; }
@ -29,7 +26,5 @@ namespace Microsoft.AspNetCore.Razor.Language
public bool StopParsingAfterFirstDirective { get; set; }
public ICollection<DirectiveDescriptor> Directives { get; }
public HashSet<string> NamespaceImports { get; }
}
}