File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 4
4
using System ;
5
5
using System . Collections . Generic ;
6
6
using System . Linq ;
7
- using System . Text ;
8
7
using Microsoft . Azure . WebJobs . Script . Description ;
9
8
10
9
namespace Microsoft . Azure . WebJobs . Script
@@ -62,6 +61,9 @@ public static bool IsDisabled(this FunctionMetadata metadata) =>
62
61
public static bool IsCodeless ( this FunctionMetadata metadata ) =>
63
62
GetBoolProperty ( metadata . Properties , IsCodelessKey ) ;
64
63
64
+ public static bool IsCodelessSet ( this FunctionMetadata metadata ) =>
65
+ metadata . Properties . ContainsKey ( IsCodelessKey ) ;
66
+
65
67
/// <summary>
66
68
/// Sets a property indicating whether that this function is a direct invoke.
67
69
/// </summary>
Original file line number Diff line number Diff line change @@ -214,8 +214,11 @@ private void AddMetadataFromCustomProviders(IEnumerable<IFunctionProvider> funct
214
214
throw new InvalidOperationException ( $ "Found duplicate { nameof ( FunctionMetadata ) } with the name { metadata . Name } ") ;
215
215
}
216
216
217
- // All custom provided functions are considered codeless functions
218
- metadata . SetIsCodeless ( true ) ;
217
+ // If not explicitly set, consider the function codeless.
218
+ if ( ! metadata . IsCodelessSet ( ) )
219
+ {
220
+ metadata . SetIsCodeless ( true ) ;
221
+ }
219
222
220
223
distinctFunctionNames . Add ( metadata . Name ) ;
221
224
functionMetadataList . Add ( metadata ) ;
Original file line number Diff line number Diff line change 724
724
},
725
725
{
726
726
"name" : " System.Collections" ,
727
- "resolutionPolicy" : " minorMatchOrLower "
727
+ "resolutionPolicy" : " runtimeVersion "
728
728
},
729
729
{
730
730
"name" : " System.Collections.Concurrent" ,
731
731
"resolutionPolicy" : " minorMatchOrLower"
732
732
},
733
733
{
734
734
"name" : " System.Collections.Immutable" ,
735
- "resolutionPolicy" : " minorMatchOrLower "
735
+ "resolutionPolicy" : " runtimeVersion "
736
736
},
737
737
{
738
738
"name" : " System.Collections.NonGeneric" ,
1136
1136
},
1137
1137
{
1138
1138
"name" : " System.Runtime" ,
1139
- "resolutionPolicy" : " minorMatchOrLower "
1139
+ "resolutionPolicy" : " runtimeVersion "
1140
1140
},
1141
1141
{
1142
1142
"name" : " System.Runtime.CompilerServices.VisualC" ,
You can’t perform that action at this time.
0 commit comments