Rename TagHelperBoundAttributeDescriptorBuilder => BoundAttributeDescriptorBuilder.

#1369
This commit is contained in:
N. Taylor Mullen 2017-05-19 12:39:58 -07:00
parent 9bc9f0ef05
commit ebe8ab4612
16 changed files with 108 additions and 108 deletions

View File

@ -7,7 +7,7 @@ using System.Linq;
namespace Microsoft.AspNetCore.Razor.Language
{
public sealed class TagHelperBoundAttributeDescriptorBuilder
public sealed class BoundAttributeDescriptorBuilder
{
internal const string DescriptorKind = "ITagHelper";
internal const string PropertyNameKey = "ITagHelper.PropertyName";
@ -43,46 +43,46 @@ namespace Microsoft.AspNetCore.Razor.Language
private readonly Dictionary<string, string> _metadata;
private HashSet<RazorDiagnostic> _diagnostics;
private TagHelperBoundAttributeDescriptorBuilder(string containingTypeName)
private BoundAttributeDescriptorBuilder(string containingTypeName)
{
_containingTypeName = containingTypeName;
_metadata = new Dictionary<string, string>();
}
public static TagHelperBoundAttributeDescriptorBuilder Create(string containingTypeName)
public static BoundAttributeDescriptorBuilder Create(string containingTypeName)
{
return new TagHelperBoundAttributeDescriptorBuilder(containingTypeName);
return new BoundAttributeDescriptorBuilder(containingTypeName);
}
public TagHelperBoundAttributeDescriptorBuilder Name(string name)
public BoundAttributeDescriptorBuilder Name(string name)
{
_name = name;
return this;
}
public TagHelperBoundAttributeDescriptorBuilder PropertyName(string propertyName)
public BoundAttributeDescriptorBuilder PropertyName(string propertyName)
{
_propertyName = propertyName;
return this;
}
public TagHelperBoundAttributeDescriptorBuilder TypeName(string typeName)
public BoundAttributeDescriptorBuilder TypeName(string typeName)
{
_typeName = typeName;
return this;
}
public TagHelperBoundAttributeDescriptorBuilder AsEnum()
public BoundAttributeDescriptorBuilder AsEnum()
{
_isEnum = true;
return this;
}
public TagHelperBoundAttributeDescriptorBuilder AsDictionary(string attributeNamePrefix, string valueTypeName)
public BoundAttributeDescriptorBuilder AsDictionary(string attributeNamePrefix, string valueTypeName)
{
_indexerNamePrefix = attributeNamePrefix;
_indexerValueTypeName = valueTypeName;
@ -91,21 +91,21 @@ namespace Microsoft.AspNetCore.Razor.Language
return this;
}
public TagHelperBoundAttributeDescriptorBuilder Documentation(string documentation)
public BoundAttributeDescriptorBuilder Documentation(string documentation)
{
_documentation = documentation;
return this;
}
public TagHelperBoundAttributeDescriptorBuilder AddMetadata(string key, string value)
public BoundAttributeDescriptorBuilder AddMetadata(string key, string value)
{
_metadata[key] = value;
return this;
}
public TagHelperBoundAttributeDescriptorBuilder AddDiagnostic(RazorDiagnostic diagnostic)
public BoundAttributeDescriptorBuilder AddDiagnostic(RazorDiagnostic diagnostic)
{
EnsureDiagnostics();
_diagnostics.Add(diagnostic);

View File

@ -9,12 +9,12 @@ namespace Microsoft.AspNetCore.Razor.Language
{
public static string GetPropertyName(this BoundAttributeDescriptor descriptor)
{
descriptor.Metadata.TryGetValue(TagHelperBoundAttributeDescriptorBuilder.PropertyNameKey, out var propertyName);
descriptor.Metadata.TryGetValue(BoundAttributeDescriptorBuilder.PropertyNameKey, out var propertyName);
return propertyName;
}
public static bool IsDefaultKind(this BoundAttributeDescriptor descriptor)
=> string.Equals(descriptor.Kind, TagHelperBoundAttributeDescriptorBuilder.DescriptorKind, StringComparison.Ordinal);
=> string.Equals(descriptor.Kind, BoundAttributeDescriptorBuilder.DescriptorKind, StringComparison.Ordinal);
}
}

View File

@ -49,14 +49,14 @@ namespace Microsoft.AspNetCore.Razor.Language
return this;
}
public TagHelperDescriptorBuilder BindAttribute(Action<TagHelperBoundAttributeDescriptorBuilder> configure)
public TagHelperDescriptorBuilder BindAttribute(Action<BoundAttributeDescriptorBuilder> configure)
{
if (configure == null)
{
throw new ArgumentNullException(nameof(configure));
}
var builder = TagHelperBoundAttributeDescriptorBuilder.Create(_typeName);
var builder = BoundAttributeDescriptorBuilder.Create(_typeName);
configure(builder);

View File

@ -181,7 +181,7 @@ namespace Microsoft.CodeAnalysis.Razor
}
private void ConfigureBoundAttribute(
TagHelperBoundAttributeDescriptorBuilder builder,
BoundAttributeDescriptorBuilder builder,
IPropertySymbol property,
INamedTypeSymbol containingType)
{
@ -241,7 +241,7 @@ namespace Microsoft.CodeAnalysis.Razor
}
private void ConfigureDictionaryBoundAttribute(
TagHelperBoundAttributeDescriptorBuilder builder,
BoundAttributeDescriptorBuilder builder,
IPropertySymbol property,
INamedTypeSymbol containingType,
AttributeData attributeNameAttribute,

View File

@ -136,10 +136,10 @@ namespace Microsoft.VisualStudio.LanguageServices.Razor
}
}
private void ReadBoundAttribute(TagHelperBoundAttributeDescriptorBuilder builder, JObject attribute, JsonSerializer serializer)
private void ReadBoundAttribute(BoundAttributeDescriptorBuilder builder, JObject attribute, JsonSerializer serializer)
{
var descriptorKind = attribute[nameof(BoundAttributeDescriptor.Kind)].Value<string>();
if (descriptorKind != TagHelperBoundAttributeDescriptorBuilder.DescriptorKind)
if (descriptorKind != BoundAttributeDescriptorBuilder.DescriptorKind)
{
throw new NotSupportedException();
}
@ -182,7 +182,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Razor
builder.AddMetadata(item.Key, item.Value);
}
var propertyName = metadataValue[TagHelperBoundAttributeDescriptorBuilder.PropertyNameKey];
var propertyName = metadataValue[BoundAttributeDescriptorBuilder.PropertyNameKey];
builder.PropertyName(propertyName);
}
}

