Skip to content

Commit 9a0e5e2

Browse files
Rename metadata to IFromFormMetadata
Rename IFromFileMetadata to IFromFormMetadata.
1 parent 45b30d2 commit 9a0e5e2

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/Http/Http.Abstractions/src/Metadata/IFromFileMetadata.cs renamed to src/Http/Http.Abstractions/src/Metadata/IFromFormMetadata.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
namespace Microsoft.AspNetCore.Http.Metadata;
55

66
/// <summary>
7-
/// Interface marking attributes that specify a parameter should be bound using a form file from the request body.
7+
/// Interface marking attributes that specify a parameter should be bound using a form field from the request body.
88
/// </summary>
9-
public interface IFromFileMetadata
9+
public interface IFromFormMetadata
1010
{
1111
/// <summary>
12-
/// The file name.
12+
/// The form field name.
1313
/// </summary>
1414
string? Name { get; }
1515
}

src/Http/Http.Abstractions/src/PublicAPI.Unshipped.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Microsoft.AspNetCore.Http.Metadata.IAcceptsMetadata.IsOptional.get -> bool
1414
Microsoft.AspNetCore.Http.Metadata.IAcceptsMetadata.RequestType.get -> System.Type?
1515
Microsoft.AspNetCore.Http.Metadata.IFromBodyMetadata
1616
Microsoft.AspNetCore.Http.Metadata.IFromBodyMetadata.AllowEmpty.get -> bool
17-
Microsoft.AspNetCore.Http.Metadata.IFromFileMetadata
18-
Microsoft.AspNetCore.Http.Metadata.IFromFileMetadata.Name.get -> string?
17+
Microsoft.AspNetCore.Http.Metadata.IFromFormMetadata
18+
Microsoft.AspNetCore.Http.Metadata.IFromFormMetadata.Name.get -> string?
1919
Microsoft.AspNetCore.Http.Metadata.IFromHeaderMetadata
2020
Microsoft.AspNetCore.Http.Metadata.IFromHeaderMetadata.Name.get -> string?
2121
Microsoft.AspNetCore.Http.Metadata.IFromQueryMetadata

src/Http/Http.Extensions/src/RequestDelegateFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ private static Expression CreateArgument(ParameterInfo parameter, FactoryContext
249249
factoryContext.TrackedParameters.Add(parameter.Name, RequestDelegateFactoryConstants.BodyAttribute);
250250
return BindParameterFromBody(parameter, bodyAttribute.AllowEmpty, factoryContext);
251251
}
252-
else if (parameterCustomAttributes.OfType<IFromFileMetadata>().FirstOrDefault() is { } fileAttribute)
252+
else if (parameterCustomAttributes.OfType<IFromFormMetadata>().FirstOrDefault() is { } fileAttribute)
253253
{
254254
return BindParameterFromFormFile(parameter, fileAttribute.Name ?? parameter.Name, factoryContext, RequestDelegateFactoryConstants.FormFileAttribute);
255255
}

src/Http/Http.Extensions/test/RequestDelegateFactoryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3843,7 +3843,7 @@ private class FromBodyAttribute : Attribute, IFromBodyMetadata
38433843
public bool AllowEmpty { get; set; }
38443844
}
38453845

3846-
private class FromFormFileAttribute : Attribute, IFromFileMetadata
3846+
private class FromFormFileAttribute : Attribute, IFromFormMetadata
38473847
{
38483848
public string? Name { get; set; }
38493849
}

0 commit comments

Comments
 (0)