{"record":{"id":"c6a935601595c8ea","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-source10-observable-multiple","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'source10')","messagePattern":"Value cannot be null\\. \\(Parameter 'source10'\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs","lineNumber":508,"sourceCode":"\n            if (source7 == null)\n            {\n                throw new ArgumentNullException(nameof(source7));\n            }\n\n            if (source8 == null)\n            {\n                throw new ArgumentNullException(nameof(source8));\n            }\n\n            if (source9 == null)\n            {\n                throw new ArgumentNullException(nameof(source9));\n            }\n\n            if (source10 == null)\n            {\n                throw new ArgumentNullException(nameof(source10));\n            }\n\n            if (resultSelector == null)\n            {\n                throw new ArgumentNullException(nameof(resultSelector));\n            }\n\n            return s_impl.CombineLatest(source1, source2, source3, source4, source5, source6, source7, source8, source9, source10, resultSelector);\n        }\n\n        /// <summary>\n        /// Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.\n        /// </summary>\n        /// <typeparam name=\"TSource1\">The type of the elements in the first source sequence.</typeparam>\n        /// <typeparam name=\"TSource2\">The type of the elements in the second source sequence.</typeparam>\n        /// <typeparam name=\"TSource3\">The type of the elements in the third source sequence.</typeparam>\n        /// <typeparam name=\"TSource4\">The type of the elements in the fourth source sequence.</typeparam>\n        /// <typeparam name=\"TSource5\">The type of the elements in the fifth source sequence.</typeparam>","sourceCodeStart":490,"sourceCodeEnd":526,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs#L490-L526","documentation":"Thrown by the public CombineLatest overload when the tenth source sequence ('source10') is null. This is the last source argument validated before the result selector; the ArgumentNullException names 'source10' and is thrown eagerly at the call site. It signals a null was supplied where a source IObservable was required.","triggerScenarios":"Observable.CombineLatest with 10 sources and a result selector, where the tenth IObservable argument is null.","commonSituations":"Ten-input merges (dashboard aggregations) where the last stream came from a nullable dependency; copy-paste argument lists where one slot retained a null placeholder.","solutions":["Supply a non-null observable; use Observable.Empty<T>()/Never<T>() if the stream is legitimately absent.","Fix the initialization or lookup that produced the null for source10.","Add a pre-call null check across all sources with a descriptive exception.","Consider grouping sources into an array and using the collection-based CombineLatest overload."],"exampleFix":"// before\nvar agg = Observable.CombineLatest(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) => ...);\n// after\nvar agg = Observable.CombineLatest(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ?? Observable.Empty<Item>(), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) => ...);","handlingStrategy":"validation","validationCode":"if (source10 == null) throw new ArgumentNullException(nameof(source10));","typeGuard":"bool IsValidSource<T>(IObservable<T> s) => s is not null;","tryCatchPattern":"try { var agg = Observable.CombineLatest(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, selector); }\ncatch (ArgumentNullException ex) when (ex.ParamName == \"source10\") { log.Error(\"aggregation source 10 is null\"); }","preventionTips":["Use the collection-based CombineLatest overload for 10 sources","Avoid null placeholders in copy-pasted argument lists","Make nullable dependencies explicit and initialize at startup","Add a startup self-check that composes all dashboard sources"],"tags":["csharp","rx","null-argument","argument-validation","combinelatest"],"backgroundTag":"null-argument","analyzedSha":"94b5d5ab912789f5abe9a72138a25bbd716fe59c","analyzedAt":"2026-09-15T02:26:24.759Z","contentChangedAt":"2026-09-15T02:26:24.759Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}