{"record":{"id":"463f842537bcd534","repo":"stride3d/stride","slug":"nameof-parametercollectionresolver-can-only-handle-value-and","errorCode":null,"errorMessage":"{nameof(ParameterCollectionResolver)} can only handle Value and Object keys","messagePattern":"(.+?) can only handle Value and Object keys","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Engine/Engine/Design/ParameterCollectionResolver.cs","lineNumber":39,"sourceCode":"        public override Type SupportedType => typeof(ParameterCollection);\n\n        [UnconditionalSuppressMessage(\"Trimming\", \"IL2076\", Justification = \"Accessor instantiations rooted by UpdateEngineProcessor (InstantiateValueAccessor<KeyType>).\")]\n        [UnconditionalSuppressMessage(\"AOT\", \"IL3050\", Justification = \"Accessor instantiation rooted by UpdateEngineProcessor (InstantiateValueAccessor<KeyType>).\")]\n        public override UpdatableMember ResolveIndexer(string indexerName)\n        {\n            var key = ParameterKeys.FindByName(indexerName);\n            if (key == null)\n                throw new InvalidOperationException($\"Property Key path parse error: could not parse indexer value '{indexerName}'\");\n\n            switch (key.Type)\n            {\n                case ParameterKeyType.Value:\n                    var accessorType = typeof(ValueParameterCollectionAccessor<>).MakeGenericType(key.PropertyType);\n                    return (UpdatableMember)Activator.CreateInstance(accessorType, key);\n                case ParameterKeyType.Object:\n                    return new ObjectParameterCollectionAccessor(key);\n                default:\n                    throw new NotSupportedException($\"{nameof(ParameterCollectionResolver)} can only handle Value and Object keys\");\n            }\n        }\n\n        // Needed for AOT platforms\n        public static void InstantiateValueAccessor<T>() where T : struct\n        {\n            new ValueParameterCollectionAccessor<T>(null);\n        }\n\n        private class ValueParameterCollectionAccessor<T> : UpdatableCustomAccessor where T : struct\n        {\n            private readonly ValueParameterKey<T> parameterKey;\n\n            public ValueParameterCollectionAccessor(ValueParameterKey<T> parameterKey)\n            {\n                this.parameterKey = parameterKey;\n            }\n","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Engine/Engine/Design/ParameterCollectionResolver.cs#L21-L57","documentation":"ParameterCollectionResolver.ResolveIndexer supports only ParameterKeyType.Value and ParameterKeyType.Object; any other key type hits the default branch and throws NotSupportedException. This is an explicit capability boundary of the resolver, not a data problem.","triggerScenarios":"Resolving a property path whose ParameterKey has a type other than Value or Object (e.g. a key kind introduced for internal/performance categories) through this resolver.","commonSituations":"Pointing editor property paths at internal parameter keys never meant for this resolver, or framework upgrades adding new key types that older resolver code paths do not handle.","solutions":["Use a supported Value or Object ParameterKey for the property path.","If you own the key, change its registration so it is a Value or Object key.","Handle/avoid the key type in custom resolver code by extending ResolveIndexer with your own accessor."],"exampleFix":"// before\n// path targets key with unsupported ParameterKeyType\n// after\nvar key = ParameterKeys.New<float>(\"MyKeys.Threshold\"); // Value key, supported","handlingStrategy":"try-catch","validationCode":"var key = ParameterKeys.FindByName(keyName);\nif (key != null && key.Type != ParameterKeyType.Value && key.Type != ParameterKeyType.Object)\n    Log.Warning($\"Key '{keyName}' type {key.Type} unsupported by ParameterCollectionResolver.\");","typeGuard":null,"tryCatchPattern":"try { resolver.ResolveIndexer(keyName); }\ncatch (NotSupportedException) { Log.Error($\"Key '{keyName}' is not a Value/Object key; use a supported key or a custom resolver.\"); }","preventionTips":["Use only Value or Object parameter keys in property paths.","Document key-type limitations when adding new key categories.","Extend the resolver explicitly if new key types must be supported."],"tags":["parameters","unsupported-type","property-resolution"],"backgroundTag":"unsupported-operation","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}