View File

@ -30,7 +30,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.IntegrationTests
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("value")
@ -69,7 +69,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.IntegrationTests
string tagName,
string typeName,
string assemblyName,
IEnumerable<Action<TagHelperBoundAttributeDescriptorBuilder>> attributes = null)
IEnumerable<Action<BoundAttributeDescriptorBuilder>> attributes = null)
{
var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName);

View File

@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Razor.Language
{
// Arrange
var expectedPropertyName = "IntProperty";
var descriptor = TagHelperBoundAttributeDescriptorBuilder.Create("TestTagHelper")
var descriptor = BoundAttributeDescriptorBuilder.Create("TestTagHelper")
.Name("test")
.PropertyName(expectedPropertyName)
.TypeName(typeof(int).FullName)
@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Razor.Language
public void GetPropertyName_ReturnsNullIfNoPropertyName()
{
// Arrange
var descriptor = TagHelperBoundAttributeDescriptorBuilder.Create("TestTagHelper")
var descriptor = BoundAttributeDescriptorBuilder.Create("TestTagHelper")
.Name("test")
.TypeName(typeof(int).FullName)
.Build();
@ -45,7 +45,7 @@ namespace Microsoft.AspNetCore.Razor.Language
public void IsDefaultKind_ReturnsTrueIfFromDefaultBuilder()
{
// Arrange
var descriptor = TagHelperBoundAttributeDescriptorBuilder.Create("TestTagHelper")
var descriptor = BoundAttributeDescriptorBuilder.Create("TestTagHelper")
.Name("test")
.PropertyName("IntProperty")
.TypeName(typeof(int).FullName)

View File

@ -67,7 +67,7 @@ private global::MyTagHelper __MyTagHelper = null;
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("bound")
@ -110,7 +110,7 @@ __InputTagHelper.FooProp = ""value"";
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("bound")
@ -156,7 +156,7 @@ __InputTagHelper.FooProp = 42;
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("bound")
@ -244,7 +244,7 @@ __InputTagHelper.FooProp[""bound""] = 42;
string tagName,
string typeName,
string assemblyName,
IEnumerable<Action<TagHelperBoundAttributeDescriptorBuilder>> attributes = null)
IEnumerable<Action<BoundAttributeDescriptorBuilder>> attributes = null)
{
var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName);

View File

@ -136,7 +136,7 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
Writer = new CSharpCodeWriter()
};
var descriptor = TagHelperBoundAttributeDescriptorBuilder
var descriptor = BoundAttributeDescriptorBuilder
.Create("FooTagHelper")
.Name("Foo")
.TypeName("System.String")
@ -174,7 +174,7 @@ __tagHelperExecutionContext.AddTagHelperAttribute(_tagHelper1);
Writer = new CSharpCodeWriter()
};
var descriptor = TagHelperBoundAttributeDescriptorBuilder
var descriptor = BoundAttributeDescriptorBuilder
.Create("FooTagHelper")
.Name("Foo")
.TypeName("System.Collections.Generic.Dictionary<System.String, System.String>")

View File

@ -291,7 +291,7 @@ EndAddHtmlAttributeValues(__tagHelperExecutionContext);
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("bound")
@ -339,7 +339,7 @@ __tagHelperExecutionContext.AddTagHelperAttribute(""bound"", __InputTagHelper.Fo
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("bound")
@ -386,7 +386,7 @@ __tagHelperExecutionContext.AddTagHelperAttribute(""bound"", __InputTagHelper.Fo
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("bound")
@ -478,7 +478,7 @@ __tagHelperExecutionContext.AddTagHelperAttribute(""foo-bound"", __InputTagHelpe
string tagName,
string typeName,
string assemblyName,
IEnumerable<Action<TagHelperBoundAttributeDescriptorBuilder>> attributes = null)
IEnumerable<Action<BoundAttributeDescriptorBuilder>> attributes = null)
{
var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName);

View File

@ -343,7 +343,7 @@ namespace Microsoft.AspNetCore.Razor.Language
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("bound")
@ -495,7 +495,7 @@ namespace Microsoft.AspNetCore.Razor.Language
string tagName,
string typeName,
string assemblyName,
IEnumerable<Action<TagHelperBoundAttributeDescriptorBuilder>> attributes = null)
IEnumerable<Action<BoundAttributeDescriptorBuilder>> attributes = null)
{
var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName);

View File

@ -1387,7 +1387,7 @@ namespace Microsoft.AspNetCore.Razor.Language
string tagName,
string typeName,
string assemblyName,
IEnumerable<Action<TagHelperBoundAttributeDescriptorBuilder>> attributes = null,
IEnumerable<Action<BoundAttributeDescriptorBuilder>> attributes = null,
IEnumerable<Action<TagMatchingRuleBuilder>> ruleBuilders = null)
{
var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName);

View File

@ -41,7 +41,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("bound")
@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("value")
@ -101,7 +101,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
string tagName,
string typeName,
string assemblyName,
IEnumerable<Action<TagHelperBoundAttributeDescriptorBuilder>> attributes = null)
IEnumerable<Action<BoundAttributeDescriptorBuilder>> attributes = null)
{
var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName);

View File

@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("value")
@ -90,7 +90,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo),
},
@ -107,7 +107,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper2",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo),
},
@ -156,7 +156,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "*",
typeName: "TestNamespace.CatchAllTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("catch-all")
@ -168,7 +168,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("value")
@ -190,7 +190,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "*",
typeName: "TestNamespace.CatchAllTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("[item]")
@ -235,7 +235,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "*",
typeName: "TestNamespace.CatchAllTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("catchall-bound-string")
@ -250,7 +250,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("input-bound-required-string")
@ -281,7 +281,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("bound")
@ -312,7 +312,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo),
},
@ -324,7 +324,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper2",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo),
builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "checked", inputCheckedPropertyInfo),
@ -357,7 +357,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper1",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("int-prefix-grabber")
@ -382,7 +382,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper2",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("int-dictionary")
@ -410,7 +410,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "MyTagHelper",
typeName: "TestNamespace.MyTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "BoundProperty", propertyInfo),
}),
@ -436,7 +436,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "p",
typeName: "TestNamespace.PTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "age", pAgePropertyInfo),
},
@ -448,7 +448,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo),
},
@ -460,7 +460,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
tagName: "input",
typeName: "TestNamespace.InputTagHelper2",
assemblyName: "TestAssembly",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "type", inputTypePropertyInfo),
builder => BuildBoundAttributeDescriptorFromPropertyInfo(builder, "checked", checkedPropertyInfo),
@ -473,7 +473,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
string tagName,
string typeName,
string assemblyName,
IEnumerable<Action<TagHelperBoundAttributeDescriptorBuilder>> attributes = null,
IEnumerable<Action<BoundAttributeDescriptorBuilder>> attributes = null,
IEnumerable<Action<TagMatchingRuleBuilder>> ruleBuilders = null)
{
var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName);
@ -507,7 +507,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
}
private static void BuildBoundAttributeDescriptorFromPropertyInfo(
TagHelperBoundAttributeDescriptorBuilder builder,
BoundAttributeDescriptorBuilder builder,
string name,
PropertyInfo propertyInfo)
{

View File

@ -570,7 +570,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
tagName: "inherited-editor-browsable",
typeName: typeof(InheritedEditorBrowsableTagHelper).FullName,
assemblyName: AssemblyName,
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("property")
@ -586,7 +586,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
tagName: "editor-browsable",
typeName: typeof(EditorBrowsableTagHelper).FullName,
assemblyName: AssemblyName,
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("property")
@ -609,7 +609,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
tagName: "hidden-property-editor-browsable",
typeName: typeof(HiddenPropertyEditorBrowsableTagHelper).FullName,
assemblyName: AssemblyName,
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("property")
@ -624,7 +624,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
tagName: "overridden-editor-browsable",
typeName: typeof(OverriddenEditorBrowsableTagHelper).FullName,
assemblyName: AssemblyName,
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("property")
@ -639,7 +639,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
tagName: "multi-property-editor-browsable",
typeName: typeof(MultiPropertyEditorBrowsableTagHelper).FullName,
assemblyName: AssemblyName,
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("property2")
@ -654,7 +654,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
tagName: "multi-property-editor-browsable",
typeName: typeof(MultiPropertyEditorBrowsableTagHelper).FullName,
assemblyName: AssemblyName,
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("property")
@ -681,7 +681,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
tagName: "overridden-property-editor-browsable",
typeName: typeof(OverriddenPropertyEditorBrowsableTagHelper).FullName,
assemblyName: AssemblyName,
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("property2")
@ -700,7 +700,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
tagName: "default-editor-browsable",
typeName: typeof(DefaultEditorBrowsableTagHelper).FullName,
assemblyName: AssemblyName,
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("property")
@ -981,7 +981,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
"overridden-attribute",
typeof(OverriddenAttributeTagHelper).FullName,
AssemblyName,
new Action<TagHelperBoundAttributeDescriptorBuilder>[]
new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("SomethingElse")
@ -1015,7 +1015,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
"inherited-overridden-attribute",
typeof(InheritedOverriddenAttributeTagHelper).FullName,
AssemblyName,
new Action<TagHelperBoundAttributeDescriptorBuilder>[]
new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("valid-attribute1")
@ -1049,7 +1049,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
"inherited-not-overridden-attribute",
typeof(InheritedNotOverriddenAttributeTagHelper).FullName,
AssemblyName,
new Action<TagHelperBoundAttributeDescriptorBuilder>[]
new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("SomethingElse")
@ -1078,7 +1078,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
"inherited-single-attribute",
typeof(InheritedSingleAttributeTagHelper).FullName,
AssemblyName,
new Action<TagHelperBoundAttributeDescriptorBuilder>[]
new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("int-attribute")
@ -1104,7 +1104,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
"single-attribute",
typeof(SingleAttributeTagHelper).FullName,
AssemblyName,
new Action<TagHelperBoundAttributeDescriptorBuilder>[]
new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("int-attribute")
@ -1131,7 +1131,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
"missing-accessor",
typeof(MissingAccessorTagHelper).FullName,
AssemblyName,
new Action<TagHelperBoundAttributeDescriptorBuilder>[]
new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("valid-attribute")
@ -1158,7 +1158,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
"non-public-accessor",
typeof(NonPublicAccessorTagHelper).FullName,
AssemblyName,
new Action<TagHelperBoundAttributeDescriptorBuilder>[]
new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("valid-attribute")
@ -1183,7 +1183,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
"not-bound-attribute",
typeof(NotBoundAttributeTagHelper).FullName,
AssemblyName,
new Action<TagHelperBoundAttributeDescriptorBuilder>[]
new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("bound-property")
@ -1209,7 +1209,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
string.Empty,
typeof(MultiTagTagHelper).FullName,
AssemblyName,
new Action<TagHelperBoundAttributeDescriptorBuilder>[]
new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("valid-attribute")
@ -1240,7 +1240,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
"inherited-multi-tag",
typeof(InheritedMultiTagTagHelper).FullName,
AssemblyName,
new Action<TagHelperBoundAttributeDescriptorBuilder>[]
new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("valid-attribute")
@ -1382,7 +1382,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(InvalidBoundAttribute),
new[]
{
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(InvalidBoundAttribute).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(InvalidBoundAttribute).FullName)
.Name("data-something")
.PropertyName(nameof(InvalidBoundAttribute.DataSomething))
.TypeName(typeof(string).FullName)
@ -1398,7 +1398,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(InvalidBoundAttributeWithValid),
new[]
{
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(InvalidBoundAttributeWithValid).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(InvalidBoundAttributeWithValid).FullName)
.Name("data-something")
.PropertyName(nameof(InvalidBoundAttributeWithValid.DataSomething))
.TypeName(typeof(string).FullName)
@ -1408,7 +1408,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
nameof(InvalidBoundAttributeWithValid.DataSomething),
"data-something"))
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(InvalidBoundAttributeWithValid).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(InvalidBoundAttributeWithValid).FullName)
.Name("int-attribute")
.PropertyName(nameof(InvalidBoundAttributeWithValid.IntAttribute))
.TypeName(typeof(int).FullName)
@ -1419,7 +1419,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(OverriddenInvalidBoundAttributeWithValid),
new[]
{
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(OverriddenInvalidBoundAttributeWithValid).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(OverriddenInvalidBoundAttributeWithValid).FullName)
.Name("valid-something")
.PropertyName(nameof(OverriddenInvalidBoundAttributeWithValid.DataSomething))
.TypeName(typeof(string).FullName)
@ -1430,7 +1430,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(OverriddenValidBoundAttributeWithInvalid),
new[]
{
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(OverriddenValidBoundAttributeWithInvalid).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(OverriddenValidBoundAttributeWithInvalid).FullName)
.Name("data-something")
.PropertyName(nameof(OverriddenValidBoundAttributeWithInvalid.ValidSomething))
.TypeName(typeof(string).FullName)
@ -1446,7 +1446,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(OverriddenValidBoundAttributeWithInvalidUpperCase),
new[]
{
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(OverriddenValidBoundAttributeWithInvalidUpperCase).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(OverriddenValidBoundAttributeWithInvalidUpperCase).FullName)
.Name("DATA-SOMETHING")
.PropertyName(nameof(OverriddenValidBoundAttributeWithInvalidUpperCase.ValidSomething))
.TypeName(typeof(string).FullName)
@ -1762,7 +1762,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(DefaultValidHtmlAttributePrefix),
new[]
{
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(DefaultValidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(DefaultValidHtmlAttributePrefix).FullName)
.Name("dictionary-property")
.PropertyName(nameof(DefaultValidHtmlAttributePrefix.DictionaryProperty))
.TypeName($"{dictionaryNamespace}<System.String, System.String>")
@ -1775,7 +1775,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(SingleValidHtmlAttributePrefix),
new[]
{
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(SingleValidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(SingleValidHtmlAttributePrefix).FullName)
.Name("valid-name")
.PropertyName(nameof(SingleValidHtmlAttributePrefix.DictionaryProperty))
.TypeName($"{dictionaryNamespace}<System.String, System.String>")
@ -1788,47 +1788,47 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(MultipleValidHtmlAttributePrefix),
new[]
{
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
.Name("valid-name1")
.PropertyName(nameof(MultipleValidHtmlAttributePrefix.DictionaryProperty))
.TypeName($"{typeof(Dictionary<,>).Namespace}.Dictionary<System.String, System.Object>")
.AsDictionary("valid-prefix1-", typeof(object).FullName)
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
.Name("valid-name2")
.PropertyName(nameof(MultipleValidHtmlAttributePrefix.DictionarySubclassProperty))
.TypeName(typeof(DictionarySubclass).FullName)
.AsDictionary("valid-prefix2-", typeof(string).FullName)
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
.Name("valid-name3")
.PropertyName(nameof(MultipleValidHtmlAttributePrefix.DictionaryWithoutParameterlessConstructorProperty))
.TypeName(typeof(DictionaryWithoutParameterlessConstructor).FullName)
.AsDictionary("valid-prefix3-", typeof(string).FullName)
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
.Name("valid-name4")
.PropertyName(nameof(MultipleValidHtmlAttributePrefix.GenericDictionarySubclassProperty))
.TypeName(typeof(GenericDictionarySubclass<object>).Namespace + ".GenericDictionarySubclass<System.Object>")
.AsDictionary("valid-prefix4-", typeof(object).FullName)
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
.Name("valid-name5")
.PropertyName(nameof(MultipleValidHtmlAttributePrefix.SortedDictionaryProperty))
.TypeName(typeof(SortedDictionary<string, int>).Namespace + ".SortedDictionary<System.String, System.Int32>")
.AsDictionary("valid-prefix5-", typeof(int).FullName)
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
.Name("valid-name6")
.PropertyName(nameof(MultipleValidHtmlAttributePrefix.StringProperty))
.TypeName(typeof(string).FullName)
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
.PropertyName(nameof(MultipleValidHtmlAttributePrefix.GetOnlyDictionaryProperty))
.TypeName($"{dictionaryNamespace}<System.String, System.Int32>")
.AsDictionary("get-only-dictionary-property-", typeof(int).FullName)
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleValidHtmlAttributePrefix).FullName)
.PropertyName(nameof(MultipleValidHtmlAttributePrefix.GetOnlyDictionaryPropertyWithAttributePrefix))
.TypeName($"{dictionaryNamespace}<System.String, System.String>")
.AsDictionary("valid-prefix6", typeof(string).FullName)
@ -1840,7 +1840,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(SingleInvalidHtmlAttributePrefix),
new[]
{
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(SingleInvalidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(SingleInvalidHtmlAttributePrefix).FullName)
.Name("valid-name")
.PropertyName(nameof(SingleInvalidHtmlAttributePrefix.StringProperty))
.TypeName(typeof(string).FullName)
@ -1860,12 +1860,12 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(MultipleInvalidHtmlAttributePrefix),
new[]
{
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
.Name("valid-name1")
.PropertyName(nameof(MultipleInvalidHtmlAttributePrefix.LongProperty))
.TypeName(typeof(long).FullName)
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
.Name("valid-name2")
.PropertyName(nameof(MultipleInvalidHtmlAttributePrefix.DictionaryOfIntProperty))
.TypeName($"{typeof(Dictionary<,>).Namespace}.Dictionary<System.Int32, System.String>")
@ -1875,7 +1875,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(MultipleInvalidHtmlAttributePrefix).FullName,
nameof(MultipleInvalidHtmlAttributePrefix.DictionaryOfIntProperty)))
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
.Name("valid-name3")
.PropertyName(nameof(MultipleInvalidHtmlAttributePrefix.ReadOnlyDictionaryProperty))
.TypeName($"{typeof(IReadOnlyDictionary<,>).Namespace}.IReadOnlyDictionary<System.String, System.Object>")
@ -1884,7 +1884,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(MultipleInvalidHtmlAttributePrefix).FullName,
nameof(MultipleInvalidHtmlAttributePrefix.ReadOnlyDictionaryProperty)))
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
.Name("valid-name4")
.PropertyName(nameof(MultipleInvalidHtmlAttributePrefix.IntProperty))
.TypeName(typeof(int).FullName)
@ -1893,7 +1893,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(MultipleInvalidHtmlAttributePrefix).FullName,
nameof(MultipleInvalidHtmlAttributePrefix.IntProperty)))
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
.Name("valid-name5")
.PropertyName(nameof(MultipleInvalidHtmlAttributePrefix.DictionaryOfIntSubclassProperty))
.TypeName(typeof(DictionaryOfIntSubclass).FullName)
@ -1903,7 +1903,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(MultipleInvalidHtmlAttributePrefix).FullName,
nameof(MultipleInvalidHtmlAttributePrefix.DictionaryOfIntSubclassProperty)))
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
.PropertyName(nameof(MultipleInvalidHtmlAttributePrefix.GetOnlyDictionaryAttributePrefix))
.TypeName($"{dictionaryNamespace}<System.Int32, System.String>")
.AsDictionary("valid-prefix6", typeof(string).FullName)
@ -1912,7 +1912,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
typeof(MultipleInvalidHtmlAttributePrefix).FullName,
nameof(MultipleInvalidHtmlAttributePrefix.GetOnlyDictionaryAttributePrefix)))
.Build(),
TagHelperBoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
BoundAttributeDescriptorBuilder.Create(typeof(MultipleInvalidHtmlAttributePrefix).FullName)
.PropertyName(nameof(MultipleInvalidHtmlAttributePrefix.GetOnlyDictionaryPropertyWithAttributeName))
.TypeName($"{dictionaryNamespace}<System.String, System.Object>")
.AsDictionary("invalid-name7-", typeof(object).FullName)
@ -2262,7 +2262,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
string tagName,
string typeName,
string assemblyName,
IEnumerable<Action<TagHelperBoundAttributeDescriptorBuilder>> attributes = null,
IEnumerable<Action<BoundAttributeDescriptorBuilder>> attributes = null,
IEnumerable<Action<TagMatchingRuleBuilder>> ruleBuilders = null)
{
var builder = TagHelperDescriptorBuilder.Create(typeName, assemblyName);

View File

@ -20,7 +20,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Razor
tagName: "tag-name",
typeName: "type name",
assemblyName: "assembly name",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("test-attribute")
@ -63,7 +63,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Razor
tagName: "tag-name",
typeName: "type name",
assemblyName: "assembly name",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("test-attribute")
@ -108,7 +108,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Razor
tagName: "tag-name",
typeName: "type name",
assemblyName: "assembly name",
attributes: new Action<TagHelperBoundAttributeDescriptorBuilder>[]
attributes: new Action<BoundAttributeDescriptorBuilder>[]
{
builder => builder
.Name("test-attribute")
@ -149,7 +149,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Razor
string tagName,
string typeName,
string assemblyName,
IEnumerable<Action<TagHelperBoundAttributeDescriptorBuilder>> attributes = null,
IEnumerable<Action<BoundAttributeDescriptorBuilder>> attributes = null,
IEnumerable<Action<TagMatchingRuleBuilder>> ruleBuilders = null,
Action<TagHelperDescriptorBuilder> configureAction = null)
{