-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDK should Honor FunctionName attribute #1170
Comments
sys.MethodName should be the actual name of the method, it shouldn't be overridden by the functionname attribute |
@paulbatum - I'd disagree. The actual C# method name should be viewed as an implementation detail - we don't want things taking a direct dependency on that. VS Tooling includes [FunctionName] attributes by default and that's what they show up in Script. For example, Bot uses {sys.MethodName} and expects to get the Script function name which would be [FunctionName]. |
I agree that {sys.MethodName} should reflect the method name as opposed to the logical function name. If we want to expose a way to get the function name, we should probably introduce a {sys.FunctionName} instead, as passing the function name when binding to the method would be surprising/confusing. |
@fabiocav - please see my comments above. Exposing the reflection name would actually be incorrect; and there's not a good reason to add that low-level functionality. |
I agree, but I'd argue that, given its name today, that's what people would expect. We don't refer to the function name as a method name anywhere. Introducing a FunctionName and perhaps deprecating MethodName would probably be the right approach. |
This is recently new surface area. If it's a naming issue, we can do a full rename MethodName --> FunctionName, and we just need to update BOT. But we shouldn't have anything handing out the underlying Reflection name. |
I'm fine with that, assuming we never disclosed sys.methodname publicly and therefore not a breaking change |
It was added here: 962dfa6 on April 24th. |
…criptor. Remove FunctionDescriptor.MethodInfo. Adding new fields on FunctionDescriptor like LogName, IsDisabled, HasCanncelationtoken. methodInfo.DeclaringType.Name + "." +methodInfo.Name --> FunctionDescriptor.ShortName methodInfo.Name --> FunctionDescriptor.LogName Continuation of work started in 183e3c4 No functional change here. This is prepping for the [FunctionName] support. (#1170)
…criptor. Remove FunctionDescriptor.MethodInfo. Adding new fields on FunctionDescriptor like LogName, IsDisabled, HasCanncelationtoken. methodInfo.DeclaringType.Name + "." +methodInfo.Name --> FunctionDescriptor.ShortName methodInfo.Name --> FunctionDescriptor.LogName Continuation of work started in 183e3c4 No functional change here. This is prepping for the [FunctionName] support. (#1170)
…criptor. Remove FunctionDescriptor.MethodInfo. Adding new fields on FunctionDescriptor like LogName, IsDisabled, HasCanncelationtoken. methodInfo.DeclaringType.Name + "." +methodInfo.Name --> FunctionDescriptor.ShortName methodInfo.Name --> FunctionDescriptor.LogName Continuation of work started in 183e3c4 No functional change here. This is prepping for the [FunctionName] support. (#1170)
Resolve #1170 Add new JobHost.CallAsync(string) endpoint which can honor the method name.
Resolve #1170 Add new JobHost.CallAsync(string) endpoint which can honor the method name.
…criptor. Remove FunctionDescriptor.MethodInfo. Adding new fields on FunctionDescriptor like LogName, IsDisabled, HasCanncelationtoken. methodInfo.DeclaringType.Name + "." +methodInfo.Name --> FunctionDescriptor.ShortName methodInfo.Name --> FunctionDescriptor.LogName Continuation of work started in 183e3c4 No functional change here. This is prepping for the [FunctionName] support. (#1170) # Conflicts: # test/Microsoft.Azure.WebJobs.Host.UnitTests/Singleton/SingletonListenerTests.cs # test/Microsoft.Azure.WebJobs.Host.UnitTests/WebJobs.Host.UnitTests.csproj
Resolve #1170 Add new JobHost.CallAsync(string) endpoint which can honor the method name.
Resolve Azure#1170 Add new JobHost.CallAsync(string) endpoint which can honor the method name.
…criptor. Remove FunctionDescriptor.MethodInfo. Adding new fields on FunctionDescriptor like LogName, IsDisabled, HasCanncelationtoken. methodInfo.DeclaringType.Name + "." +methodInfo.Name --> FunctionDescriptor.ShortName methodInfo.Name --> FunctionDescriptor.LogName Continuation of work started in 183e3c4 No functional change here. This is prepping for the [FunctionName] support. (#1170) # Conflicts: # test/Microsoft.Azure.WebJobs.Host.UnitTests/Singleton/SingletonListenerTests.cs # test/Microsoft.Azure.WebJobs.Host.UnitTests/WebJobs.Host.UnitTests.csproj
Resolve #1170 Add new JobHost.CallAsync(string) endpoint which can honor the method name.
…criptor. Remove FunctionDescriptor.MethodInfo. Adding new fields on FunctionDescriptor like LogName, IsDisabled, HasCanncelationtoken. methodInfo.DeclaringType.Name + "." +methodInfo.Name --> FunctionDescriptor.ShortName methodInfo.Name --> FunctionDescriptor.LogName Continuation of work started in Azure/azure-webjobs-sdk@183e3c4 No functional change here. This is prepping for the [FunctionName] support. (Azure/azure-webjobs-sdk#1170)
Resolve Azure/azure-webjobs-sdk#1170 Add new JobHost.CallAsync(string) endpoint which can honor the method name.
…criptor. Remove FunctionDescriptor.MethodInfo. Adding new fields on FunctionDescriptor like LogName, IsDisabled, HasCanncelationtoken. methodInfo.DeclaringType.Name + "." +methodInfo.Name --> FunctionDescriptor.ShortName methodInfo.Name --> FunctionDescriptor.LogName Continuation of work started in Azure/azure-webjobs-sdk@183e3c4 No functional change here. This is prepping for the [FunctionName] support. (Azure/azure-webjobs-sdk#1170)
Resolve Azure/azure-webjobs-sdk#1170 Add new JobHost.CallAsync(string) endpoint which can honor the method name.
We added a FunctionName attribute #1075
It's only a placeholder used by VS tooling, but SDK should honor this attribute too and plumb it through.
The text was updated successfully, but these errors were encountered: