Code dump of component tests
This is a dump of the existing component codegen tests from
the Blazor effort.
I'm also adding the minimal Component types as a new shim to get things
to compile. This is similar to how our shims work already for MVC.
The next step will be add port functionality until the tests pass.
\n\nCommit migrated from 49f49dd9f0
This commit is contained in:
parent
9fc340553f
commit
2c2ff1f592
|
|
@ -0,0 +1,322 @@
|
|||
// 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.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Razor.Language.Intermediate;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language
|
||||
{
|
||||
internal static class ComponentDiagnosticFactory
|
||||
{
|
||||
public static readonly RazorDiagnosticDescriptor CodeBlockInAttribute =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9979",
|
||||
() =>
|
||||
"Code blocks delimited by '@{...}' like '@{{ {0} }}' for attributes are no longer supported " +
|
||||
"These features have been changed to use attribute syntax. " +
|
||||
"Use 'attr=\"@(x => {... }\"'.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_CodeBlockInAttribute(SourceSpan? source, string expression)
|
||||
{
|
||||
var diagnostic = RazorDiagnostic.Create(
|
||||
CodeBlockInAttribute,
|
||||
source ?? SourceSpan.Undefined,
|
||||
expression);
|
||||
return diagnostic;
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor UnclosedTag = new RazorDiagnosticDescriptor(
|
||||
"BL9980",
|
||||
() => "Unclosed tag '{0}' with no matching end tag.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_UnclosedTag(SourceSpan? span, string tagName)
|
||||
{
|
||||
return RazorDiagnostic.Create(UnclosedTag, span ?? SourceSpan.Undefined, tagName);
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor UnexpectedClosingTag = new RazorDiagnosticDescriptor(
|
||||
"BL9981",
|
||||
() => "Unexpected closing tag '{0}' with no matching start tag.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_UnexpectedClosingTag(SourceSpan? span, string tagName)
|
||||
{
|
||||
return RazorDiagnostic.Create(UnexpectedClosingTag, span ?? SourceSpan.Undefined, tagName);
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor MismatchedClosingTag = new RazorDiagnosticDescriptor(
|
||||
"BL9982",
|
||||
() => "Mismatching closing tag. Found '{0}' but expected '{1}'.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_MismatchedClosingTag(SourceSpan? span, string expectedTagName, string tagName)
|
||||
{
|
||||
return RazorDiagnostic.Create(MismatchedClosingTag, span ?? SourceSpan.Undefined, expectedTagName, tagName);
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor UnexpectedClosingTagForVoidElement = new RazorDiagnosticDescriptor(
|
||||
"BL9983",
|
||||
() => "Unexpected closing tag '{0}'. The element '{0}' is a void element, and should be used without a closing tag.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_UnexpectedClosingTagForVoidElement(SourceSpan? span, string tagName)
|
||||
{
|
||||
return RazorDiagnostic.Create(UnexpectedClosingTagForVoidElement, span ?? SourceSpan.Undefined, tagName);
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor InvalidHtmlContent = new RazorDiagnosticDescriptor(
|
||||
"BL9984",
|
||||
() => "Found invalid HTML content. Text '{0}'",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_InvalidHtmlContent(SourceSpan? span, string text)
|
||||
{
|
||||
return RazorDiagnostic.Create(InvalidHtmlContent, span ?? SourceSpan.Undefined, text);
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor MultipleComponents = new RazorDiagnosticDescriptor(
|
||||
"BL9985",
|
||||
() => "Multiple components use the tag '{0}'. Components: {1}",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_MultipleComponents(SourceSpan? span, string tagName, IEnumerable<TagHelperDescriptor> components)
|
||||
{
|
||||
return RazorDiagnostic.Create(MultipleComponents, span ?? SourceSpan.Undefined, tagName, string.Join(", ", components.Select(c => c.DisplayName)));
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor UnsupportedComplexContent = new RazorDiagnosticDescriptor(
|
||||
"BL9986",
|
||||
() => "Component attributes do not support complex content (mixed C# and markup). Attribute: '{0}', text '{1}'",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_UnsupportedComplexContent(IntermediateNode node, string attributeName)
|
||||
{
|
||||
var content = string.Join("", node.FindDescendantNodes<IntermediateToken>().Select(t => t.Content));
|
||||
return RazorDiagnostic.Create(UnsupportedComplexContent, node.Source ?? SourceSpan.Undefined, attributeName, content);
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor PageDirective_CannotBeImported =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9987",
|
||||
() => ComponentResources.PageDirectiveCannotBeImported,
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic CreatePageDirective_CannotBeImported(SourceSpan source)
|
||||
{
|
||||
var fileName = Path.GetFileName(source.FilePath);
|
||||
var diagnostic = RazorDiagnostic.Create(PageDirective_CannotBeImported, source, "page", fileName);
|
||||
|
||||
return diagnostic;
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor PageDirective_MustSpecifyRoute =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9988",
|
||||
() => "The @page directive must specify a route template. The route template must be enclosed in quotes and begin with the '/' character.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic CreatePageDirective_MustSpecifyRoute(SourceSpan? source)
|
||||
{
|
||||
var diagnostic = RazorDiagnostic.Create(PageDirective_MustSpecifyRoute, source ?? SourceSpan.Undefined);
|
||||
return diagnostic;
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor BindAttribute_Duplicates =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9989",
|
||||
() => "The attribute '{0}' was matched by multiple bind attributes. Duplicates:{1}",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic CreateBindAttribute_Duplicates(SourceSpan? source, string attribute, TagHelperPropertyIntermediateNode[] attributes)
|
||||
{
|
||||
var diagnostic = RazorDiagnostic.Create(
|
||||
BindAttribute_Duplicates,
|
||||
source ?? SourceSpan.Undefined,
|
||||
attribute,
|
||||
Environment.NewLine + string.Join(Environment.NewLine, attributes.Select(p => p.TagHelper.DisplayName)));
|
||||
return diagnostic;
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor EventHandler_Duplicates =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9990",
|
||||
() => "The attribute '{0}' was matched by multiple event handlers attributes. Duplicates:{1}",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic CreateEventHandler_Duplicates(SourceSpan? source, string attribute, TagHelperPropertyIntermediateNode[] attributes)
|
||||
{
|
||||
var diagnostic = RazorDiagnostic.Create(
|
||||
EventHandler_Duplicates,
|
||||
source ?? SourceSpan.Undefined,
|
||||
attribute,
|
||||
Environment.NewLine + string.Join(Environment.NewLine, attributes.Select(p => p.TagHelper.DisplayName)));
|
||||
return diagnostic;
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor BindAttribute_InvalidSyntax =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9991",
|
||||
() => "The attribute names could not be inferred from bind attribute '{0}'. Bind attributes should be of the form" +
|
||||
"'bind', 'bind-value' or 'bind-value-change'",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic CreateBindAttribute_InvalidSyntax(SourceSpan? source, string attribute)
|
||||
{
|
||||
var diagnostic = RazorDiagnostic.Create(
|
||||
BindAttribute_InvalidSyntax,
|
||||
source ?? SourceSpan.Undefined,
|
||||
attribute);
|
||||
return diagnostic;
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor DisallowedScriptTag = new RazorDiagnosticDescriptor(
|
||||
"BL9992",
|
||||
() => "Script tags should not be placed inside components because they cannot be updated dynamically. To fix this, move the script tag to the 'index.html' file or another static location. For more information see https://go.microsoft.com/fwlink/?linkid=872131",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
// Reserved: BL9993 Component parameters should not be public
|
||||
|
||||
public static RazorDiagnostic Create_DisallowedScriptTag(SourceSpan? source)
|
||||
{
|
||||
var diagnostic = RazorDiagnostic.Create(DisallowedScriptTag, source ?? SourceSpan.Undefined);
|
||||
return diagnostic;
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor TemplateInvalidLocation =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9994",
|
||||
() => "Razor templates cannot be used in attributes.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_TemplateInvalidLocation(SourceSpan? source)
|
||||
{
|
||||
return RazorDiagnostic.Create(TemplateInvalidLocation, source ?? SourceSpan.Undefined);
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor ChildContentSetByAttributeAndBody =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9995",
|
||||
() => "The child content property '{0}' is set by both the attribute and the element contents.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_ChildContentSetByAttributeAndBody(SourceSpan? source, string attribute)
|
||||
{
|
||||
return RazorDiagnostic.Create(ChildContentSetByAttributeAndBody, source ?? SourceSpan.Undefined, attribute);
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor ChildContentMixedWithExplicitChildContent =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9996",
|
||||
() => "Unrecognized child content inside component '{0}'. The component '{0}' accepts child content through the " +
|
||||
"following top-level items: {1}.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
//public static RazorDiagnostic Create_ChildContentMixedWithExplicitChildContent(SourceSpan? source, ComponentExtensionNode component)
|
||||
//{
|
||||
// var supportedElements = string.Join(", ", component.Component.GetChildContentProperties().Select(p => $"'{p.Name}'"));
|
||||
// return RazorDiagnostic.Create(ChildContentMixedWithExplicitChildContent, source ?? SourceSpan.Undefined, component.TagName, supportedElements);
|
||||
//}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor ChildContentHasInvalidAttribute =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9997",
|
||||
() => "Unrecognized attribute '{0}' on child content element '{1}'.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_ChildContentHasInvalidAttribute(SourceSpan? source, string attribute, string element)
|
||||
{
|
||||
return RazorDiagnostic.Create(ChildContentHasInvalidAttribute, source ?? SourceSpan.Undefined, attribute, element);
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor ChildContentHasInvalidParameter =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9998",
|
||||
() => "Invalid parameter name. The parameter name attribute '{0}' on child content element '{1}' can only include literal text.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
public static RazorDiagnostic Create_ChildContentHasInvalidParameter(SourceSpan? source, string attribute, string element)
|
||||
{
|
||||
return RazorDiagnostic.Create(ChildContentHasInvalidParameter, source ?? SourceSpan.Undefined, attribute, element);
|
||||
}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor ChildContentRepeatedParameterName =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL9999",
|
||||
() => "The child content element '{0}' of component '{1}' uses the same parameter name ('{2}') as enclosing child content " +
|
||||
"element '{3}' of component '{4}'. Specify the parameter name like: '<{0} Context=\"another_name\"> to resolve the ambiguity",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
//public static RazorDiagnostic Create_ChildContentRepeatedParameterName(
|
||||
// SourceSpan? source,
|
||||
// ComponentChildContentIntermediateNode childContent1,
|
||||
// ComponentExtensionNode component1,
|
||||
// ComponentChildContentIntermediateNode childContent2,
|
||||
// ComponentExtensionNode component2)
|
||||
//{
|
||||
// Debug.Assert(childContent1.ParameterName == childContent2.ParameterName);
|
||||
// Debug.Assert(childContent1.IsParameterized);
|
||||
// Debug.Assert(childContent2.IsParameterized);
|
||||
|
||||
// return RazorDiagnostic.Create(
|
||||
// ChildContentRepeatedParameterName,
|
||||
// source ?? SourceSpan.Undefined,
|
||||
// childContent1.AttributeName,
|
||||
// component1.TagName,
|
||||
// childContent1.ParameterName,
|
||||
// childContent2.AttributeName,
|
||||
// component2.TagName);
|
||||
//}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor GenericComponentMissingTypeArgument =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL10000",
|
||||
() => "The component '{0}' is missing required type arguments. Specify the missing types using the attributes: {1}.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
//public static RazorDiagnostic Create_GenericComponentMissingTypeArgument(
|
||||
// SourceSpan? source,
|
||||
// ComponentExtensionNode component,
|
||||
// IEnumerable<BoundAttributeDescriptor> attributes)
|
||||
//{
|
||||
// Debug.Assert(component.Component.IsGenericTypedComponent());
|
||||
|
||||
// var attributesText = string.Join(", ", attributes.Select(a => $"'{a.Name}'"));
|
||||
// return RazorDiagnostic.Create(GenericComponentMissingTypeArgument, source ?? SourceSpan.Undefined, component.TagName, attributesText);
|
||||
//}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor GenericComponentTypeInferenceUnderspecified =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL10001",
|
||||
() => "The type of component '{0}' cannot be inferred based on the values provided. Consider specifying the type arguments " +
|
||||
"directly using the following attributes: {1}.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
//public static RazorDiagnostic Create_GenericComponentTypeInferenceUnderspecified(
|
||||
// SourceSpan? source,
|
||||
// ComponentExtensionNode component,
|
||||
// IEnumerable<BoundAttributeDescriptor> attributes)
|
||||
//{
|
||||
// Debug.Assert(component.Component.IsGenericTypedComponent());
|
||||
|
||||
// var attributesText = string.Join(", ", attributes.Select(a => $"'{a.Name}'"));
|
||||
// return RazorDiagnostic.Create(GenericComponentTypeInferenceUnderspecified, source ?? SourceSpan.Undefined, component.TagName, attributesText);
|
||||
//}
|
||||
|
||||
public static readonly RazorDiagnosticDescriptor ChildContentHasInvalidParameterOnComponent =
|
||||
new RazorDiagnosticDescriptor(
|
||||
"BL10002",
|
||||
() => "Invalid parameter name. The parameter name attribute '{0}' on component '{1}' can only include literal text.",
|
||||
RazorDiagnosticSeverity.Error);
|
||||
|
||||
//public static RazorDiagnostic Create_ChildContentHasInvalidParameterOnComponent(SourceSpan? source, string attribute, string element)
|
||||
//{
|
||||
// return RazorDiagnostic.Create(ChildContentHasInvalidParameterOnComponent, source ?? SourceSpan.Undefined, attribute, element);
|
||||
//}
|
||||
}
|
||||
}
|
||||
270
src/Razor/Microsoft.AspNetCore.Razor.Language/src/ComponentResources.Designer.cs
generated
Normal file
270
src/Razor/Microsoft.AspNetCore.Razor.Language/src/ComponentResources.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,270 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Language {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class ComponentResources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal ComponentResources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.AspNetCore.Razor.Language.ComponentResources", typeof(ComponentResources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Binds the provided expression to the '{0}' property and a change event delegate to the '{1}' property of the component..
|
||||
/// </summary>
|
||||
internal static string BindTagHelper_Component_Documentation {
|
||||
get {
|
||||
return ResourceManager.GetString("BindTagHelper_Component_Documentation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Binds the provided expression to the '{0}' attribute and a change event delegate to the '{1}' attribute..
|
||||
/// </summary>
|
||||
internal static string BindTagHelper_Element_Documentation {
|
||||
get {
|
||||
return ResourceManager.GetString("BindTagHelper_Element_Documentation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Specifies a format to convert the value specified by the '{0}' attribute. The format string can currently only be used with expressions of type <code>DateTime</code>..
|
||||
/// </summary>
|
||||
internal static string BindTagHelper_Element_Format_Documentation {
|
||||
get {
|
||||
return ResourceManager.GetString("BindTagHelper_Element_Format_Documentation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Binds the provided expression to an attribute and a change event, based on the naming of the bind attribute. For example: <code>bind-value-onchange="..."</code> will assign the current value of the expression to the 'value' attribute, and assign a delegate that attempts to set the value to the 'onchange' attribute..
|
||||
/// </summary>
|
||||
internal static string BindTagHelper_Fallback_Documentation {
|
||||
get {
|
||||
return ResourceManager.GetString("BindTagHelper_Fallback_Documentation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Specifies a format to convert the value specified by the corresponding bind attribute. For example: <code>format-value="..."</code> will apply a format string to the value specified in <code>bind-value-...</code>. The format string can currently only be used with expressions of type <code>DateTime</code>..
|
||||
/// </summary>
|
||||
internal static string BindTagHelper_Fallback_Format_Documentation {
|
||||
get {
|
||||
return ResourceManager.GetString("BindTagHelper_Fallback_Format_Documentation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Specifies the parameter name for the '{0}' child content expression..
|
||||
/// </summary>
|
||||
internal static string ChildContentParameterName_Documentation {
|
||||
get {
|
||||
return ResourceManager.GetString("ChildContentParameterName_Documentation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Specifies the parameter name for all child content expressions..
|
||||
/// </summary>
|
||||
internal static string ChildContentParameterName_TopLevelDocumentation {
|
||||
get {
|
||||
return ResourceManager.GetString("ChildContentParameterName_TopLevelDocumentation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Specifies the type of the type parameter {0} for the {1} component..
|
||||
/// </summary>
|
||||
internal static string ComponentTypeParameter_Documentation {
|
||||
get {
|
||||
return ResourceManager.GetString("ComponentTypeParameter_Documentation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sets the '{0}' attribute to the provided string or delegate value. A delegate value should be of type '{1}'..
|
||||
/// </summary>
|
||||
internal static string EventHandlerTagHelper_Documentation {
|
||||
get {
|
||||
return ResourceManager.GetString("EventHandlerTagHelper_Documentation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Declares an interface implementation for the current document..
|
||||
/// </summary>
|
||||
internal static string ImplementsDirective_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("ImplementsDirective_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The interface type implemented by the current document..
|
||||
/// </summary>
|
||||
internal static string ImplementsDirective_TypeToken_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("ImplementsDirective_TypeToken_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TypeName.
|
||||
/// </summary>
|
||||
internal static string ImplementsDirective_TypeToken_Name {
|
||||
get {
|
||||
return ResourceManager.GetString("ImplementsDirective_TypeToken_Name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Declares a layout type for the current document..
|
||||
/// </summary>
|
||||
internal static string LayoutDirective_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("LayoutDirective_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The interface type implemented by the current document..
|
||||
/// </summary>
|
||||
internal static string LayoutDirective_TypeToken_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("LayoutDirective_TypeToken_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TypeName.
|
||||
/// </summary>
|
||||
internal static string LayoutDirective_TypeToken_Name {
|
||||
get {
|
||||
return ResourceManager.GetString("LayoutDirective_TypeToken_Name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Mark the page as a routable component..
|
||||
/// </summary>
|
||||
internal static string PageDirective_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("PageDirective_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to An optional route template for the component..
|
||||
/// </summary>
|
||||
internal static string PageDirective_RouteToken_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("PageDirective_RouteToken_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to route template.
|
||||
/// </summary>
|
||||
internal static string PageDirective_RouteToken_Name {
|
||||
get {
|
||||
return ResourceManager.GetString("PageDirective_RouteToken_Name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The '@{0}' directive specified in {1} file will not be imported. The directive must appear at the top of each Razor cshtml file.
|
||||
/// </summary>
|
||||
internal static string PageDirectiveCannotBeImported {
|
||||
get {
|
||||
return ResourceManager.GetString("PageDirectiveCannotBeImported", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Populates the specified field or property with a reference to the element or component..
|
||||
/// </summary>
|
||||
internal static string RefTagHelper_Documentation {
|
||||
get {
|
||||
return ResourceManager.GetString("RefTagHelper_Documentation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Declares a generic type parameter for the generated component class..
|
||||
/// </summary>
|
||||
internal static string TypeParamDirective_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("TypeParamDirective_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The name of the type parameter..
|
||||
/// </summary>
|
||||
internal static string TypeParamDirective_Token_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("TypeParamDirective_Token_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to type parameter.
|
||||
/// </summary>
|
||||
internal static string TypeParamDirective_Token_Name {
|
||||
get {
|
||||
return ResourceManager.GetString("TypeParamDirective_Token_Name", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="BindTagHelper_Component_Documentation" xml:space="preserve">
|
||||
<value>Binds the provided expression to the '{0}' property and a change event delegate to the '{1}' property of the component.</value>
|
||||
</data>
|
||||
<data name="BindTagHelper_Element_Documentation" xml:space="preserve">
|
||||
<value>Binds the provided expression to the '{0}' attribute and a change event delegate to the '{1}' attribute.</value>
|
||||
</data>
|
||||
<data name="BindTagHelper_Element_Format_Documentation" xml:space="preserve">
|
||||
<value>Specifies a format to convert the value specified by the '{0}' attribute. The format string can currently only be used with expressions of type <code>DateTime</code>.</value>
|
||||
</data>
|
||||
<data name="BindTagHelper_Fallback_Documentation" xml:space="preserve">
|
||||
<value>Binds the provided expression to an attribute and a change event, based on the naming of the bind attribute. For example: <code>bind-value-onchange="..."</code> will assign the current value of the expression to the 'value' attribute, and assign a delegate that attempts to set the value to the 'onchange' attribute.</value>
|
||||
</data>
|
||||
<data name="BindTagHelper_Fallback_Format_Documentation" xml:space="preserve">
|
||||
<value>Specifies a format to convert the value specified by the corresponding bind attribute. For example: <code>format-value="..."</code> will apply a format string to the value specified in <code>bind-value-...</code>. The format string can currently only be used with expressions of type <code>DateTime</code>.</value>
|
||||
</data>
|
||||
<data name="ChildContentParameterName_Documentation" xml:space="preserve">
|
||||
<value>Specifies the parameter name for the '{0}' child content expression.</value>
|
||||
</data>
|
||||
<data name="ChildContentParameterName_TopLevelDocumentation" xml:space="preserve">
|
||||
<value>Specifies the parameter name for all child content expressions.</value>
|
||||
</data>
|
||||
<data name="ComponentTypeParameter_Documentation" xml:space="preserve">
|
||||
<value>Specifies the type of the type parameter {0} for the {1} component.</value>
|
||||
</data>
|
||||
<data name="EventHandlerTagHelper_Documentation" xml:space="preserve">
|
||||
<value>Sets the '{0}' attribute to the provided string or delegate value. A delegate value should be of type '{1}'.</value>
|
||||
</data>
|
||||
<data name="ImplementsDirective_Description" xml:space="preserve">
|
||||
<value>Declares an interface implementation for the current document.</value>
|
||||
</data>
|
||||
<data name="ImplementsDirective_TypeToken_Description" xml:space="preserve">
|
||||
<value>The interface type implemented by the current document.</value>
|
||||
</data>
|
||||
<data name="ImplementsDirective_TypeToken_Name" xml:space="preserve">
|
||||
<value>TypeName</value>
|
||||
</data>
|
||||
<data name="LayoutDirective_Description" xml:space="preserve">
|
||||
<value>Declares a layout type for the current document.</value>
|
||||
</data>
|
||||
<data name="LayoutDirective_TypeToken_Description" xml:space="preserve">
|
||||
<value>The interface type implemented by the current document.</value>
|
||||
</data>
|
||||
<data name="LayoutDirective_TypeToken_Name" xml:space="preserve">
|
||||
<value>TypeName</value>
|
||||
</data>
|
||||
<data name="PageDirectiveCannotBeImported" xml:space="preserve">
|
||||
<value>The '@{0}' directive specified in {1} file will not be imported. The directive must appear at the top of each Razor cshtml file</value>
|
||||
</data>
|
||||
<data name="PageDirective_Description" xml:space="preserve">
|
||||
<value>Mark the page as a routable component.</value>
|
||||
</data>
|
||||
<data name="PageDirective_RouteToken_Description" xml:space="preserve">
|
||||
<value>An optional route template for the component.</value>
|
||||
</data>
|
||||
<data name="PageDirective_RouteToken_Name" xml:space="preserve">
|
||||
<value>route template</value>
|
||||
</data>
|
||||
<data name="RefTagHelper_Documentation" xml:space="preserve">
|
||||
<value>Populates the specified field or property with a reference to the element or component.</value>
|
||||
</data>
|
||||
<data name="TypeParamDirective_Description" xml:space="preserve">
|
||||
<value>Declares a generic type parameter for the generated component class.</value>
|
||||
</data>
|
||||
<data name="TypeParamDirective_Token_Description" xml:space="preserve">
|
||||
<value>The name of the type parameter.</value>
|
||||
</data>
|
||||
<data name="TypeParamDirective_Token_Name" xml:space="preserve">
|
||||
<value>type parameter</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -7,9 +7,9 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
|||
// Keep these in sync with the actual definitions
|
||||
internal static class CodeGenerationConstants
|
||||
{
|
||||
public static class RazorComponent
|
||||
public static class ComponentBase
|
||||
{
|
||||
public const string FullTypeName = "Microsoft.AspNetCore.Components.Component";
|
||||
public const string FullTypeName = "Microsoft.AspNetCore.Components.ComponentBase";
|
||||
public const string BuildRenderTree = "BuildRenderTree";
|
||||
public const string BuildRenderTreeParameter = "builder";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
|||
@namespace.Content = computedNamespace;
|
||||
|
||||
@class.ClassName = computedClass;
|
||||
@class.BaseType = $"global::{CodeGenerationConstants.RazorComponent.FullTypeName}";
|
||||
@class.BaseType = $"global::{CodeGenerationConstants.ComponentBase.FullTypeName}";
|
||||
var filePath = codeDocument.Source.RelativePath ?? codeDocument.Source.FilePath;
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
|||
@class.Modifiers.Add("public");
|
||||
@class.Modifiers.Add("sealed");
|
||||
|
||||
method.MethodName = CodeGenerationConstants.RazorComponent.BuildRenderTree;
|
||||
method.MethodName = CodeGenerationConstants.ComponentBase.BuildRenderTree;
|
||||
method.ReturnType = "void";
|
||||
method.Modifiers.Clear();
|
||||
method.Modifiers.Add("public");
|
||||
|
|
@ -73,7 +73,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
|||
method.Parameters.Add(new MethodParameter()
|
||||
{
|
||||
TypeName = CodeGenerationConstants.RenderTreeBuilder.FullTypeName,
|
||||
ParameterName = CodeGenerationConstants.RazorComponent.BuildRenderTreeParameter,
|
||||
ParameterName = CodeGenerationConstants.ComponentBase.BuildRenderTreeParameter,
|
||||
});
|
||||
|
||||
// We need to call the 'base' method as the first statement.
|
||||
|
|
@ -82,7 +82,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Components
|
|||
callBase.Children.Add(new IntermediateToken
|
||||
{
|
||||
Kind = TokenKind.CSharp,
|
||||
Content = $"base.{CodeGenerationConstants.RazorComponent.BuildRenderTree}({CodeGenerationConstants.RazorComponent.BuildRenderTreeParameter});"
|
||||
Content = $"base.{CodeGenerationConstants.ComponentBase.BuildRenderTree}({CodeGenerationConstants.ComponentBase.BuildRenderTreeParameter});"
|
||||
});
|
||||
method.Children.Insert(0, callBase);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,19 @@
|
|||
<PackageReference Include="Microsoft.Extensions.HashCodeCombiner.Sources" PrivateAssets="All" Version="$(MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="ComponentResources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>ComponentResources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="ComponentResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>ComponentResources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
// 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.Components.Layouts
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates that the associated component type uses a specified layout.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
|
||||
public class LayoutAttribute : Attribute
|
||||
{
|
||||
public LayoutAttribute(Type layoutType)
|
||||
{
|
||||
LayoutType = layoutType ?? throw new ArgumentNullException(nameof(layoutType));
|
||||
}
|
||||
|
||||
public Type LayoutType { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -5,12 +5,20 @@ using Microsoft.AspNetCore.Components.RenderTree;
|
|||
|
||||
namespace Microsoft.AspNetCore.Components
|
||||
{
|
||||
public abstract class Component : IComponent
|
||||
public abstract class ComponentBase : IComponent
|
||||
{
|
||||
public virtual void BuildRenderTree(RenderTreeBuilder builder)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void SetParameters(ParameterCollection parameters)
|
||||
{
|
||||
}
|
||||
|
||||
void IComponent.Init(RenderHandle renderHandle)
|
||||
{
|
||||
}
|
||||
|
||||
protected void WriteLiteral(string literal) { }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
// 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.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a reference to a rendered element.
|
||||
/// </summary>
|
||||
public struct ElementRef
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -5,5 +5,9 @@ namespace Microsoft.AspNetCore.Components
|
|||
{
|
||||
public interface IComponent
|
||||
{
|
||||
void Init(RenderHandle renderHandle);
|
||||
|
||||
|
||||
void SetParameters(ParameterCollection parameters);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
// 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.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates that the associated property should have a value injected from the
|
||||
/// service provider during initialization.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
||||
public class InjectAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
// 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.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Denotes the target member as a component parameter.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
|
||||
public sealed class ParameterAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
// 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.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of parameters supplied to an <see cref="IComponent"/>
|
||||
/// by its parent in the render tree.
|
||||
/// </summary>
|
||||
public struct ParameterCollection
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
// 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.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows a component to notify the renderer that it should be rendered.
|
||||
/// </summary>
|
||||
public struct RenderHandle
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,518 @@
|
|||
// 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.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Supplies information about an event that is being raised.
|
||||
/// </summary>
|
||||
public class UIEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the event.
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about an input change event that is being raised.
|
||||
/// </summary>
|
||||
public class UIChangeEventArgs : UIEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the new value of the input. This may be a <see cref="string"/>
|
||||
/// or a <see cref="bool"/>.
|
||||
/// </summary>
|
||||
public object Value { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about an clipboard event that is being raised.
|
||||
/// </summary>
|
||||
public class UIClipboardEventArgs : UIEventArgs
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about an drag event that is being raised.
|
||||
/// </summary>
|
||||
public class UIDragEventArgs : UIEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// A count of consecutive clicks that happened in a short amount of time, incremented by one.
|
||||
/// </summary>
|
||||
public long Detail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The data that underlies a drag-and-drop operation, known as the drag data store.
|
||||
/// See <see cref="DataTransfer"/>.
|
||||
/// </summary>
|
||||
public DataTransfer DataTransfer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The X coordinate of the mouse pointer in global (screen) coordinates.
|
||||
/// </summary>
|
||||
public long ScreenX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Y coordinate of the mouse pointer in global (screen) coordinates.
|
||||
/// </summary>
|
||||
public long ScreenY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The X coordinate of the mouse pointer in local (DOM content) coordinates.
|
||||
/// </summary>
|
||||
public long ClientX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Y coordinate of the mouse pointer in local (DOM content) coordinates.
|
||||
/// </summary>
|
||||
public long ClientY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The button number that was pressed when the mouse event was fired:
|
||||
/// Left button=0,
|
||||
/// middle button=1 (if present),
|
||||
/// right button=2.
|
||||
/// For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.
|
||||
/// </summary>
|
||||
public long Button { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The buttons being pressed when the mouse event was fired:
|
||||
/// Left button=1,
|
||||
/// Right button=2,
|
||||
/// Middle (wheel) button=4,
|
||||
/// 4th button (typically, "Browser Back" button)=8,
|
||||
/// 5th button (typically, "Browser Forward" button)=16.
|
||||
/// If two or more buttons are pressed, returns the logical sum of the values.
|
||||
/// E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).
|
||||
/// </summary>
|
||||
public long Buttons { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the control key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool CtrlKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the shift key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool ShiftKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the alt key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool AltKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the meta key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool MetaKey { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="DataTransfer"/> object is used to hold the data that is being dragged during a drag and drop operation.
|
||||
/// It may hold one or more <see cref="UIDataTransferItem"/>, each of one or more data types.
|
||||
/// For more information about drag and drop, see HTML Drag and Drop API.
|
||||
/// </summary>
|
||||
public class DataTransfer
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the type of drag-and-drop operation currently selected or sets the operation to a new type.
|
||||
/// The value must be none, copy, link or move.
|
||||
/// </summary>
|
||||
public string DropEffect { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides all of the types of operations that are possible.
|
||||
/// Must be one of none, copy, copyLink, copyMove, link, linkMove, move, all or uninitialized.
|
||||
/// </summary>
|
||||
public string EffectAllowed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains a list of all the local files available on the data transfer.
|
||||
/// If the drag operation doesn't involve dragging files, this property is an empty list.
|
||||
/// </summary>
|
||||
public string[] Files { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gives a <see cref="UIDataTransferItem"/> array which is a list of all of the drag data.
|
||||
/// </summary>
|
||||
public UIDataTransferItem[] Items { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// An array of <see cref="string"/> giving the formats that were set in the dragstart event.
|
||||
/// </summary>
|
||||
public string[] Types { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="UIDataTransferItem"/> object represents one drag data item.
|
||||
/// During a drag operation, each drag event has a dataTransfer property which contains a list of drag data items.
|
||||
/// Each item in the list is a <see cref="UIDataTransferItem"/> object.
|
||||
/// </summary>
|
||||
public class UIDataTransferItem
|
||||
{
|
||||
/// <summary>
|
||||
/// The kind of drag data item, string or file
|
||||
/// </summary>
|
||||
public string Kind { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The drag data item's type, typically a MIME type
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about an error event that is being raised.
|
||||
/// </summary>
|
||||
public class UIErrorEventArgs : UIEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a a human-readable error message describing the problem.
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the script file in which the error occurred.
|
||||
/// </summary>
|
||||
public string Filename { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the line number of the script file on which the error occurred.
|
||||
/// </summary>
|
||||
public int Lineno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the column number of the script file on which the error occurred.
|
||||
/// </summary>
|
||||
public int Colno { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about a focus event that is being raised.
|
||||
/// </summary>
|
||||
public class UIFocusEventArgs : UIEventArgs
|
||||
{
|
||||
// Not including support for 'relatedTarget' since we don't have a good way to represent it.
|
||||
// see: https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about a keyboard event that is being raised.
|
||||
/// </summary>
|
||||
public class UIKeyboardEventArgs : UIEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The key value of the key represented by the event.
|
||||
/// If the value has a printed representation, this attribute's value is the same as the char attribute.
|
||||
/// Otherwise, it's one of the key value strings specified in 'Key values'.
|
||||
/// If the key can't be identified, this is the string "Unidentified"
|
||||
/// </summary>
|
||||
public string Key { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds a string that identifies the physical key being pressed.
|
||||
/// The value is not affected by the current keyboard layout or modifier state, so a particular key will always return the same value.
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The location of the key on the device.
|
||||
/// </summary>
|
||||
public float Location { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if a key has been depressed long enough to trigger key repetition, otherwise false.
|
||||
/// </summary>
|
||||
public bool Repeat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the control key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool CtrlKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the shift key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool ShiftKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the alt key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool AltKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the meta key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool MetaKey { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about a mouse event that is being raised.
|
||||
/// </summary>
|
||||
public class UIMouseEventArgs : UIEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// A count of consecutive clicks that happened in a short amount of time, incremented by one.
|
||||
/// </summary>
|
||||
public long Detail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The X coordinate of the mouse pointer in global (screen) coordinates.
|
||||
/// </summary>
|
||||
public long ScreenX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Y coordinate of the mouse pointer in global (screen) coordinates.
|
||||
/// </summary>
|
||||
public long ScreenY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The X coordinate of the mouse pointer in local (DOM content) coordinates.
|
||||
/// </summary>
|
||||
public long ClientX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Y coordinate of the mouse pointer in local (DOM content) coordinates.
|
||||
/// </summary>
|
||||
public long ClientY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The button number that was pressed when the mouse event was fired:
|
||||
/// Left button=0,
|
||||
/// middle button=1 (if present),
|
||||
/// right button=2.
|
||||
/// For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.
|
||||
/// </summary>
|
||||
public long Button { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The buttons being pressed when the mouse event was fired:
|
||||
/// Left button=1,
|
||||
/// Right button=2,
|
||||
/// Middle (wheel) button=4,
|
||||
/// 4th button (typically, "Browser Back" button)=8,
|
||||
/// 5th button (typically, "Browser Forward" button)=16.
|
||||
/// If two or more buttons are pressed, returns the logical sum of the values.
|
||||
/// E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).
|
||||
/// </summary>
|
||||
public long Buttons { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the control key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool CtrlKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the shift key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool ShiftKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the alt key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool AltKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the meta key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool MetaKey { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about a mouse event that is being raised.
|
||||
/// </summary>
|
||||
public class UIPointerEventArgs : UIMouseEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// A unique identifier for the pointer causing the event.
|
||||
/// </summary>
|
||||
public string PointerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.
|
||||
/// </summary>
|
||||
public float Width { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.
|
||||
/// </summary>
|
||||
public float Height { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The normalized pressure of the pointer input in the range of 0 to 1,
|
||||
/// where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.
|
||||
/// </summary>
|
||||
public float Pressure { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane
|
||||
/// and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.
|
||||
/// </summary>
|
||||
public float TiltX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane
|
||||
/// and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.
|
||||
/// </summary>
|
||||
public float TiltY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the device type that caused the event.
|
||||
/// Must be one of the strings mouse, pen or touch, or an empty string.
|
||||
/// </summary>
|
||||
public string PointerType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the pointer represents the primary pointer of this pointer type.
|
||||
/// </summary>
|
||||
public bool IsPrimary { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about a progress event that is being raised.
|
||||
/// </summary>
|
||||
public class UIProgressEventArgs : UIEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not the total size of the transfer is known.
|
||||
/// </summary>
|
||||
public bool LengthComputable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of bytes transferred since the beginning of the operation.
|
||||
/// This doesn't include headers and other overhead, but only the content itself.
|
||||
/// </summary>
|
||||
public long Loaded { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total number of bytes of content that will be transferred during the operation.
|
||||
/// If the total size is unknown, this value is zero.
|
||||
/// </summary>
|
||||
public long Total { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about a touch event that is being raised.
|
||||
/// </summary>
|
||||
public class UITouchEventArgs : UIEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// A count of consecutive clicks that happened in a short amount of time, incremented by one.
|
||||
/// </summary>
|
||||
public long Detail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of <see cref="UITouchPoint"/> for every point of contact currently touching the surface.
|
||||
/// </summary>
|
||||
public UITouchPoint[] Touches { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of <see cref="UITouchPoint"/> for every point of contact that is touching the surface and started on the element that is the target of the current event.
|
||||
/// </summary>
|
||||
public UITouchPoint[] TargetTouches { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of Touches for every point of contact which contributed to the event.
|
||||
/// For the touchstart event this must be a list of the touch points that just became active with the current event.
|
||||
/// For the touchmove event this must be a list of the touch points that have moved since the last event.
|
||||
/// For the touchend and touchcancel events this must be a list of the touch points that have just been removed from the surface.
|
||||
/// </summary>
|
||||
public UITouchPoint[] ChangedTouches { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the control key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool CtrlKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the shift key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool ShiftKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the alt key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool AltKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// true if the meta key was down when the event was fired. false otherwise.
|
||||
/// </summary>
|
||||
public bool MetaKey { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a single contact point on a touch-sensitive device.
|
||||
/// The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad.
|
||||
/// </summary>
|
||||
public class UITouchPoint
|
||||
{
|
||||
/// <summary>
|
||||
/// A unique identifier for this Touch object.
|
||||
/// A given touch point (say, by a finger) will have the same identifier for the duration of its movement around the surface.
|
||||
/// This lets you ensure that you're tracking the same touch all the time.
|
||||
/// </summary>
|
||||
public long Identifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The X coordinate of the touch point relative to the left edge of the screen.
|
||||
/// </summary>
|
||||
public long ScreenX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Y coordinate of the touch point relative to the top edge of the screen.
|
||||
/// </summary>
|
||||
public long ScreenY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The X coordinate of the touch point relative to the left edge of the browser viewport, not including any scroll offset.
|
||||
/// </summary>
|
||||
public long ClientX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Y coordinate of the touch point relative to the top edge of the browser viewport, not including any scroll offset.
|
||||
/// </summary>
|
||||
public long ClientY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The X coordinate of the touch point relative to the left edge of the document.
|
||||
/// Unlike <see cref="ClientX"/>, this value includes the horizontal scroll offset, if any.
|
||||
/// </summary>
|
||||
public long PageX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Y coordinate of the touch point relative to the top of the document.
|
||||
/// Unlike <see cref="ClientY"/>, this value includes the vertical scroll offset, if any.
|
||||
/// </summary>
|
||||
public long PageY { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Supplies information about a mouse wheel event that is being raised.
|
||||
/// </summary>
|
||||
public class UIWheelEventArgs : UIMouseEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The horizontal scroll amount.
|
||||
/// </summary>
|
||||
public double DeltaX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The vertical scroll amount.
|
||||
/// </summary>
|
||||
public double DeltaY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The scroll amount for the z-axis.
|
||||
/// </summary>
|
||||
public double DeltaZ { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The unit of the delta values scroll amount.
|
||||
/// </summary>
|
||||
public long DeltaMode { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
// 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.Components.RenderTree;
|
||||
|
||||
namespace Microsoft.AspNetCore.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a segment of UI content, implemented as a delegate that
|
||||
/// writes the content to a <see cref="RenderTreeBuilder"/>.
|
||||
/// </summary>
|
||||
/// <param name="builder">The <see cref="RenderTreeBuilder"/> to which the content should be written.</param>
|
||||
public delegate void RenderFragment(RenderTreeBuilder builder);
|
||||
|
||||
/// <summary>
|
||||
/// Represents a segment of UI content for an object of type <typeparamref name="T"/>, implemented as
|
||||
/// a function that returns a <see cref="RenderFragment"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of object.</typeparam>
|
||||
/// <param name="value">The value used to build the content.</param>
|
||||
public delegate RenderFragment RenderFragment<T>(T value);
|
||||
}
|
||||
|
|
@ -7,6 +7,8 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" Version="$(MicrosoftAspNetCoreHtmlAbstractionsPackageVersion)" />
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourcePackageVersion)" />
|
||||
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.Razor.Test.ComponentShim\Microsoft.AspNetCore.Razor.Test.ComponentShim.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||
|
|
@ -8,6 +8,8 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" Version="$(MicrosoftAspNetCoreHtmlAbstractionsPackageVersion)" />
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourcePackageVersion)" />
|
||||
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.Razor.Test.ComponentShim\Microsoft.AspNetCore.Razor.Test.ComponentShim.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
<ItemGroup Condition="'$(BinariesRoot)'!=''">
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Html.Abstractions.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
<ItemGroup Condition="'$(BinariesRoot)'!=''">
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Html.Abstractions.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
<ItemGroup Condition="'$(BinariesRoot)'!=''">
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Html.Abstractions.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
<ItemGroup Condition="'$(BinariesRoot)'!=''">
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Html.Abstractions.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
<ItemGroup Condition="'$(BinariesRoot)'!=''">
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Html.Abstractions.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
<ItemGroup Condition="'$(BinariesRoot)'!=''">
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Html.Abstractions.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
<ItemGroup Condition="'$(BinariesRoot)'!=''">
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Html.Abstractions.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
<ItemGroup Condition="'$(BinariesRoot)'!=''">
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Html.Abstractions.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue