Add metadata to Razor (#1894)
* Add metadata to Razor This PR introduces standard metadata to Razor. This change begins to formalize the contract between generated code produced by Razor and runtimes that want to load and interact with this code. This is a step on making MVC a 'plugin' to Razor rather than the only possible implementation. Since we're doing MSBuild work - this is the right time to designate the current interaction between Razor and MVC as 'legacy' and move forward. Additionally, we need the source thumbprinting to make re-compilation of Razor a thing. ----- Also I noticed that our source document doesn't expose the hash algorithm by name. We really should have this, so I added it and hardened the code that deals with checksums in c# generation.
This commit is contained in:
parent
f8b7adb987
commit
186e5733c0
|
|
@ -0,0 +1,28 @@
|
|||
// 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.Text;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language
|
||||
{
|
||||
internal static class Checksum
|
||||
{
|
||||
public static string BytesToString(byte[] bytes)
|
||||
{
|
||||
if (bytes == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(bytes));
|
||||
}
|
||||
|
||||
var result = new StringBuilder(bytes.Length);
|
||||
for (var i = 0; i < bytes.Length; i++)
|
||||
{
|
||||
// The x2 format means lowercase hex, where each byte is a 2-character string.
|
||||
result.Append(bytes[i].ToString("x2"));
|
||||
}
|
||||
|
||||
return result.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Microsoft.AspNetCore.Razor.Language.Intermediate;
|
||||
|
||||
|
|
@ -67,28 +68,52 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
if (!Context.Options.SuppressChecksum)
|
||||
{
|
||||
// See http://msdn.microsoft.com/en-us/library/system.codedom.codechecksumpragma.checksumalgorithmid.aspx
|
||||
const string Sha1AlgorithmId = "{ff1816ec-aa5e-4d10-87f7-6f4963833460}";
|
||||
// And https://github.com/dotnet/roslyn/blob/614299ff83da9959fa07131c6d0ffbc58873b6ae/src/Compilers/Core/Portable/PEWriter/DebugSourceDocument.cs#L67
|
||||
//
|
||||
// We only support algorithms that the debugger understands, which is currently SHA1 and SHA256.
|
||||
|
||||
string algorithmId;
|
||||
var algorithm = Context.SourceDocument.GetChecksumAlgorithm();
|
||||
if (string.Equals(algorithm, HashAlgorithmName.SHA256.Name, StringComparison.Ordinal))
|
||||
{
|
||||
algorithmId = "{8829d00f-11b8-4213-878b-770e8597ac16}";
|
||||
}
|
||||
else if (string.Equals(algorithm, HashAlgorithmName.SHA1.Name, StringComparison.Ordinal) ||
|
||||
|
||||
// In 2.0, we didn't actually expose the name of the algorithm, so it's possible we could get null here.
|
||||
// If that's the case, we just assume SHA1 since that's the only thing we supported in 2.0.
|
||||
algorithm == null)
|
||||
{
|
||||
algorithmId = "{ff1816ec-aa5e-4d10-87f7-6f4963833460}";
|
||||
}
|
||||
else
|
||||
{
|
||||
var supportedAlgorithms = string.Join(" ", new string[]
|
||||
{
|
||||
HashAlgorithmName.SHA1.Name,
|
||||
HashAlgorithmName.SHA256.Name
|
||||
});
|
||||
|
||||
var message = Resources.FormatUnsupportedChecksumAlgorithm(
|
||||
algorithm,
|
||||
supportedAlgorithms,
|
||||
nameof(RazorCodeGenerationOptions) + "." + nameof(RazorCodeGenerationOptions.SuppressChecksum),
|
||||
bool.TrueString);
|
||||
throw new InvalidOperationException(message);
|
||||
}
|
||||
|
||||
var sourceDocument = Context.SourceDocument;
|
||||
|
||||
var checksum = sourceDocument.GetChecksum();
|
||||
var fileHashBuilder = new StringBuilder(checksum.Length * 2);
|
||||
foreach (var value in checksum)
|
||||
{
|
||||
fileHashBuilder.Append(value.ToString("x2"));
|
||||
}
|
||||
|
||||
var bytes = fileHashBuilder.ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(bytes))
|
||||
var checksum = Checksum.BytesToString(sourceDocument.GetChecksum());
|
||||
if (!string.IsNullOrEmpty(checksum))
|
||||
{
|
||||
Context.CodeWriter
|
||||
.Write("#pragma checksum \"")
|
||||
.Write(sourceDocument.FilePath)
|
||||
.Write("\" \"")
|
||||
.Write(Sha1AlgorithmId)
|
||||
.Write(algorithmId)
|
||||
.Write("\" \"")
|
||||
.Write(bytes)
|
||||
.Write(checksum)
|
||||
.WriteLine("\"");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,18 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
{
|
||||
internal class DefaultRazorCodeGenerationOptions : RazorCodeGenerationOptions
|
||||
{
|
||||
public DefaultRazorCodeGenerationOptions(bool indentWithTabs, int indentSize, bool designTime, bool suppressChecksum)
|
||||
public DefaultRazorCodeGenerationOptions(
|
||||
bool indentWithTabs,
|
||||
int indentSize,
|
||||
bool designTime,
|
||||
bool suppressChecksum,
|
||||
bool supressMetadataAttributes)
|
||||
{
|
||||
IndentWithTabs = indentWithTabs;
|
||||
IndentSize = indentSize;
|
||||
DesignTime = designTime;
|
||||
SuppressChecksum = suppressChecksum;
|
||||
SuppressMetadataAttributes = supressMetadataAttributes;
|
||||
}
|
||||
|
||||
public override bool DesignTime { get; }
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
public override bool IndentWithTabs { get; set; }
|
||||
|
||||
public override bool SuppressChecksum { get; set; }
|
||||
|
||||
|
||||
public override RazorCodeGenerationOptions Build()
|
||||
{
|
||||
return new DefaultRazorCodeGenerationOptions(IndentWithTabs, IndentSize, DesignTime, SuppressChecksum);
|
||||
return new DefaultRazorCodeGenerationOptions(IndentWithTabs, IndentSize, DesignTime, SuppressChecksum, SuppressMetadataAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,15 +22,15 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
public RazorCodeGenerationOptions GetOptions()
|
||||
{
|
||||
var builder = new DefaultRazorCodeGenerationOptionsBuilder(_designTime);
|
||||
return _designTime ? RazorCodeGenerationOptions.CreateDesignTime(ConfigureOptions) : RazorCodeGenerationOptions.Create(ConfigureOptions);
|
||||
}
|
||||
|
||||
private void ConfigureOptions(RazorCodeGenerationOptionsBuilder builder)
|
||||
{
|
||||
for (var i = 0; i < _configureOptions.Length; i++)
|
||||
{
|
||||
_configureOptions[i].Configure(builder);
|
||||
}
|
||||
|
||||
var options = builder.Build();
|
||||
|
||||
return options;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
// 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 Microsoft.AspNetCore.Razor.Language.CodeGeneration;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
||||
{
|
||||
internal interface IMetadataAttributeTargetExtension : ICodeTargetExtension
|
||||
{
|
||||
void WriteRazorCompiledItemAttribute(CodeRenderingContext context, RazorCompiledItemAttributeIntermediateNode node);
|
||||
|
||||
void WriteRazorSourceChecksumAttribute(CodeRenderingContext context, RazorSourceChecksumAttributeIntermediateNode node);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
// 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 Microsoft.AspNetCore.Razor.Language.Intermediate;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
||||
{
|
||||
// Optimization pass is the best choice for this class. It's not an optimization, but it also doesn't add semantically
|
||||
// meaningful information.
|
||||
internal class MetadataAttributePass : IntermediateNodePassBase, IRazorOptimizationPass
|
||||
{
|
||||
protected override void ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode)
|
||||
{
|
||||
if (documentNode.Options == null || documentNode.Options.SuppressMetadataAttributes)
|
||||
{
|
||||
// Metadata attributes are turned off (or options not populated), nothing to do.
|
||||
return;
|
||||
}
|
||||
|
||||
// We need to be able to compute the data we need for the [RazorCompiledItem] attribute - that includes
|
||||
// a full type name, and a document kind, and optionally an identifier.
|
||||
//
|
||||
// If we can't use [RazorCompiledItem] then we don't care about the rest of the attributes.
|
||||
var @namespace = documentNode.FindPrimaryNamespace();
|
||||
if (@namespace == null || string.IsNullOrEmpty(@namespace.Content))
|
||||
{
|
||||
// No namespace node or it's incomplete. Skip.
|
||||
return;
|
||||
}
|
||||
|
||||
var @class = documentNode.FindPrimaryClass();
|
||||
if (@class == null || string.IsNullOrEmpty(@class.ClassName))
|
||||
{
|
||||
// No class node or it's incomplete. Skip.
|
||||
return;
|
||||
}
|
||||
|
||||
if (documentNode.DocumentKind == null)
|
||||
{
|
||||
// No document kind. Skip.
|
||||
return;
|
||||
}
|
||||
|
||||
var identifier = codeDocument.GetIdentifier();
|
||||
if (identifier == null)
|
||||
{
|
||||
// No identifier. Skip
|
||||
return;
|
||||
}
|
||||
|
||||
// [RazorCompiledItem] is an [assembly: ... ] attribute, so it needs to be applied at the global scope.
|
||||
documentNode.Children.Insert(0, new RazorCompiledItemAttributeIntermediateNode()
|
||||
{
|
||||
TypeName = @namespace.Content + "." + @class.ClassName,
|
||||
Kind = documentNode.DocumentKind,
|
||||
Identifier = identifier,
|
||||
});
|
||||
|
||||
// Now we need to add a [RazorSourceChecksum] for the source and for each import
|
||||
// these are class attributes, so we need to find the insertion point to put them
|
||||
// right before the class.
|
||||
var insert = (int?)null;
|
||||
for (var j = 0; j < @namespace.Children.Count; j++)
|
||||
{
|
||||
if (object.ReferenceEquals(@namespace.Children[j], @class))
|
||||
{
|
||||
insert = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (insert == null)
|
||||
{
|
||||
// Can't find a place to put the attributes, just bail.
|
||||
return;
|
||||
}
|
||||
|
||||
// Checksum of the main source
|
||||
AddChecksum(codeDocument.Source.GetChecksum(), codeDocument.Source.GetChecksumAlgorithm(), identifier);
|
||||
|
||||
// Now process the checksums of the imports
|
||||
//
|
||||
// It's possible that the counts of these won't match, just process as many as we can.
|
||||
var importIdentifiers = codeDocument.GetImportIdentifiers() ?? Array.Empty<string>();
|
||||
for (var i = 0; i < codeDocument.Imports.Count && i < importIdentifiers.Count; i++)
|
||||
{
|
||||
var import = codeDocument.Imports[i];
|
||||
AddChecksum(import.GetChecksum(), import.GetChecksumAlgorithm(), importIdentifiers[i]);
|
||||
}
|
||||
|
||||
void AddChecksum(byte[] checksum, string checksumAlgorithm, string id)
|
||||
{
|
||||
if (checksum == null || checksum.Length == 0 || checksumAlgorithm == null || id == null)
|
||||
{
|
||||
// Don't generate anything unless we have all of the required information.
|
||||
return;
|
||||
}
|
||||
|
||||
// Checksum of the main source
|
||||
@namespace.Children.Insert((int)insert++, new RazorSourceChecksumAttributeIntermediateNode()
|
||||
{
|
||||
Checksum = checksum,
|
||||
ChecksumAlgorithm = checksumAlgorithm,
|
||||
Identifier = id,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
// 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 Microsoft.AspNetCore.Razor.Language.CodeGeneration;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
||||
{
|
||||
internal class MetadataAttributeTargetExtension : IMetadataAttributeTargetExtension
|
||||
{
|
||||
public string CompiledItemAttributeName { get; set; } = "global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute";
|
||||
|
||||
public string SourceChecksumAttributeName { get; set; } = "global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute";
|
||||
|
||||
public void WriteRazorCompiledItemAttribute(CodeRenderingContext context, RazorCompiledItemAttributeIntermediateNode node)
|
||||
{
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if (node == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(node));
|
||||
}
|
||||
|
||||
// [assembly: global::...RazorCompiledItem(typeof({node.TypeName}), @"{node.Kind}", @"{node.Identifier}")]
|
||||
context.CodeWriter.Write("[assembly: ");
|
||||
context.CodeWriter.Write(CompiledItemAttributeName);
|
||||
context.CodeWriter.Write("(typeof(");
|
||||
context.CodeWriter.Write(node.TypeName);
|
||||
context.CodeWriter.Write("), @\"");
|
||||
context.CodeWriter.Write(node.Kind);
|
||||
context.CodeWriter.Write("\", @\"");
|
||||
context.CodeWriter.Write(node.Identifier);
|
||||
context.CodeWriter.WriteLine("\")]");
|
||||
}
|
||||
|
||||
public void WriteRazorSourceChecksumAttribute(CodeRenderingContext context, RazorSourceChecksumAttributeIntermediateNode node)
|
||||
{
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if (node == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(node));
|
||||
}
|
||||
|
||||
// [global::...RazorSourceChecksum(@"{node.ChecksumAlgorithm}", @"{node.Checksum}", @"{node.Identifier}")]
|
||||
context.CodeWriter.Write("[");
|
||||
context.CodeWriter.Write(SourceChecksumAttributeName);
|
||||
context.CodeWriter.Write("(@\"");
|
||||
context.CodeWriter.Write(node.ChecksumAlgorithm);
|
||||
context.CodeWriter.Write("\", @\"");
|
||||
context.CodeWriter.Write(Checksum.BytesToString(node.Checksum));
|
||||
context.CodeWriter.Write("\", @\"");
|
||||
context.CodeWriter.Write(node.Identifier);
|
||||
context.CodeWriter.WriteLine("\")]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
// 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 Microsoft.AspNetCore.Razor.Language.CodeGeneration;
|
||||
using Microsoft.AspNetCore.Razor.Language.Intermediate;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
||||
{
|
||||
internal sealed class RazorCompiledItemAttributeIntermediateNode : ExtensionIntermediateNode
|
||||
{
|
||||
public override IntermediateNodeCollection Children => IntermediateNodeCollection.ReadOnly;
|
||||
|
||||
public string TypeName { get; set; }
|
||||
|
||||
public string Kind { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
public override void Accept(IntermediateNodeVisitor visitor)
|
||||
{
|
||||
if (visitor == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(visitor));
|
||||
}
|
||||
|
||||
AcceptExtensionNode<RazorCompiledItemAttributeIntermediateNode>(this, visitor);
|
||||
}
|
||||
|
||||
public override void WriteNode(CodeTarget target, CodeRenderingContext context)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(target));
|
||||
}
|
||||
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
var extension = target.GetExtension<IMetadataAttributeTargetExtension>();
|
||||
if (extension == null)
|
||||
{
|
||||
ReportMissingCodeTargetExtension<IMetadataAttributeTargetExtension>(context);
|
||||
return;
|
||||
}
|
||||
|
||||
extension.WriteRazorCompiledItemAttribute(context, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
// 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 Microsoft.AspNetCore.Razor.Language.CodeGeneration;
|
||||
using Microsoft.AspNetCore.Razor.Language.Intermediate;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
||||
{
|
||||
internal sealed class RazorSourceChecksumAttributeIntermediateNode : ExtensionIntermediateNode
|
||||
{
|
||||
public override IntermediateNodeCollection Children => IntermediateNodeCollection.ReadOnly;
|
||||
|
||||
public byte[] Checksum { get; set; }
|
||||
|
||||
public string ChecksumAlgorithm { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
public override void Accept(IntermediateNodeVisitor visitor)
|
||||
{
|
||||
if (visitor == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(visitor));
|
||||
}
|
||||
|
||||
AcceptExtensionNode<RazorSourceChecksumAttributeIntermediateNode>(this, visitor);
|
||||
}
|
||||
|
||||
public override void WriteNode(CodeTarget target, CodeRenderingContext context)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(target));
|
||||
}
|
||||
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
var extension = target.GetExtension<IMetadataAttributeTargetExtension>();
|
||||
if (extension == null)
|
||||
{
|
||||
ReportMissingCodeTargetExtension<IMetadataAttributeTargetExtension>(context);
|
||||
return;
|
||||
}
|
||||
|
||||
extension.WriteRazorSourceChecksumAttribute(context, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1828,6 +1828,20 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
internal static string FormatUnexpectedEOFAfterDirective(object p0, object p1)
|
||||
=> string.Format(CultureInfo.CurrentCulture, GetString("UnexpectedEOFAfterDirective"), p0, p1);
|
||||
|
||||
/// <summary>
|
||||
/// The hash algorithm '{0}' is not supported for checksum generation. Supported algorithms are: '{1}'. Set '{2}' to '{3}' to suppress automatic checksum generation.
|
||||
/// </summary>
|
||||
internal static string UnsupportedChecksumAlgorithm
|
||||
{
|
||||
get => GetString("UnsupportedChecksumAlgorithm");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The hash algorithm '{0}' is not supported for checksum generation. Supported algorithms are: '{1}'. Set '{2}' to '{3}' to suppress automatic checksum generation.
|
||||
/// </summary>
|
||||
internal static string FormatUnsupportedChecksumAlgorithm(object p0, object p1, object p2, object p3)
|
||||
=> string.Format(CultureInfo.CurrentCulture, GetString("UnsupportedChecksumAlgorithm"), p0, p1, p2, p3);
|
||||
|
||||
private static string GetString(string name, params string[] formatterNames)
|
||||
{
|
||||
var value = _resourceManager.GetString(name);
|
||||
|
|
|
|||
|
|
@ -3,13 +3,61 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Razor.Language.Intermediate;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language
|
||||
{
|
||||
public static class RazorCodeDocumentExtensions
|
||||
{
|
||||
private static object TagHelperPrefixKey = new object();
|
||||
// Internal for testing
|
||||
internal static readonly string IdentifierKey = "identifier";
|
||||
internal static readonly string ImportIdentifiersKey = "imports-identifiers";
|
||||
|
||||
public static string GetIdentifier(this RazorCodeDocument document)
|
||||
{
|
||||
if (document == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(document));
|
||||
}
|
||||
|
||||
return document.Items[IdentifierKey] as string;
|
||||
}
|
||||
|
||||
public static void SetIdentifier(this RazorCodeDocument document, string identifier)
|
||||
{
|
||||
if (document == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(document));
|
||||
}
|
||||
|
||||
document.Items[IdentifierKey] = identifier;
|
||||
}
|
||||
|
||||
public static IReadOnlyList<string> GetImportIdentifiers(this RazorCodeDocument document)
|
||||
{
|
||||
if (document == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(document));
|
||||
}
|
||||
|
||||
return document.Items[ImportIdentifiersKey] as string[];
|
||||
}
|
||||
|
||||
public static void SetImportIdentifiers(this RazorCodeDocument document, IEnumerable<string> identifiers)
|
||||
{
|
||||
if (document == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(document));
|
||||
}
|
||||
|
||||
if (identifiers == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(identifiers));
|
||||
}
|
||||
|
||||
document.Items[ImportIdentifiersKey] = identifiers.ToArray();
|
||||
}
|
||||
|
||||
public static TagHelperDocumentContext GetTagHelperContext(this RazorCodeDocument document)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,12 +9,22 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
{
|
||||
public static RazorCodeGenerationOptions CreateDefault()
|
||||
{
|
||||
return new DefaultRazorCodeGenerationOptions(indentWithTabs: false, indentSize: 4, designTime: false, suppressChecksum: false);
|
||||
return new DefaultRazorCodeGenerationOptions(
|
||||
indentWithTabs: false,
|
||||
indentSize: 4,
|
||||
designTime: false,
|
||||
suppressChecksum: false,
|
||||
supressMetadataAttributes: false);
|
||||
}
|
||||
|
||||
public static RazorCodeGenerationOptions CreateDesignTimeDefault()
|
||||
{
|
||||
return new DefaultRazorCodeGenerationOptions(indentWithTabs: false, indentSize: 4, designTime: true, suppressChecksum: false);
|
||||
return new DefaultRazorCodeGenerationOptions(
|
||||
indentWithTabs: false,
|
||||
indentSize: 4,
|
||||
designTime: true,
|
||||
suppressChecksum: false,
|
||||
supressMetadataAttributes: true);
|
||||
}
|
||||
|
||||
public static RazorCodeGenerationOptions Create(Action<RazorCodeGenerationOptionsBuilder> configure)
|
||||
|
|
@ -38,7 +48,11 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
throw new ArgumentNullException(nameof(configure));
|
||||
}
|
||||
|
||||
var builder = new DefaultRazorCodeGenerationOptionsBuilder(designTime: true);
|
||||
var builder = new DefaultRazorCodeGenerationOptionsBuilder(designTime: true)
|
||||
{
|
||||
SuppressMetadataAttributes = true,
|
||||
};
|
||||
|
||||
configure(builder);
|
||||
var options = builder.Build();
|
||||
|
||||
|
|
@ -51,6 +65,33 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
public abstract int IndentSize { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value that indicates whether to suppress the default <c>#pragma checksum</c> directive in the
|
||||
/// generated C# code. If <c>false</c> the checkum directive will be included, otherwise it will not be
|
||||
/// generated. Defaults to <c>false</c>, meaning that the checksum will be included.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The <c>#pragma checksum</c> is required to enable debugging and should only be supressed for testing
|
||||
/// purposes.
|
||||
/// </remarks>
|
||||
public abstract bool SuppressChecksum { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value that indicates whether to suppress the default metadata attributes in the generated
|
||||
/// C# code. If <c>false</c> the default attributes will be included, otherwise they will not be generated.
|
||||
/// Defaults to <c>false</c> at run time, meaning that the attributes will be included. Defaults to
|
||||
/// <c>true</c> at design time, meaning that the attributes will not be included.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The <c>Microsoft.AspNetCore.Razor.Runtime</c> package includes a default set of attributes intended
|
||||
/// for runtimes to discover metadata about the compiled code.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The default metadata attributes should be suppressed if code generation targets a runtime without
|
||||
/// a reference to <c>Microsoft.AspNetCore.Razor.Runtime</c>, or for testing purposes.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public virtual bool SuppressMetadataAttributes { get; protected set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,35 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
public abstract bool IndentWithTabs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value that indicates whether to suppress the default <c>#pragma checksum</c> directive in the
|
||||
/// generated C# code. If <c>false</c> the checkum directive will be included, otherwise it will not be
|
||||
/// generated. Defaults to <c>false</c>, meaning that the checksum will be included.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The <c>#pragma checksum</c> is required to enable debugging and should only be supressed for testing
|
||||
/// purposes.
|
||||
/// </remarks>
|
||||
public abstract bool SuppressChecksum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or setsa value that indicates whether to suppress the default metadata attributes in the generated
|
||||
/// C# code. If <c>false</c> the default attributes will be included, otherwise they will not be generated.
|
||||
/// Defaults to <c>false</c> at run time, meaning that the attributes will be included. Defaults to
|
||||
/// <c>true</c> at design time, meaning that the attributes will not be included.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The <c>Microsoft.AspNetCore.Razor.Runtime</c> package includes a default set of attributes intended
|
||||
/// for runtimes to discover metadata about the compiled code.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The default metadata attributes should be suppressed if code generation targets a runtime without
|
||||
/// a reference to <c>Microsoft.AspNetCore.Razor.Runtime</c>, or for testing purposes.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public virtual bool SuppressMetadataAttributes { get; set; }
|
||||
|
||||
public abstract RazorCodeGenerationOptions Build();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,11 +67,12 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
// Intermediate Node Passes
|
||||
builder.Features.Add(new DefaultDocumentClassifierPass());
|
||||
builder.Features.Add(new MetadataAttributePass());
|
||||
builder.Features.Add(new DirectiveRemovalOptimizationPass());
|
||||
builder.Features.Add(new DefaultTagHelperOptimizationPass());
|
||||
|
||||
// Default Code Target Extensions
|
||||
// (currently none)
|
||||
builder.AddTargetExtension(new MetadataAttributeTargetExtension());
|
||||
|
||||
// Default configuration
|
||||
var configurationFeature = new DefaultDocumentClassifierPassFeature();
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language
|
||||
|
|
@ -57,6 +58,20 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
/// <returns>The checksum.</returns>
|
||||
public abstract byte[] GetChecksum();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the algorithm used to compute the checksum returned by <see cref="GetChecksum"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This member did not exist in the 2.0 release, so it is possible for an implementation to return
|
||||
/// the wrong value (or <c>null</c>). Implementations of <see cref="RazorSourceDocument"/> should
|
||||
/// override this member and specify their choice of hash algorithm even if it is the same as the
|
||||
/// default (<c>SHA1</c>).
|
||||
/// </remarks>
|
||||
public virtual string GetChecksumAlgorithm()
|
||||
{
|
||||
return HashAlgorithmName.SHA1.Name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the <see cref="RazorSourceDocument"/> from the specified <paramref name="stream"/>.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -527,4 +527,7 @@ Instead, wrap the contents of the block in "{{}}":
|
|||
<data name="UnexpectedEOFAfterDirective" xml:space="preserve">
|
||||
<value>Unexpected end of file following the '{0}' directive. Expected '{1}'.</value>
|
||||
</data>
|
||||
<data name="UnsupportedChecksumAlgorithm" xml:space="preserve">
|
||||
<value>The hash algorithm '{0}' is not supported for checksum generation. Supported algorithms are: '{1}'. Set '{2}' to '{3}' to suppress automatic checksum generation.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
// 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;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Hosting
|
||||
{
|
||||
internal class DefaultRazorCompiledItem : RazorCompiledItem
|
||||
{
|
||||
private object[] _metadata;
|
||||
|
||||
public DefaultRazorCompiledItem(Type type, string kind, string identifier)
|
||||
{
|
||||
if (type == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(type));
|
||||
}
|
||||
|
||||
if (kind == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(kind));
|
||||
}
|
||||
|
||||
if (identifier == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(identifier));
|
||||
}
|
||||
|
||||
Type = type;
|
||||
Kind = kind;
|
||||
Identifier = identifier;
|
||||
}
|
||||
|
||||
public override string Identifier { get; }
|
||||
|
||||
public override string Kind { get; }
|
||||
|
||||
public override IReadOnlyList<object> Metadata
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_metadata == null)
|
||||
{
|
||||
_metadata = Type.GetCustomAttributes(inherit: true);
|
||||
}
|
||||
|
||||
return _metadata;
|
||||
}
|
||||
}
|
||||
|
||||
public override Type Type { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
// 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.
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// A metadata object containing the checksum of a source file that contributed to a compiled item.
|
||||
/// </summary>
|
||||
public interface IRazorSourceChecksumMetadata
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the checksum as string of hex-encoded bytes.
|
||||
/// </summary>
|
||||
string Checksum { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the algorithm used to create this checksum.
|
||||
/// </summary>
|
||||
string ChecksumAlgorithm { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the identifier of the source file associated with this checksum.
|
||||
/// </summary>
|
||||
string Identifier { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
// 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;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifies a compiled item that can be identified and loaded.
|
||||
/// </summary>
|
||||
public abstract class RazorCompiledItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the identifier associated with the compiled item. The identifier is used programmatically to locate
|
||||
/// a specific item of a specific kind and should be uniqure within the assembly.
|
||||
/// </summary>
|
||||
public abstract string Identifier { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the kind of compiled item. The kind is used programmatically to associate behaviors and semantics
|
||||
/// with the item.
|
||||
/// </summary>
|
||||
public abstract string Kind { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of arbitrary metadata associated with the item.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// For items loaded with the default implementation of <see cref="RazorCompiledItemLoader"/>, the
|
||||
/// metadata collection will return all attributes defined on the <see cref="Type"/>.
|
||||
/// </remarks>
|
||||
public abstract IReadOnlyList<object> Metadata { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Type"/> of the compiled item.
|
||||
/// </summary>
|
||||
public abstract Type Type { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
// 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;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies that an assembly contains a compiled Razor asset.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
|
||||
public sealed class RazorCompiledItemAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="RazorCompiledItemAttribute"/>.
|
||||
/// </summary>
|
||||
/// <param name="type">The <see cref="Type"/> of the compiled item.</param>
|
||||
/// <param name="kind">
|
||||
/// The kind of the compiled item. The kind is used programmatically to associate behaviors with the item.
|
||||
/// </param>
|
||||
/// <param name="identifier">
|
||||
/// The identifier associated with the item. The identifier is used programmatically to locate
|
||||
/// a specific item of a specific kind, and should be unique within the assembly.
|
||||
/// </param>
|
||||
public RazorCompiledItemAttribute(Type type, string kind, string identifier)
|
||||
{
|
||||
if (type == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(type));
|
||||
}
|
||||
|
||||
if (kind == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(kind));
|
||||
}
|
||||
|
||||
Type = type;
|
||||
Kind = kind;
|
||||
Identifier = identifier;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the kind of compiled item. The kind is used programmatically to associate behaviors and semantics
|
||||
/// with the item.
|
||||
/// </summary>
|
||||
public string Kind { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the identifier associated with the compiled item. The identifier is used programmatically to locate
|
||||
/// a specific item of a specific kind and should be uniqure within the assembly.
|
||||
/// </summary>
|
||||
public string Identifier { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Type"/> of the compiled item. The type should be contained in the assembly associated
|
||||
/// with this instance of <see cref="RazorCompiledItemAttribute"/>.
|
||||
/// </summary>
|
||||
public Type Type { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
// 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.Linq;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// Extension methods for <see cref="RazorCompiledItem"/>.
|
||||
/// </summary>
|
||||
public static class RazorCompiledItemExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the list of <see cref="IRazorSourceChecksumMetadata"/> associated with <paramref name="item"/>.
|
||||
/// </summary>
|
||||
/// <param name="item">The <see cref="RazorCompiledItem"/>.</param>
|
||||
/// <returns>A list of <see cref="IRazorSourceChecksumMetadata"/>.</returns>
|
||||
public static IReadOnlyList<IRazorSourceChecksumMetadata> GetChecksumMetadata(this RazorCompiledItem item)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(item));
|
||||
}
|
||||
|
||||
return item.Metadata.OfType<IRazorSourceChecksumMetadata>().ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
// 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.Reflection;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// A loader implementation that can load <see cref="RazorCompiledItem"/> objects from an
|
||||
/// <see cref="Assembly"/> using reflection.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Inherit from <see cref="RazorCompiledItemLoader"/> to customize the behavior when loading
|
||||
/// <see cref="RazorCompiledItem"/> objects from an <see cref="Assembly"/>. The default implementations of methods
|
||||
/// defined by this class use reflection in a trivial way to load attributes from the assembly.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Inheriting from <see cref="RazorCompiledItemLoader"/> is useful when an implementation needs to consider
|
||||
/// additional configuration or data outside of the <see cref="Assembly"/> being loaded.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Subclasses of <see cref="RazorCompiledItemLoader"/> can return subclasses of <see cref="RazorCompiledItem"/>
|
||||
/// with additional data members by overriding <see cref="CreateItem(RazorCompiledItemAttribute)"/>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public class RazorCompiledItemLoader
|
||||
{
|
||||
/// <summary>
|
||||
/// Loads a list of <see cref="RazorCompiledItem"/> objects from the provided <see cref="Assembly"/>.
|
||||
/// </summary>
|
||||
/// <param name="assembly">The assembly to search.</param>
|
||||
/// <returns>A list of <see cref="RazorCompiledItem"/> objects.</returns>
|
||||
public virtual IReadOnlyList<RazorCompiledItem> LoadItems(Assembly assembly)
|
||||
{
|
||||
if (assembly == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(assembly));
|
||||
}
|
||||
|
||||
var items = new List<RazorCompiledItem>();
|
||||
foreach (var attribute in LoadAttributes(assembly))
|
||||
{
|
||||
items.Add(CreateItem(attribute));
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="RazorCompiledItem"/> from a <see cref="RazorCompiledItemAttribute"/>.
|
||||
/// </summary>
|
||||
/// <param name="attribute">The <see cref="RazorCompiledItemAttribute"/>.</param>
|
||||
/// <returns>A <see cref="RazorCompiledItem"/> created from <paramref name="attribute"/>.</returns>
|
||||
protected virtual RazorCompiledItem CreateItem(RazorCompiledItemAttribute attribute)
|
||||
{
|
||||
if (attribute == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(attribute));
|
||||
}
|
||||
|
||||
return new DefaultRazorCompiledItem(attribute.Type, attribute.Kind, attribute.Identifier);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the list of <see cref="RazorCompiledItemAttribute"/> attributes defined for the provided
|
||||
/// <see cref="Assembly"/>.
|
||||
/// </summary>
|
||||
/// <param name="assembly">The <see cref="Assembly"/> to search.</param>
|
||||
/// <returns>A list of <see cref="RazorCompiledItemAttribute"/> attributes.</returns>
|
||||
protected IEnumerable<RazorCompiledItemAttribute> LoadAttributes(Assembly assembly)
|
||||
{
|
||||
if (assembly == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(assembly));
|
||||
}
|
||||
|
||||
return assembly.GetCustomAttributes<RazorCompiledItemAttribute>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
// 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;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the checksum of a source file that contributed to a compiled item.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// These attributes are added by the Razor infrastructure when generating code to assist runtime
|
||||
/// implementations to determine the integrity of compiled items.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Runtime implementations should access the checksum metadata for an item using
|
||||
/// <see cref="RazorCompiledItemExtensions.GetChecksumMetadata(RazorCompiledItem)"/>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
||||
public sealed class RazorSourceChecksumAttribute : Attribute, IRazorSourceChecksumMetadata
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="RazorSourceChecksumAttribute"/>.
|
||||
/// </summary>
|
||||
/// <param name="checksumAlgorithm">The algorithm used to create this checksum.</param>
|
||||
/// <param name="checksum">The checksum as a string of hex-encoded bytes.</param>
|
||||
/// <param name="identifier">The identifier associated with this thumbprint.</param>
|
||||
public RazorSourceChecksumAttribute(string checksumAlgorithm, string checksum, string identifier)
|
||||
{
|
||||
if (checksumAlgorithm == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(checksumAlgorithm));
|
||||
}
|
||||
|
||||
if (checksum == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(checksum));
|
||||
}
|
||||
|
||||
if (identifier == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(identifier));
|
||||
}
|
||||
|
||||
ChecksumAlgorithm = checksumAlgorithm;
|
||||
Checksum = checksum;
|
||||
Identifier = identifier;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the checksum as string of hex-encoded bytes.
|
||||
/// </summary>
|
||||
public string Checksum { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the algorithm used to create this checksum.
|
||||
/// </summary>
|
||||
public string ChecksumAlgorithm { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the identifier of the source file associated with this checksum.
|
||||
/// </summary>
|
||||
public string Identifier { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4120ddad9d4353ed260e0585fe71080d78ff8ab3"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"4120ddad9d4353ed260e0585fe71080d78ff8ab3", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "fec5cf763044f842fa2114e997bb07e0bf280cd6"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives), @"mvc.1.0.razor-page", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"fec5cf763044f842fa2114e997bb07e0bf280cd6", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives : global::Microsoft.AspNetCore.Mvc.RazorPages.Page
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "91cf923452a86b2906083cb0236d6d5b3bc528ef"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"91cf923452a86b2906083cb0236d6d5b3bc528ef", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel : MyBasePageForViews<MyModel>
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel - MyBasePageForViews<MyModel> -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "052fe5ad02d36ebdf943dddd543cb26aaff62411"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports), @"mvc.1.0.razor-page", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,8 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"052fe5ad02d36ebdf943dddd543cb26aaff62411", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports")]
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"28770296d18b0505bb216c6143cc1ec6514adb7b", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports_Imports0")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports : MyPageModel<MyModel>
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,8 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports - MyPageModel<MyModel> -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "a039b7091118c718dc3023b6ac58d9645cb58e59"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"a039b7091118c718dc3023b6ac58d9645cb58e59", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel>
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel> -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5010aab35d235175dab517f8018e41aee9a2ac7f"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"5010aab35d235175dab517f8018e41aee9a2ac7f", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel>
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel> -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c711078454f5b0e8d2cb77d9cb7fa88cca32b884"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"c711078454f5b0e8d2cb77d9cb7fa88cca32b884", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InvalidNamespaceAtEOF.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "de132bd3e2a46a0d2ec953a168427c01e5829cde"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InvalidNamespaceAtEOF")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"de132bd3e2a46a0d2ec953a168427c01e5829cde", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InvalidNamespaceAtEOF")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MalformedDirective - (0:0,0 [11] InvalidNamespaceAtEOF.cshtml) - namespace
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MalformedPageDirective.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5a9ff8440150c6746e4a8ba63bc633ea84930405"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MalformedPageDirective), @"mvc.1.0.razor-page", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MalformedPageDirective")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MalformedPageDirective), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"5a9ff8440150c6746e4a8ba63bc633ea84930405", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MalformedPageDirective")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MalformedPageDirective : global::Microsoft.AspNetCore.Mvc.RazorPages.Page
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MalformedPageDirective), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MalformedPageDirective - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
MalformedDirective - (0:0,0 [6] MalformedPageDirective.cshtml) - page
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0906a816db301fe624bbe5a96c4b3013071ea492"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"0906a816db301fe624bbe5a96c4b3013071ea492", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<DateTime>
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<DateTime> -
|
||||
DefaultTagHelperRuntime -
|
||||
FieldDeclaration - - private - global::InputTestTagHelper - __InputTestTagHelper
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Model.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "31c5b047a450ac9f6dc4116626667d26bfb657ba"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Model), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Model")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Model))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"31c5b047a450ac9f6dc4116626667d26bfb657ba", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Model")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Model : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<System.Collections.IEnumerable>
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Model))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Model - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<System.Collections.IEnumerable> -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PageWithNamespace.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "b205857d3dad47cb3f0c1d7775ae251b306ab830"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PageWithNamespace), @"mvc.1.0.razor-page", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PageWithNamespace")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PageWithNamespace), null)]
|
||||
namespace Test.Namespace
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace Test.Namespace
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"b205857d3dad47cb3f0c1d7775ae251b306ab830", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PageWithNamespace")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PageWithNamespace : global::Microsoft.AspNetCore.Mvc.RazorPages.Page
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PageWithNamespace), null)]
|
||||
NamespaceDeclaration - - Test.Namespace
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PageWithNamespace - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c0587249e6e0b7ba4e1efc463f58577d5d0b6ae2"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel), @"mvc.1.0.razor-page", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -17,6 +18,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
|
|||
|
||||
#line default
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"c0587249e6e0b7ba4e1efc463f58577d5d0b6ae2", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel : global::Microsoft.AspNetCore.Mvc.RazorPages.Page
|
||||
{
|
||||
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("text-danger"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -10,6 +11,7 @@ Document -
|
|||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
UsingDirective - (38:3,1 [43] RazorPagesWithoutModel.cshtml) - Microsoft.AspNetCore.Mvc.RazorPages
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - class - text-danger - HtmlAttributeValueStyle.DoubleQuotes
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - class - col-md-10 - HtmlAttributeValueStyle.DoubleQuotes
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "608b3f7b9b29c66ee25bde2d20324b4bef1aa070"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages), @"mvc.1.0.razor-page", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -17,6 +18,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
|
|||
|
||||
#line default
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"608b3f7b9b29c66ee25bde2d20324b4bef1aa070", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages : global::Microsoft.AspNetCore.Mvc.RazorPages.Page
|
||||
{
|
||||
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("text-danger"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -10,6 +11,7 @@ Document -
|
|||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
UsingDirective - (55:4,1 [43] RazorPages.cshtml) - Microsoft.AspNetCore.Mvc.RazorPages
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - class - text-danger - HtmlAttributeValueStyle.DoubleQuotes
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - class - col-md-10 - HtmlAttributeValueStyle.DoubleQuotes
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "dbec91fd88a09c6a2e35b5adedb3f8ab8e3ae486"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"dbec91fd88a09c6a2e35b5adedb3f8ab8e3ae486", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<DateTime>
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<DateTime> -
|
||||
DefaultTagHelperRuntime -
|
||||
FieldDeclaration - - private - global::InputTestTagHelper - __InputTestTagHelper
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewComponentTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "6a0ad3c59f3a87877c36928472f0508bd40cdd8c"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewComponentTagHelper")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"6a0ad3c59f3a87877c36928472f0508bd40cdd8c", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewComponentTagHelper")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
|
||||
{
|
||||
private global::AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper.__Generated__TestViewComponentTagHelper __TestViewComponentTagHelper;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
FieldDeclaration - - private - global::AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper.__Generated__TestViewComponentTagHelper - __TestViewComponentTagHelper
|
||||
PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - bar - World - HtmlAttributeValueStyle.DoubleQuotes
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewWithNamespace.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "2893acf42354a0bc8b6a2698f5d2e4fab0e59dbe"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewWithNamespace), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewWithNamespace")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewWithNamespace))]
|
||||
namespace Test.Namespace
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace Test.Namespace
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"2893acf42354a0bc8b6a2698f5d2e4fab0e59dbe", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewWithNamespace")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewWithNamespace : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewWithNamespace))]
|
||||
NamespaceDeclaration - - Test.Namespace
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewWithNamespace - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode -
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/_ViewImports.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "e57bbc3e746e8b13b4c33d8df0e022bd397d8caa"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest__ViewImports), @"mvc.1.0.view", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/_ViewImports")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest__ViewImports))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
|
|
@ -12,6 +13,7 @@ namespace AspNetCore
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"e57bbc3e746e8b13b4c33d8df0e022bd397d8caa", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/_ViewImports")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest__ViewImports : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(null, typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest__ViewImports))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
|
|
@ -9,6 +10,7 @@ Document -
|
|||
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
|
||||
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
|
||||
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest__ViewImports - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/InstrumentationPassIntegrationTest/BasicTest.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "723b7da149db577d0c49cff7c00f2d831e8916e7"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Razor.Template), @"default", @"TestFiles/IntegrationTests/InstrumentationPassIntegrationTest/BasicTest")]
|
||||
namespace Razor
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"723b7da149db577d0c49cff7c00f2d831e8916e7", @"TestFiles/IntegrationTests/InstrumentationPassIntegrationTest/BasicTest")]
|
||||
public class Template
|
||||
{
|
||||
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", "Hello", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Razor
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - Template - -
|
||||
PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - value - Hello - HtmlAttributeValueStyle.DoubleQuotes
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - type - text - HtmlAttributeValueStyle.SingleQuotes
|
||||
|
|
|
|||
|
|
@ -1,16 +1,18 @@
|
|||
// 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 Microsoft.AspNetCore.Razor.Language.Intermediate;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
||||
{
|
||||
public class DefaultDocumentWriterTest
|
||||
{
|
||||
[Fact]
|
||||
public void WriteDocument_Empty_WritesChecksumAndMarksAutoGenerated()
|
||||
[Fact] // This test covers the whole process including actual hashing.
|
||||
public void WriteDocument_EndToEnd_WritesChecksumAndMarksAutoGenerated()
|
||||
{
|
||||
// Arrange
|
||||
var document = new DocumentIntermediateNode();
|
||||
|
|
@ -36,6 +38,106 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
|
|||
ignoreLineEndingDifferences: true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WriteDocument_SHA1_WritesChecksumAndMarksAutoGenerated()
|
||||
{
|
||||
// Arrange
|
||||
var checksumBytes = new byte[] { (byte)'t', (byte)'e', (byte)'s', (byte)'t', };
|
||||
|
||||
var sourceDocument = Mock.Of<RazorSourceDocument>(d =>
|
||||
d.FilePath == "test.cshtml" &&
|
||||
d.GetChecksum() == checksumBytes &&
|
||||
d.GetChecksumAlgorithm() == "SHA1");
|
||||
|
||||
var document = new DocumentIntermediateNode();
|
||||
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument);
|
||||
var options = RazorCodeGenerationOptions.CreateDefault();
|
||||
|
||||
var target = CodeTarget.CreateDefault(codeDocument, options);
|
||||
var writer = new DefaultDocumentWriter(target, options);
|
||||
|
||||
// Act
|
||||
var result = writer.WriteDocument(codeDocument, document);
|
||||
|
||||
// Assert
|
||||
var csharp = result.GeneratedCode;
|
||||
Assert.Equal(
|
||||
@"#pragma checksum ""test.cshtml"" ""{ff1816ec-aa5e-4d10-87f7-6f4963833460}"" ""74657374""
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
#pragma warning restore 1591
|
||||
",
|
||||
csharp,
|
||||
ignoreLineEndingDifferences: true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WriteDocument_SHA256_WritesChecksumAndMarksAutoGenerated()
|
||||
{
|
||||
// Arrange
|
||||
var checksumBytes = new byte[] { (byte)'t', (byte)'e', (byte)'s', (byte)'t', };
|
||||
|
||||
var sourceDocument = Mock.Of<RazorSourceDocument>(d =>
|
||||
d.FilePath == "test.cshtml" &&
|
||||
d.GetChecksum() == checksumBytes &&
|
||||
d.GetChecksumAlgorithm() == "SHA256");
|
||||
|
||||
var document = new DocumentIntermediateNode();
|
||||
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument);
|
||||
var options = RazorCodeGenerationOptions.CreateDefault();
|
||||
|
||||
var target = CodeTarget.CreateDefault(codeDocument, options);
|
||||
var writer = new DefaultDocumentWriter(target, options);
|
||||
|
||||
// Act
|
||||
var result = writer.WriteDocument(codeDocument, document);
|
||||
|
||||
// Assert
|
||||
var csharp = result.GeneratedCode;
|
||||
Assert.Equal(
|
||||
@"#pragma checksum ""test.cshtml"" ""{8829d00f-11b8-4213-878b-770e8597ac16}"" ""74657374""
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
#pragma warning restore 1591
|
||||
",
|
||||
csharp,
|
||||
ignoreLineEndingDifferences: true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WriteDocument_UnsupportedChecksumAlgorithm_Throws()
|
||||
{
|
||||
// Arrange
|
||||
var checksumBytes = new byte[] { (byte)'t', (byte)'e', (byte)'s', (byte)'t', };
|
||||
|
||||
var sourceDocument = Mock.Of<RazorSourceDocument>(d =>
|
||||
d.FilePath == "test.cshtml" &&
|
||||
d.GetChecksum() == checksumBytes &&
|
||||
d.GetChecksumAlgorithm() == "SHA3");
|
||||
|
||||
var document = new DocumentIntermediateNode();
|
||||
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument);
|
||||
var options = RazorCodeGenerationOptions.CreateDefault();
|
||||
|
||||
var target = CodeTarget.CreateDefault(codeDocument, options);
|
||||
var writer = new DefaultDocumentWriter(target, options);
|
||||
|
||||
// Act & Assert
|
||||
var exception = Assert.Throws<InvalidOperationException>(() =>
|
||||
{
|
||||
var result = writer.WriteDocument(codeDocument, document);
|
||||
});
|
||||
Assert.Equal(
|
||||
"The hash algorithm 'SHA3' is not supported for checksum generation. Supported algorithms are: 'SHA1 SHA256'. " +
|
||||
"Set 'RazorCodeGenerationOptions.SuppressChecksum' to 'True' to suppress automatic checksum generation.",
|
||||
exception.Message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Fact]
|
||||
public void WriteDocument_Empty_SuppressChecksumTrue_DoesnotWriteChecksum()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,365 @@
|
|||
// 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 Microsoft.AspNetCore.Razor.Language.Intermediate;
|
||||
using Xunit;
|
||||
using static Microsoft.AspNetCore.Razor.Language.Intermediate.IntermediateNodeAssert;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
||||
{
|
||||
public class MetadataAttributePassTest
|
||||
{
|
||||
[Fact]
|
||||
public void Execute_NullCodeGenerationOptions_Noops()
|
||||
{
|
||||
// Arrange
|
||||
var engine = CreateEngine();
|
||||
var pass = new MetadataAttributePass()
|
||||
{
|
||||
Engine = engine,
|
||||
};
|
||||
|
||||
var sourceDocument = TestRazorSourceDocument.Create();
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument);
|
||||
|
||||
var irDocument = new DocumentIntermediateNode();
|
||||
|
||||
// Act
|
||||
pass.Execute(codeDocument, irDocument);
|
||||
|
||||
// Assert
|
||||
NoChildren(irDocument);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_SuppressMetadataAttributes_Noops()
|
||||
{
|
||||
// Arrange
|
||||
var engine = CreateEngine();
|
||||
var pass = new MetadataAttributePass()
|
||||
{
|
||||
Engine = engine,
|
||||
};
|
||||
|
||||
var sourceDocument = TestRazorSourceDocument.Create();
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument);
|
||||
|
||||
var irDocument = new DocumentIntermediateNode()
|
||||
{
|
||||
Options = RazorCodeGenerationOptions.Create(o =>
|
||||
{
|
||||
o.SuppressMetadataAttributes = true;
|
||||
}),
|
||||
};
|
||||
|
||||
// Act
|
||||
pass.Execute(codeDocument, irDocument);
|
||||
|
||||
// Assert
|
||||
NoChildren(irDocument);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_NoNamespaceSet_Noops()
|
||||
{
|
||||
// Arrange
|
||||
var engine = CreateEngine();
|
||||
var pass = new MetadataAttributePass()
|
||||
{
|
||||
Engine = engine,
|
||||
};
|
||||
|
||||
var sourceDocument = TestRazorSourceDocument.Create();
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument);
|
||||
|
||||
var irDocument = new DocumentIntermediateNode()
|
||||
{
|
||||
DocumentKind = "test",
|
||||
Options = RazorCodeGenerationOptions.Create((o) => { }),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace,
|
||||
},
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
ClassName = "Test",
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
// Act
|
||||
pass.Execute(codeDocument, irDocument);
|
||||
|
||||
// Assert
|
||||
SingleChild<NamespaceDeclarationIntermediateNode>(irDocument);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_NoClassNameSet_Noops()
|
||||
{
|
||||
// Arrange
|
||||
var engine = CreateEngine();
|
||||
var pass = new MetadataAttributePass()
|
||||
{
|
||||
Engine = engine,
|
||||
};
|
||||
|
||||
var sourceDocument = TestRazorSourceDocument.Create();
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument);
|
||||
|
||||
var irDocument = new DocumentIntermediateNode()
|
||||
{
|
||||
DocumentKind = "test",
|
||||
Options = RazorCodeGenerationOptions.Create((o) => { }),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace,
|
||||
},
|
||||
Content = "Some.Namespace"
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
// Act
|
||||
pass.Execute(codeDocument, irDocument);
|
||||
|
||||
// Assert
|
||||
SingleChild<NamespaceDeclarationIntermediateNode>(irDocument);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_NoDocumentKind_Noops()
|
||||
{
|
||||
// Arrange
|
||||
var engine = CreateEngine();
|
||||
var pass = new MetadataAttributePass()
|
||||
{
|
||||
Engine = engine,
|
||||
};
|
||||
|
||||
var sourceDocument = TestRazorSourceDocument.Create();
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument);
|
||||
|
||||
var irDocument = new DocumentIntermediateNode();
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace,
|
||||
},
|
||||
Content = "Some.Namespace"
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
ClassName = "Test",
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
// Act
|
||||
pass.Execute(codeDocument, irDocument);
|
||||
|
||||
// Assert
|
||||
SingleChild<NamespaceDeclarationIntermediateNode>(irDocument);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_NoIdentifier_Noops()
|
||||
{
|
||||
// Arrange
|
||||
var engine = CreateEngine();
|
||||
var pass = new MetadataAttributePass()
|
||||
{
|
||||
Engine = engine,
|
||||
};
|
||||
|
||||
var sourceDocument = TestRazorSourceDocument.Create();
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument);
|
||||
|
||||
var irDocument = new DocumentIntermediateNode()
|
||||
{
|
||||
DocumentKind = "test",
|
||||
Options = RazorCodeGenerationOptions.Create((o) => { }),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace,
|
||||
},
|
||||
Content = "Some.Namespace"
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
ClassName = "Test",
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
// Act
|
||||
pass.Execute(codeDocument, irDocument);
|
||||
|
||||
// Assert
|
||||
SingleChild<NamespaceDeclarationIntermediateNode>(irDocument);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_HasRequiredInfo_AddsItemAndSourceChecksum()
|
||||
{
|
||||
// Arrange
|
||||
var engine = CreateEngine();
|
||||
var pass = new MetadataAttributePass()
|
||||
{
|
||||
Engine = engine,
|
||||
};
|
||||
|
||||
var sourceDocument = TestRazorSourceDocument.Create();
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument);
|
||||
codeDocument.SetIdentifier("Foo/Bar");
|
||||
|
||||
var irDocument = new DocumentIntermediateNode()
|
||||
{
|
||||
DocumentKind = "test",
|
||||
Options = RazorCodeGenerationOptions.Create((o) => { }),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace,
|
||||
},
|
||||
Content = "Some.Namespace"
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
ClassName = "Test",
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
// Act
|
||||
pass.Execute(codeDocument, irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Equal(2, irDocument.Children.Count);
|
||||
|
||||
var item = Assert.IsType<RazorCompiledItemAttributeIntermediateNode>(irDocument.Children[0]);
|
||||
Assert.Equal("Foo/Bar", item.Identifier);
|
||||
Assert.Equal("test", item.Kind);
|
||||
Assert.Equal("Some.Namespace.Test", item.TypeName);
|
||||
|
||||
Assert.Equal(2, @namespace.Children.Count);
|
||||
var checksum = Assert.IsType<RazorSourceChecksumAttributeIntermediateNode>(@namespace.Children[0]);
|
||||
Assert.NotNull(checksum.Checksum); // Not verifying the checksum here
|
||||
Assert.Equal("SHA1", checksum.ChecksumAlgorithm);
|
||||
Assert.Equal("Foo/Bar", checksum.Identifier);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_HasRequiredInfo_AndImport_AddsItemAndSourceChecksum()
|
||||
{
|
||||
// Arrange
|
||||
var engine = CreateEngine();
|
||||
var pass = new MetadataAttributePass()
|
||||
{
|
||||
Engine = engine,
|
||||
};
|
||||
|
||||
var sourceDocument = TestRazorSourceDocument.Create();
|
||||
var import = TestRazorSourceDocument.Create("@using System");
|
||||
var codeDocument = RazorCodeDocument.Create(sourceDocument, new[] { import, });
|
||||
codeDocument.SetIdentifier("Foo/Bar");
|
||||
codeDocument.SetImportIdentifiers(new[] { "Foo/Import" });
|
||||
|
||||
var irDocument = new DocumentIntermediateNode()
|
||||
{
|
||||
DocumentKind = "test",
|
||||
Options = RazorCodeGenerationOptions.Create((o) => { }),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace,
|
||||
},
|
||||
Content = "Some.Namespace"
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
ClassName = "Test",
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
// Act
|
||||
pass.Execute(codeDocument, irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Equal(2, irDocument.Children.Count);
|
||||
|
||||
var item = Assert.IsType<RazorCompiledItemAttributeIntermediateNode>(irDocument.Children[0]);
|
||||
Assert.Equal("Foo/Bar", item.Identifier);
|
||||
Assert.Equal("test", item.Kind);
|
||||
Assert.Equal("Some.Namespace.Test", item.TypeName);
|
||||
|
||||
Assert.Equal(3, @namespace.Children.Count);
|
||||
var checksum = Assert.IsType<RazorSourceChecksumAttributeIntermediateNode>(@namespace.Children[0]);
|
||||
Assert.NotNull(checksum.Checksum); // Not verifying the checksum here
|
||||
Assert.Equal("SHA1", checksum.ChecksumAlgorithm);
|
||||
Assert.Equal("Foo/Bar", checksum.Identifier);
|
||||
|
||||
checksum = Assert.IsType<RazorSourceChecksumAttributeIntermediateNode>(@namespace.Children[1]);
|
||||
Assert.NotNull(checksum.Checksum); // Not verifying the checksum here
|
||||
Assert.Equal("SHA1", checksum.ChecksumAlgorithm);
|
||||
Assert.Equal("Foo/Import", checksum.Identifier);
|
||||
}
|
||||
|
||||
private static RazorEngine CreateEngine()
|
||||
{
|
||||
return RazorEngine.Create(b =>
|
||||
{
|
||||
InheritsDirective.Register(b);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
// 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 Microsoft.AspNetCore.Razor.Language.CodeGeneration;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
||||
{
|
||||
public class MetadataAttributeTargetExtensionTest
|
||||
{
|
||||
[Fact]
|
||||
public void WriteRazorCompiledItemAttribute_RendersCorrectly()
|
||||
{
|
||||
// Arrange
|
||||
var extension = new MetadataAttributeTargetExtension()
|
||||
{
|
||||
CompiledItemAttributeName = "global::TestItem",
|
||||
};
|
||||
var context = TestCodeRenderingContext.CreateRuntime();
|
||||
|
||||
var node = new RazorCompiledItemAttributeIntermediateNode()
|
||||
{
|
||||
TypeName = "Foo.Bar",
|
||||
Kind = "test",
|
||||
Identifier = "Foo/Bar",
|
||||
};
|
||||
|
||||
// Act
|
||||
extension.WriteRazorCompiledItemAttribute(context, node);
|
||||
|
||||
// Assert
|
||||
var csharp = context.CodeWriter.GenerateCode();
|
||||
Assert.Equal(
|
||||
@"[assembly: global::TestItem(typeof(Foo.Bar), @""test"", @""Foo/Bar"")]
|
||||
",
|
||||
csharp,
|
||||
ignoreLineEndingDifferences: true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WriteRazorSourceChecksumAttribute_RendersCorrectly()
|
||||
{
|
||||
// Arrange
|
||||
var extension = new MetadataAttributeTargetExtension()
|
||||
{
|
||||
SourceChecksumAttributeName = "global::TestChecksum",
|
||||
};
|
||||
var context = TestCodeRenderingContext.CreateRuntime();
|
||||
|
||||
var node = new RazorSourceChecksumAttributeIntermediateNode()
|
||||
{
|
||||
ChecksumAlgorithm = "SHA1",
|
||||
Checksum = new byte[] { (byte)'t', (byte)'e', (byte)'s', (byte)'t', },
|
||||
Identifier = "Foo/Bar",
|
||||
};
|
||||
|
||||
// Act
|
||||
extension.WriteRazorSourceChecksumAttribute(context, node);
|
||||
|
||||
// Assert
|
||||
var csharp = context.CodeWriter.GenerateCode();
|
||||
Assert.Equal(
|
||||
@"[global::TestChecksum(@""SHA1"", @""74657374"", @""Foo/Bar"")]
|
||||
",
|
||||
csharp,
|
||||
ignoreLineEndingDifferences: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -885,7 +885,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
|
|||
// Arrange
|
||||
var engine = RazorEngine.CreateDesignTime(builder =>
|
||||
{
|
||||
builder.Features.Add(new ApiSetsIRTestAdapter());
|
||||
builder.ConfigureDocumentClassifier();
|
||||
|
||||
// Some of these tests use templates
|
||||
builder.AddTargetExtension(new TemplateTargetExtension());
|
||||
|
|
@ -911,7 +911,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
|
|||
// Arrange
|
||||
var engine = RazorEngine.Create(builder =>
|
||||
{
|
||||
builder.Features.Add(new ApiSetsIRTestAdapter());
|
||||
builder.ConfigureDocumentClassifier();
|
||||
|
||||
// Some of these tests use templates
|
||||
builder.AddTargetExtension(new TemplateTargetExtension());
|
||||
|
|
@ -936,7 +936,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
|
|||
// Arrange
|
||||
var engine = RazorEngine.Create(builder =>
|
||||
{
|
||||
builder.Features.Add(new ApiSetsIRTestAdapter());
|
||||
builder.ConfigureDocumentClassifier();
|
||||
builder.AddTagHelpers(descriptors);
|
||||
|
||||
// Some of these tests use templates
|
||||
|
|
@ -962,7 +962,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
|
|||
// Arrange
|
||||
var engine = RazorEngine.CreateDesignTime(builder =>
|
||||
{
|
||||
builder.Features.Add(new ApiSetsIRTestAdapter());
|
||||
builder.ConfigureDocumentClassifier();
|
||||
builder.AddTagHelpers(descriptors);
|
||||
|
||||
// Some of these tests use templates
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
|
|||
// Arrange
|
||||
var engine = RazorEngine.CreateDesignTime(builder =>
|
||||
{
|
||||
builder.Features.Add(new ApiSetsIRTestAdapter());
|
||||
builder.ConfigureDocumentClassifier();
|
||||
|
||||
builder.AddDirective(DirectiveDescriptor.CreateDirective("custom", DirectiveKind.SingleLine, b => b.AddNamespaceToken()));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,6 +9,71 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
{
|
||||
public class RazorCodeDocumentExtensionsTest
|
||||
{
|
||||
[Fact]
|
||||
public void GetIdentifier_ReturnsIdentifier()
|
||||
{
|
||||
// Arrange
|
||||
var codeDocument = TestRazorCodeDocument.CreateEmpty();
|
||||
|
||||
var expected = "test";
|
||||
codeDocument.Items[RazorCodeDocumentExtensions.IdentifierKey] = expected;
|
||||
|
||||
// Act
|
||||
var actual = codeDocument.GetIdentifier();
|
||||
|
||||
// Assert
|
||||
Assert.Same(expected, actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SetIdentifier_SetsIdentifier()
|
||||
{
|
||||
// Arrange
|
||||
var codeDocument = TestRazorCodeDocument.CreateEmpty();
|
||||
|
||||
var expected = "test";
|
||||
|
||||
// Act
|
||||
codeDocument.SetIdentifier(expected);
|
||||
|
||||
// Assert
|
||||
Assert.Same(expected, codeDocument.Items[RazorCodeDocumentExtensions.IdentifierKey]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetImportIdentifiers_ReturnsIdentifiers()
|
||||
{
|
||||
// Arrange
|
||||
var codeDocument = TestRazorCodeDocument.CreateEmpty();
|
||||
|
||||
var expected = new string[] { "test1", "test2" };
|
||||
codeDocument.Items[RazorCodeDocumentExtensions.ImportIdentifiersKey] = expected;
|
||||
|
||||
// Act
|
||||
var actual = codeDocument.GetImportIdentifiers();
|
||||
|
||||
// Assert
|
||||
Assert.Same(expected, actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SetImportIdentifiers_SetsIdentifiers()
|
||||
{
|
||||
// Arrange
|
||||
var codeDocument = TestRazorCodeDocument.CreateEmpty();
|
||||
|
||||
var expected = new string[] { "test1", "test2" };
|
||||
|
||||
// Act
|
||||
codeDocument.SetImportIdentifiers(expected);
|
||||
|
||||
// Assert
|
||||
Assert.Equal(expected, codeDocument.Items[RazorCodeDocumentExtensions.ImportIdentifiersKey]);
|
||||
|
||||
// Not the same, but equal, it makes a defensive copy.
|
||||
Assert.NotSame(expected, codeDocument.Items[RazorCodeDocumentExtensions.ImportIdentifiersKey]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetRazorSyntaxTree_ReturnsSyntaxTree()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
Assert.Collection(
|
||||
feature.TargetExtensions,
|
||||
extension => Assert.IsType<MetadataAttributeTargetExtension>(extension),
|
||||
extension => Assert.False(Assert.IsType<DefaultTagHelperTargetExtension>(extension).DesignTime),
|
||||
extension => Assert.IsType<PreallocatedAttributeTargetExtension>(extension));
|
||||
}
|
||||
|
|
@ -157,6 +158,7 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
feature => Assert.IsType<DefaultDirectiveSyntaxTreePass>(feature),
|
||||
feature => Assert.IsType<HtmlNodeOptimizationPass>(feature),
|
||||
feature => Assert.IsType<DefaultDocumentClassifierPass>(feature),
|
||||
feature => Assert.IsType<MetadataAttributePass>(feature),
|
||||
feature => Assert.IsType<DirectiveRemovalOptimizationPass>(feature),
|
||||
feature => Assert.IsType<DefaultTagHelperOptimizationPass>(feature),
|
||||
feature => Assert.IsType<DefaultDocumentClassifierPassFeature>(feature),
|
||||
|
|
@ -186,6 +188,7 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
Assert.Collection(
|
||||
feature.TargetExtensions,
|
||||
extension => Assert.IsType<MetadataAttributeTargetExtension>(extension),
|
||||
extension => Assert.True(Assert.IsType<DefaultTagHelperTargetExtension>(extension).DesignTime),
|
||||
extension => Assert.IsType<DesignTimeDirectiveTargetExtension>(extension));
|
||||
}
|
||||
|
|
@ -199,6 +202,7 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
feature => Assert.IsType<DefaultDirectiveSyntaxTreePass>(feature),
|
||||
feature => Assert.IsType<HtmlNodeOptimizationPass>(feature),
|
||||
feature => Assert.IsType<DefaultDocumentClassifierPass>(feature),
|
||||
feature => Assert.IsType<MetadataAttributePass>(feature),
|
||||
feature => Assert.IsType<DirectiveRemovalOptimizationPass>(feature),
|
||||
feature => Assert.IsType<DefaultTagHelperOptimizationPass>(feature),
|
||||
feature => Assert.IsType<DefaultDocumentClassifierPassFeature>(feature),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Razor
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - Template - -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Razor
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - Template - -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Razor
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - Template - -
|
||||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [13] HelloWorld.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ea06819774d4f892a37cc84688446440dee29bd6"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AttributeTargetingTagHelpers_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"ea06819774d4f892a37cc84688446440dee29bd6", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AttributeTargetingTagHelpers_Runtime
|
||||
{
|
||||
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchAll", new global::Microsoft.AspNetCore.Html.HtmlString("hi"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AttributeTargetingTagHelpers_Runtime - -
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - catchAll - hi - HtmlAttributeValueStyle.DoubleQuotes
|
||||
PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_1 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "00b5e01b7a405dcfde7e4d512ee930daaa1778b5"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"00b5e01b7a405dcfde7e4d512ee930daaa1778b5", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_Runtime
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_Runtime - -
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (91:6,0 [100] Await.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d351c0c4dc0afdbf46547fcd87692951d2e4871f"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicImports_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
|
|
@ -19,6 +20,9 @@ using System.Text;
|
|||
|
||||
#line default
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"d351c0c4dc0afdbf46547fcd87692951d2e4871f", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports")]
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"8aa538f3517d6d8922adaf817015cf8a61a57046", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports0")]
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"ad27b5360a3a2ab427f824e417620a745c0f45de", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports1")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicImports_Runtime : Hello
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
UsingDirective - (1:0,1 [28] BasicImports_Imports0.cshtml) - System.Globalization
|
||||
UsingDirective - (30:1,1 [29] BasicImports_Imports0.cshtml) - System.ComponentModel
|
||||
UsingDirective - (23:1,1 [20] BasicImports_Imports1.cshtml) - System.Text
|
||||
RazorSourceChecksumAttribute -
|
||||
RazorSourceChecksumAttribute -
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicImports_Runtime - Hello -
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [18] BasicImports.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "e05d346bc9435e651c4c8f34515c1b5f2cff294a"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Prefixed_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"e05d346bc9435e651c4c8f34515c1b5f2cff294a", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Prefixed_Runtime
|
||||
{
|
||||
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Prefixed_Runtime - -
|
||||
PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - class - Hello World - HtmlAttributeValueStyle.DoubleQuotes
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "8479a280916bffac36ca773a941b3f9155fe4ace"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_RemoveTagHelper_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"8479a280916bffac36ca773a941b3f9155fe4ace", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_RemoveTagHelper")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_RemoveTagHelper_Runtime
|
||||
{
|
||||
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_RemoveTagHelper_Runtime - -
|
||||
PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - type - text - HtmlAttributeValueStyle.DoubleQuotes
|
||||
PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_1 - type - checkbox - HtmlAttributeValueStyle.DoubleQuotes
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "56c40717284b82fcb2ee9f60f09e8c6c0bda8959"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"56c40717284b82fcb2ee9f60f09e8c6c0bda8959", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Runtime
|
||||
{
|
||||
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data", new global::Microsoft.AspNetCore.Html.HtmlString("-delay1000"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Runtime - -
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - data - -delay1000 - HtmlAttributeValueStyle.DoubleQuotes
|
||||
PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_1 - type - text - HtmlAttributeValueStyle.DoubleQuotes
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ba7d8f5f5159a2389c780aa606885ef6c917a45a"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"ba7d8f5f5159a2389c780aa606885ef6c917a45a", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_Runtime
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_Runtime - -
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [18] Blocks.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d287720a0df9d4595ed4f009c44479d9c7b0a800"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp7_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"d287720a0df9d4595ed4f009c44479d9c7b0a800", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CSharp7")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp7_Runtime
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CSharp7_Runtime - -
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (0:0,0 [8] CSharp7.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5f82673b13daf5e28291f3bfb58df5e3a94e13cc"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"5f82673b13daf5e28291f3bfb58df5e3a94e13cc", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_Runtime
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_Runtime - -
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [0] CodeBlockAtEOF.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "13e48ff59aab8106ceb68dd4a10b0bdf10c322fc"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"13e48ff59aab8106ceb68dd4a10b0bdf10c322fc", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_Runtime
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_Runtime - -
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [17] CodeBlockWithTextElement.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "019ce8023d064d08ca88c597b764aea895ec5841"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"019ce8023d064d08ca88c597b764aea895ec5841", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_Runtime
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_Runtime - -
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [115] CodeBlock.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "6c8cd00002dfc24a4fd1b1c3f079728b7697257f"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ComplexTagHelpers_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"6c8cd00002dfc24a4fd1b1c3f079728b7697257f", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ComplexTagHelpers_Runtime
|
||||
{
|
||||
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ComplexTagHelpers_Runtime - -
|
||||
PreallocatedTagHelperPropertyValue - - __tagHelperAttribute_0 - type - text - HtmlAttributeValueStyle.DoubleQuotes
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - value - - HtmlAttributeValueStyle.DoubleQuotes
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "088be4e50958bcab0f1d1ac04d2c28dcd8049bf5"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ConditionalAttributes_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"088be4e50958bcab0f1d1ac04d2c28dcd8049bf5", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ConditionalAttributes_Runtime
|
||||
{
|
||||
#pragma warning disable 1998
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ConditionalAttributes_Runtime - -
|
||||
MethodDeclaration - - public async - System.Threading.Tasks.Task - ExecuteAsync
|
||||
CSharpCode - (2:0,2 [44] ConditionalAttributes.cshtml)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "1ba28534da506a7c741c3d82251fd700658ff7c8"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CssSelectorTagHelperAttributes_Runtime), @"default", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes")]
|
||||
namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
{
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"1ba28534da506a7c741c3d82251fd700658ff7c8", @"TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CssSelectorTagHelperAttributes")]
|
||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CssSelectorTagHelperAttributes_Runtime
|
||||
{
|
||||
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("href", new global::Microsoft.AspNetCore.Html.HtmlString("~/"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
|
||||
RazorSourceChecksumAttribute -
|
||||
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CssSelectorTagHelperAttributes_Runtime - -
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_0 - href - ~/ - HtmlAttributeValueStyle.DoubleQuotes
|
||||
PreallocatedTagHelperHtmlAttributeValue - - __tagHelperAttribute_1 - href - ~/hello - HtmlAttributeValueStyle.DoubleQuotes
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue