Removed unnecessary files
This commit is contained in:
parent
ae925049bb
commit
040b5eb179
|
|
@ -1,124 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Razor.Language;
|
||||
|
||||
namespace Microsoft.CodeAnalysis.Razor.Workspaces
|
||||
{
|
||||
public static class TestBoundAttributeDescriptorBuilderExtensions
|
||||
{
|
||||
public static BoundAttributeDescriptorBuilder Name(this BoundAttributeDescriptorBuilder builder, string name)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Name = name;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static BoundAttributeDescriptorBuilder TypeName(this BoundAttributeDescriptorBuilder builder, string typeName)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.TypeName = typeName;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static BoundAttributeDescriptorBuilder PropertyName(this BoundAttributeDescriptorBuilder builder, string propertyName)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.SetPropertyName(propertyName);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static BoundAttributeDescriptorBuilder DisplayName(this BoundAttributeDescriptorBuilder builder, string displayName)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.DisplayName = displayName;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static BoundAttributeDescriptorBuilder AsEnum(this BoundAttributeDescriptorBuilder builder)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.IsEnum = true;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static BoundAttributeDescriptorBuilder AsDictionaryAttribute(
|
||||
this BoundAttributeDescriptorBuilder builder,
|
||||
string attributeNamePrefix,
|
||||
string valueTypeName)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.IsDictionary = true;
|
||||
builder.IndexerAttributeNamePrefix = attributeNamePrefix;
|
||||
builder.IndexerValueTypeName = valueTypeName;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static BoundAttributeDescriptorBuilder Documentation(this BoundAttributeDescriptorBuilder builder, string documentation)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Documentation = documentation;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static BoundAttributeDescriptorBuilder AddMetadata(this BoundAttributeDescriptorBuilder builder, string key, string value)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Metadata[key] = value;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static BoundAttributeDescriptorBuilder AddDiagnostic(this BoundAttributeDescriptorBuilder builder, RazorDiagnostic diagnostic)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Diagnostics.Add(diagnostic);
|
||||
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Razor.Language;
|
||||
|
||||
namespace Microsoft.CodeAnalysis.Razor.Workspaces
|
||||
{
|
||||
public static class TestRequiredAttributeDescriptorBuilderExtensions
|
||||
{
|
||||
public static RequiredAttributeDescriptorBuilder Name(this RequiredAttributeDescriptorBuilder builder, string name)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Name = name;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static RequiredAttributeDescriptorBuilder NameComparisonMode(
|
||||
this RequiredAttributeDescriptorBuilder builder,
|
||||
RequiredAttributeDescriptor.NameComparisonMode nameComparison)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.NameComparisonMode = nameComparison;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static RequiredAttributeDescriptorBuilder Value(this RequiredAttributeDescriptorBuilder builder, string value)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Value = value;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static RequiredAttributeDescriptorBuilder ValueComparisonMode(
|
||||
this RequiredAttributeDescriptorBuilder builder,
|
||||
RequiredAttributeDescriptor.ValueComparisonMode valueComparison)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.ValueComparisonMode = valueComparison;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static RequiredAttributeDescriptorBuilder AddDiagnostic(this RequiredAttributeDescriptorBuilder builder, RazorDiagnostic diagnostic)
|
||||
{
|
||||
builder.Diagnostics.Add(diagnostic);
|
||||
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Razor.Language;
|
||||
|
||||
namespace Microsoft.CodeAnalysis.Razor.Workspaces
|
||||
{
|
||||
public static class TestTagHelperDescriptorBuilderExtensions
|
||||
{
|
||||
public static TagHelperDescriptorBuilder TypeName(this TagHelperDescriptorBuilder builder, string typeName)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.SetTypeName(typeName);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagHelperDescriptorBuilder DisplayName(this TagHelperDescriptorBuilder builder, string displayName)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.DisplayName = displayName;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagHelperDescriptorBuilder AllowChildTag(this TagHelperDescriptorBuilder builder, string allowedChild)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.AllowChildTag(childTagBuilder => childTagBuilder.Name = allowedChild);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagHelperDescriptorBuilder TagOutputHint(this TagHelperDescriptorBuilder builder, string hint)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.TagOutputHint = hint;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagHelperDescriptorBuilder Documentation(this TagHelperDescriptorBuilder builder, string documentation)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Documentation = documentation;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagHelperDescriptorBuilder AddMetadata(this TagHelperDescriptorBuilder builder, string key, string value)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Metadata[key] = value;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagHelperDescriptorBuilder AddDiagnostic(this TagHelperDescriptorBuilder builder, RazorDiagnostic diagnostic)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Diagnostics.Add(diagnostic);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagHelperDescriptorBuilder BoundAttributeDescriptor(
|
||||
this TagHelperDescriptorBuilder builder,
|
||||
Action<BoundAttributeDescriptorBuilder> configure)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.BindAttribute(configure);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagHelperDescriptorBuilder TagMatchingRuleDescriptor(
|
||||
this TagHelperDescriptorBuilder builder,
|
||||
Action<TagMatchingRuleDescriptorBuilder> configure)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.TagMatchingRule(configure);
|
||||
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Razor.Language;
|
||||
|
||||
namespace Microsoft.CodeAnalysis.Razor.Workspaces
|
||||
{
|
||||
public static class TestTagMatchingRuleDescriptorBuilderExtensions
|
||||
{
|
||||
public static TagMatchingRuleDescriptorBuilder RequireTagName(this TagMatchingRuleDescriptorBuilder builder, string tagName)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.TagName = tagName;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagMatchingRuleDescriptorBuilder RequireParentTag(this TagMatchingRuleDescriptorBuilder builder, string parentTag)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.ParentTag = parentTag;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagMatchingRuleDescriptorBuilder RequireTagStructure(this TagMatchingRuleDescriptorBuilder builder, TagStructure tagStructure)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.TagStructure = tagStructure;
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagMatchingRuleDescriptorBuilder AddDiagnostic(this TagMatchingRuleDescriptorBuilder builder, RazorDiagnostic diagnostic)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Diagnostics.Add(diagnostic);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static TagMatchingRuleDescriptorBuilder RequireAttributeDescriptor(
|
||||
this TagMatchingRuleDescriptorBuilder builder,
|
||||
Action<RequiredAttributeDescriptorBuilder> configure)
|
||||
{
|
||||
if (builder == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(builder));
|
||||
}
|
||||
|
||||
builder.Attribute(configure);
|
||||
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue