-
Notifications
You must be signed in to change notification settings - Fork 201
fixing nullable warnings #104
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,16 @@ | ||
| // Copyright (c) .NET Foundation. All rights reserved. | ||
| // Copyright (c) .NET Foundation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
|
||
| using System.Collections.Immutable; | ||
| using System.Reflection; | ||
|
|
||
| namespace Microsoft.Azure.Functions.Worker | ||
| { | ||
| public class FunctionMetadata | ||
| public abstract class FunctionMetadata | ||
| { | ||
| public string? PathToAssembly { get; set; } | ||
|
|
||
| public string? EntryPoint { get; set; } | ||
| public abstract string PathToAssembly { get; set; } | ||
|
|
||
| public string? TypeName { get; set; } | ||
| public abstract string EntryPoint { get; set; } | ||
|
|
||
| public string? FunctionId { get; set; } | ||
| public abstract string FunctionId { get; set; } | ||
|
|
||
| public string? FuncName { get; set; } | ||
| public abstract string Name { get; set; } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| using System.IO; | ||
| using Microsoft.Azure.WebJobs.Script.Grpc.Messages; | ||
|
|
||
| namespace Microsoft.Azure.Functions.Worker.Definition | ||
| { | ||
| internal class GrpcFunctionMetadata : FunctionMetadata | ||
| { | ||
| public GrpcFunctionMetadata(FunctionLoadRequest loadRequest) | ||
| { | ||
| EntryPoint = loadRequest.Metadata.EntryPoint; | ||
| Name = loadRequest.Metadata.Name; | ||
| PathToAssembly = Path.GetFullPath(loadRequest.Metadata.ScriptFile); | ||
| FunctionId = loadRequest.FunctionId; | ||
| } | ||
|
|
||
| public override string PathToAssembly { get; set; } | ||
|
|
||
| public override string EntryPoint { get; set; } | ||
|
|
||
| public override string FunctionId { get; set; } | ||
|
|
||
| public override string Name { get; set; } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // Copyright (c) .NET Foundation. All rights reserved. | ||
| // Copyright (c) .NET Foundation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another with just header changes |
||
|
|
||
| using System; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| // Copyright (c) .NET Foundation. All rights reserved. | ||
| // Copyright (c) .NET Foundation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
|
||
| #nullable disable | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For all of these types that came straight from WebJobs, I've just disabled nullable completely. This was a big source of warnings. |
||
|
|
||
| using System; | ||
| using System.Threading.Tasks; | ||
|
|
||
|
|
@@ -24,10 +26,10 @@ public object CreateInstance(IServiceProvider instanceServices) | |
| return FunctionActivator.CreateInstance<TInstance>(instanceServices); | ||
| } | ||
|
|
||
| public Task<object?> InvokeAsync(object instance, object[] arguments) | ||
| public Task<object> InvokeAsync(object instance, object[] arguments) | ||
| { | ||
| return _methodInvoker.InvokeAsync((TInstance)instance, arguments) | ||
| .ContinueWith<object?>(t => t.Result); | ||
| .ContinueWith<object>(t => t.Result); | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Undo this?