Skip to content

Commit

Permalink
Reuse existing helper
Browse files Browse the repository at this point in the history
  • Loading branch information
liliankasem committed Jan 17, 2023
1 parent 0e68eb0 commit 0221a20
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions sdk/Sdk/FunctionMetadataGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,6 @@ private static ExpandoObject BuildBindingMetadataFromAttribute(CustomAttribute a
return binding;
}

private static bool SupportsDeferredBinding(CustomAttribute attribute)
{
var typeDefinition = attribute.AttributeType.Resolve();
return typeDefinition.CustomAttributes.Any(a => a.AttributeType.FullName == Constants.SupportsDeferredBindingAttributeType);
}

private static bool IsIterableCollection(TypeReference type, out DataType dataType)
{
// Array and not byte array
Expand Down Expand Up @@ -801,6 +795,11 @@ private static string GetBindingDirection(CustomAttribute attribute)
return Constants.InputBindingDirection;
}

private static bool SupportsDeferredBinding(CustomAttribute attribute)
{
return TryGetBaseAttributeType(attribute, Constants.SupportsDeferredBindingAttributeType, out _);
}

private static bool IsOutputBindingType(CustomAttribute attribute)
{
return TryGetBaseAttributeType(attribute, Constants.OutputBindingType, out _);
Expand Down

0 comments on commit 0221a20

Please sign in to comment.