forked from Azure/azure-functions-dotnet-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement bypass deferred binding (Azure#1462)
Implement bypass deferred binding
- Loading branch information
1 parent
366b226
commit 2a25172
Showing
9 changed files
with
924 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||
</packageSources> | ||
</configuration> |
29 changes: 29 additions & 0 deletions
29
src/DotNetWorker.Core/Converters/Converter/AllowConverterFallbackAttribute.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,29 @@ | ||
// 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.Functions.Worker.Converters | ||
{ | ||
/// <summary> | ||
/// An attribute that specifies if Converter fallback is allowed | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Class)] | ||
public sealed class AllowConverterFallbackAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets the value of whether Converter fallback is allowed. | ||
/// </summary> | ||
public bool AllowConverterFallback { get; } | ||
|
||
/// <summary> | ||
/// Creates a new instance of <see cref="AllowConverterFallbackAttribute"/> | ||
/// </summary> | ||
/// <param name="allowConverterFallback">The value to indicate if converter fallback is allowed.</param> | ||
public AllowConverterFallbackAttribute(bool allowConverterFallback) | ||
{ | ||
AllowConverterFallback = allowConverterFallback; | ||
} | ||
|
||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/DotNetWorker.Core/Converters/Converter/SupportedConverterType.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,29 @@ | ||
// 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.Functions.Worker.Converters | ||
{ | ||
/// <summary> | ||
/// An attribute that can specify a type supported by function input conversion. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] | ||
public sealed class SupportedConverterTypeAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets the input converter type. | ||
/// </summary> | ||
public Type Type { get; } | ||
|
||
/// <summary> | ||
/// Creates a new instance of <see cref="SupportedConverterTypeAttribute"/> | ||
/// </summary> | ||
/// <param name="type">Input converter type.</param> | ||
/// <exception cref="ArgumentNullException">Thrown when type is null</exception> | ||
public SupportedConverterTypeAttribute(Type type) | ||
{ | ||
Type = type ?? throw new ArgumentNullException(nameof(type)); | ||
} | ||
} | ||
} |
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.