{"record":{"id":"00a795ae6c7c94dc","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-task","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'task')","messagePattern":"Value cannot be null\\. \\(Parameter 'task'\\)","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"AsyncRx.NET/System.Reactive.Async/Concurrency/AsyncScheduler.cs","lineNumber":27,"sourceCode":"\nnamespace System.Reactive.Concurrency\n{\n    public static class AsyncScheduler\n    {\n        public static RendezVousAwaitable RendezVous(this IAsyncScheduler scheduler, CancellationToken token = default)\n        {\n            if (scheduler == null)\n                throw new ArgumentNullException(nameof(scheduler));\n\n            token.ThrowIfCancellationRequested();\n\n            return new RendezVousAwaitable(scheduler, token);\n        }\n\n        public static TaskAwaitable RendezVous(this Task task, IAsyncScheduler scheduler, CancellationToken token = default)\n        {\n            if (task == null)\n                throw new ArgumentNullException(nameof(task));\n            if (scheduler == null)\n                throw new ArgumentNullException(nameof(scheduler));\n\n            return new TaskAwaitable(task, continueOnCapturedContext: false, scheduler, token);\n        }\n\n        public static TaskAwaitable<T> RendezVous<T>(this Task<T> task, IAsyncScheduler scheduler, CancellationToken token = default)\n        {\n            if (task == null)\n                throw new ArgumentNullException(nameof(task));\n            if (scheduler == null)\n                throw new ArgumentNullException(nameof(scheduler));\n\n            return new TaskAwaitable<T>(task, continueOnCapturedContext: false, scheduler, token);\n        }\n\n        public static ValueTaskAwaitable RendezVous(this ValueTask task, IAsyncScheduler scheduler, CancellationToken token = default)\n        {","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/AsyncRx.NET/System.Reactive.Async/Concurrency/AsyncScheduler.cs#L9-L45","documentation":"This RendezVous overload moves the continuation of an already-started Task onto the given scheduler; a null task leaves nothing to await. The method's null guard throws before constructing the TaskAwaitable. Fix: pass the Task you intend to reschedule, not null.","triggerScenarios":"Thrown at AsyncRx.NET/System.Reactive.Async/Concurrency/AsyncScheduler.cs:27 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the actual Task produced by the async operation instead of null.","Ensure the expression returning the task is not a void-returning or uninitialized helper."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"94b5d5ab912789f5abe9a72138a25bbd716fe59c","analyzedAt":"2026-09-15T02:26:24.759Z","contentChangedAt":"2026-09-15T02:26:24.759Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}