{"record":{"id":"b1b9727a6d12c479","repo":"dotnet/wpf","slug":"point3dkeyframecollection-0","errorCode":null,"errorMessage":"Point3DKeyFrameCollection[{0}]","messagePattern":"Point3DKeyFrameCollection\\[(.+?)\\]","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs","lineNumber":466,"sourceCode":"            }\n        }\n\n        /// <summary>\n        /// Gets or sets the Point3DKeyFrame at a given index.\n        /// </summary>\n        public Point3DKeyFrame this[int index]\n        {\n            get\n            {\n                ReadPreamble();\n\n                return _keyFrames[index];\n            }\n            set\n            {\n                if (value == null)\n                {\n                    throw new ArgumentNullException(String.Format(CultureInfo.InvariantCulture, \"Point3DKeyFrameCollection[{0}]\", index));\n                }\n\n                WritePreamble();\n\n                if (value != _keyFrames[index])\n                {\n                    OnFreezablePropertyChanged(_keyFrames[index], value);\n                    _keyFrames[index] = value;\n\n                    Debug.Assert(_keyFrames[index] != null);\n\n                    WritePostscript();\n                }\n            }\n        }\n\n        #endregion\n    }","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Animation/Generated/Point3DKeyFrameCollection.cs#L448-L484","documentation":"The Point3DKeyFrameCollection indexer setter throws ArgumentNullException when a null key frame is assigned. The paramName is the formatted string \"Point3DKeyFrameCollection[index]\" identifying the position.","triggerScenarios":"Executing collection[index] = null on a Point3DKeyFrameCollection.","commonSituations":"Data-driven frame generation producing nulls; clearing slots by assigning null.","solutions":["Null-check values before index assignment","Use Add with validated non-null frames","Call RemoveAt to remove a frame instead of assigning null"],"exampleFix":"// before\nkeyFrames[2] = null;\n// after\nif (keyFrames.Count > 2) keyFrames.RemoveAt(2);","handlingStrategy":"validation","validationCode":"if (frame == null) throw new ArgumentException($\"Point3DKeyFrameCollection[{index}] requires a non-null frame\");\ncollection[index] = frame;","typeGuard":"bool IsValidFrame(Point3DKeyFrame f) => f != null;","tryCatchPattern":"try { collection[index] = frame; }\ncatch (ArgumentNullException ex) when (ex.ParamName?.StartsWith(\"Point3DKeyFrameCollection[\") == true) { /* assign a valid frame or remove the slot */ }","preventionTips":["Null-check frames before index assignment","Use RemoveAt to clear slots","Filter null entries from generated frame collections"],"tags":["wpf","animation","null","collection"],"backgroundTag":"null-argument","analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-21T21:30:21.729Z"}