{"record":{"id":"e00682a8028c6f88","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-seventh-qbservableex-homoicon","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'seventh')","messagePattern":"Value cannot be null\\. \\(Parameter 'seventh'\\)","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs","lineNumber":419,"sourceCode":"        /// <returns>An observable sequence containing the result of combining elements of the sources using tuple values.</returns>\n        /// <exception cref=\"ArgumentNullException\">\n        /// <paramref name=\"first\" /> or <paramref name=\"second\" /> or <paramref name=\"third\" /> or <paramref name=\"fourth\" /> or <paramref name=\"fifth\" /> or <paramref name=\"sixth\" /> or <paramref name=\"seventh\" /> or <paramref name=\"eighth\" /> or <paramref name=\"ninth\" /> or <paramref name=\"tenth\" /> is null.</exception>\n        public static IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth)> CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth>(this IQbservable<TFirst> first, IObservable<TSecond> second, IObservable<TThird> third, IObservable<TFourth> fourth, IObservable<TFifth> fifth, IObservable<TSixth> sixth, IObservable<TSeventh> seventh, IObservable<TEighth> eighth, IObservable<TNinth> ninth, IObservable<TTenth> tenth)\n        {\n            if (first == null)\n                throw new ArgumentNullException(nameof(first));\n            if (second == null)\n                throw new ArgumentNullException(nameof(second));\n            if (third == null)\n                throw new ArgumentNullException(nameof(third));\n            if (fourth == null)\n                throw new ArgumentNullException(nameof(fourth));\n            if (fifth == null)\n                throw new ArgumentNullException(nameof(fifth));\n            if (sixth == null)\n                throw new ArgumentNullException(nameof(sixth));\n            if (seventh == null)\n                throw new ArgumentNullException(nameof(seventh));\n            if (eighth == null)\n                throw new ArgumentNullException(nameof(eighth));\n            if (ninth == null)\n                throw new ArgumentNullException(nameof(ninth));\n            if (tenth == null)\n                throw new ArgumentNullException(nameof(tenth));\n\n            return first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth)>(\n                Expression.Call(\n                    null,\n                    new Func<IQbservable<TFirst>, IObservable<TSecond>, IObservable<TThird>, IObservable<TFourth>, IObservable<TFifth>, IObservable<TSixth>, IObservable<TSeventh>, IObservable<TEighth>, IObservable<TNinth>, IObservable<TTenth>, IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth)>>(CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth>).Method,\n                    first.Expression,\n                    GetSourceExpression(second),\n                    GetSourceExpression(third),\n                    GetSourceExpression(fourth),\n                    GetSourceExpression(fifth),\n                    GetSourceExpression(sixth),\n                    GetSourceExpression(seventh),","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs#L401-L437","documentation":"ArgumentNullException with message \"Value cannot be null. (Parameter 'seventh')\" is thrown by the 10-source CombineLatest overload when the seventh source sequence is null. This follows the same eager-validation contract as the other guards: every source argument is checked before the query expression tree is built via first.Provider.CreateQuery.","triggerScenarios":"Calling QbservableEx.CombineLatest with seventh == null; the guard at QbservableEx.Homoicon.cs:419-420 fires once the first six sources validate.","commonSituations":"Combining many streams (e.g. dashboard indicators) where the seventh source depends on configuration that is missing; null results from conditional stream resolution; uninitialized members after a refactor.","solutions":["Ensure the seventh source is a valid IObservable<TSeventh>; coalesce with Observable.Empty<TSeventh>() if it may be absent.","Fix the configuration or initialization that leaves the seventh source null.","If the source is optional, drop it and use a lower-arity CombineLatest overload."],"exampleFix":"// before\nvar combined = first.CombineLatest(second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth);\n// after\nvar combined = first.CombineLatest(second, third, fourth, fifth, sixth, seventh ?? Observable.Empty<TSeventh>(), eighth, ninth, tenth);","handlingStrategy":"validation","validationCode":"if (seventh is null) throw new InvalidOperationException(\"seventh source must be a non-null IObservable<TSeventh>\");\n// or: seventh ??= Observable.Empty<TSeventh>();","typeGuard":"static bool IsValidSource<T>(IObservable<T>? source) => source is not null;","tryCatchPattern":"try\n{\n    var combined = first.CombineLatest(second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth);\n}\ncatch (ArgumentNullException ex) when (ex.ParamName == \"seventh\")\n{\n    // handle missing seventh source\n}","preventionTips":["Ensure configuration-dependent streams are created with a fallback (Empty) when config is missing.","Coalesce optional sources with ?? Observable.Empty<T>().","Use nullable reference types and address compiler nullability warnings."],"tags":["argument-null","reactive-extensions","combinelatest","qbservable","validation"],"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"}