Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 43 additions & 28 deletions sdk/Sdk.Generators/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,50 @@ namespace Microsoft.Azure.Functions.Worker.Sdk.Generators
{
internal static class Constants
{
// Our types
internal const string BindingAttributeType = "Microsoft.Azure.Functions.Worker.Extensions.Abstractions.BindingAttribute";
internal const string OutputBindingAttributeType = "Microsoft.Azure.Functions.Worker.Extensions.Abstractions.OutputBindingAttribute";
internal const string FunctionNameType = "Microsoft.Azure.Functions.Worker.FunctionAttribute";
internal const string HttpResponseType = "Microsoft.Azure.Functions.Worker.Http.HttpResponseData";
internal const string EventHubsTriggerType = "Microsoft.Azure.Functions.Worker.EventHubTriggerAttribute";
internal const string BindingPropertyNameAttributeType = "Microsoft.Azure.Functions.Worker.Extensions.Abstractions.BindingPropertyNameAttribute";
internal const string DefaultValueType = "Microsoft.Azure.Functions.Worker.Extensions.Abstractions.DefaultValueAttribute";
public static class BuildProperties
{
internal const string EnableSourceGenProp = "build_property.FunctionsMetadataSourceGen_Enabled";
}

// System types
internal const string IEnumerableType = "System.Collections.IEnumerable";
internal const string IEnumerableGenericType = "System.Collections.Generic.IEnumerable`1";
internal const string IEnumerableOfStringType = "System.Collections.Generic.IEnumerable`1<System.String>";
internal const string IEnumerableOfBinaryType = "System.Collections.Generic.IEnumerable`1<System.Byte[]>";
internal const string IEnumerableOfT = "System.Collections.Generic.IEnumerable`1<T>";
internal const string IEnumerableOfKeyValuePair = "System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<TKey,TValue>>";
internal const string StringType = "System.String";
internal const string ByteArrayType = "System.Byte[]";
internal const string ByteStructType = "System.Byte";
internal const string TaskGenericType = "System.Threading.Tasks.Task`1";
internal const string TaskType = "System.Threading.Tasks.Task";
internal const string VoidType = "System.Void";
internal const string ReadOnlyMemoryOfBytes = "System.ReadOnlyMemory`1<System.Byte>";
internal const string LookupGenericType = "System.Linq.Lookup`2";
internal const string DictionaryGenericType = "System.Collections.Generic.Dictionary`2";
public static class FileNames
{
internal const string GeneratedFunctionMetadata = "GeneratedFunctionMetadataProvider.g.cs";
}

internal const string ReturnBindingName = "$return";
internal const string HttpResponseBindingName = "HttpResponse";
internal const string HttpTriggerBindingType = "Microsoft.Azure.Functions.Worker.HttpTriggerAttribute";
internal const string IsBatchedKey = "IsBatched";
public static class Types
{
// Our types
internal const string BindingAttribute = "Microsoft.Azure.Functions.Worker.Extensions.Abstractions.BindingAttribute";
internal const string OutputBindingAttribute = "Microsoft.Azure.Functions.Worker.Extensions.Abstractions.OutputBindingAttribute";
internal const string FunctionName = "Microsoft.Azure.Functions.Worker.FunctionAttribute";
internal const string HttpResponse = "Microsoft.Azure.Functions.Worker.Http.HttpResponseData";
internal const string HttpTriggerBinding = "Microsoft.Azure.Functions.Worker.HttpTriggerAttribute";
internal const string EventHubsTrigger = "Microsoft.Azure.Functions.Worker.EventHubTriggerAttribute";
internal const string BindingPropertyNameAttribute = "Microsoft.Azure.Functions.Worker.Extensions.Abstractions.BindingPropertyNameAttribute";
internal const string DefaultValue = "Microsoft.Azure.Functions.Worker.Extensions.Abstractions.DefaultValueAttribute";

// System types
internal const string IEnumerable = "System.Collections.IEnumerable";
internal const string IEnumerableGeneric = "System.Collections.Generic.IEnumerable`1";
internal const string IEnumerableOfString = "System.Collections.Generic.IEnumerable`1<System.String>";
internal const string IEnumerableOfBinary = "System.Collections.Generic.IEnumerable`1<System.Byte[]>";
internal const string IEnumerableOfT = "System.Collections.Generic.IEnumerable`1<T>";
internal const string IEnumerableOfKeyValuePair = "System.Collections.Generic.IEnumerable`1<System.Collections.Generic.KeyValuePair`2<TKey,TValue>>";
internal const string String = "System.String";
internal const string ByteArray = "System.Byte[]";
internal const string ByteStruct = "System.Byte";
internal const string TaskGeneric = "System.Threading.Tasks.Task`1";
internal const string Task = "System.Threading.Tasks.Task";
internal const string Void = "System.Void";
internal const string ReadOnlyMemoryOfBytes = "System.ReadOnlyMemory`1<System.Byte>";
internal const string LookupGeneric = "System.Linq.Lookup`2";
internal const string DictionaryGeneric = "System.Collections.Generic.Dictionary`2";
}

public static class FunctionMetadataBindingProps {
internal const string ReturnBindingName = "$return";
internal const string HttpResponseBindingName = "HttpResponse";
internal const string IsBatchedKey = "IsBatched";
}
}
}
Loading