-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some refactoring/renames for binding extensibility
- Loading branch information
Showing
22 changed files
with
252 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/Microsoft.Azure.WebJobs.Host/Bindings/BindingProviders/BindingRule.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System; | ||
|
||
namespace Microsoft.Azure.WebJobs.Host.Bindings | ||
{ | ||
/// <summary> | ||
/// Describes a binding rule. See <see cref="IBindingRuleProvider"/>. | ||
/// </summary> | ||
internal class BindingRule | ||
{ | ||
public static readonly BindingRule[] Empty = new BindingRule[0]; | ||
|
||
/// <summary> | ||
/// Gets or sets the binding rule filter. | ||
/// </summary> | ||
public string Filter { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the source attribute type. | ||
/// </summary> | ||
public Type SourceAttribute { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the intermediate converters used to | ||
/// get to the <see cref="UserType"/>. | ||
/// </summary> | ||
public Type[] Converters { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the user type this rule can bind to. | ||
/// </summary> | ||
public OpenType UserType { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/Microsoft.Azure.WebJobs.Host/Bindings/BindingProviders/IBindingRuleProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
|
||
namespace Microsoft.Azure.WebJobs.Host.Bindings | ||
{ | ||
/// <summary> | ||
/// Interface for providing binding rules. | ||
/// </summary> | ||
/// <remarks> | ||
/// This enables <see cref="IBindingProvider"/>s to be self describing which | ||
/// supports tooling scenarios. | ||
/// </remarks> | ||
internal interface IBindingRuleProvider | ||
{ | ||
/// <summary> | ||
/// Gets the <see cref="BindingRule"/>s for this binding. | ||
/// </summary> | ||
/// <returns></returns> | ||
IEnumerable<BindingRule> GetRules(); | ||
|
||
/// <summary> | ||
/// Gets the default binding type for the specified binding options. | ||
/// </summary> | ||
/// <param name="attribute">The binding attribute. This does not need to be resolved.</param> | ||
/// <param name="access">The direction of the binding.</param> | ||
/// <param name="requestedType">The requested binding type. Specify object if none is requested, | ||
/// otherwise provide a specific type (e.g. string, byte[], stream, JObject). | ||
/// </param> | ||
/// <returns>Null if unknown. Else a type that the parameter can be bound to. </returns> | ||
Type GetDefaultType(Attribute attribute, FileAccess access, Type requestedType); | ||
} | ||
} |
34 changes: 0 additions & 34 deletions
34
src/Microsoft.Azure.WebJobs.Host/Bindings/BindingProviders/IRuleProvider.cs
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
src/Microsoft.Azure.WebJobs.Host/Bindings/BindingProviders/Rule.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.