{"record":{"id":"879918f8bfc6254b","repo":"stride3d/stride","slug":"value-gestureconfigtap","errorCode":null,"errorMessage":"value","messagePattern":"value","errorType":"validation","errorClass":"ArgumentOutOfRangeException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Input/Gestures/GestureConfigTap.cs","lineNumber":27,"sourceCode":"    /// </summary>\n    /// <remarks>A tap gesture can be composed of 1 or more fingers.</remarks>\n    public sealed class GestureConfigTap : GestureConfig\n    {\n        /// <summary>\n        /// This value represents the required number of successive user touches to trigger the gesture. For example: 1 for single touch, 2 for double touch, and so on...\n        /// </summary>\n        /// <remarks>This value is strictly positive.</remarks>\n        /// <exception cref=\"ArgumentOutOfRangeException\">The given value is not greater or equal to 1.</exception>\n        /// <exception cref=\"InvalidOperationException\">Tried to modify the configuration after it has been frozen by the system.</exception>\n        public int RequiredNumberOfTaps\n        {\n            get { return requiredNumberOfTaps; }\n            set\n            {\n                CheckNotFrozen();\n\n                if (value < 1)\n                    throw new ArgumentOutOfRangeException(\"value\");\n\n                requiredNumberOfTaps = value;\n            }\n        }\n        private int requiredNumberOfTaps;\n\n        /// <summary>\n        /// This value represents the maximum interval of time that can separate two touches of a same gesture. \n        /// By reducing this value, the system will tend to detect multi-touch gesture has several single touch gesture.\n        /// By increasing this value, the system will tend to regroup distant (in time) single touch gestures into a multi-touch gesture.\n        /// </summary>\n        public TimeSpan MaximumTimeBetweenTaps \n        {\n            get { return maximumTimeBetweenTaps; }\n            set\n            {\n                CheckNotFrozen();\n","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Input/Gestures/GestureConfigTap.cs#L9-L45","documentation":"GestureConfigTap.RequiredNumberOfTaps throws ArgumentOutOfRangeException with paramName \"value\" when the assigned tap count is < 1. A tap gesture must require at least one tap; 0 or negative counts are meaningless.","triggerScenarios":"Assigning RequiredNumberOfTaps = 0 or a negative int on an unfrozen GestureConfigTap, e.g. an uninitialized counter or a config default of 0.","commonSituations":"Zero-initialized int fields in settings structures; loops that compute counts that can be 0; confusing '0 means default' conventions that this API does not support.","solutions":["Set RequiredNumberOfTaps to at least 1, e.g. RequiredNumberOfTaps = 2 for double-tap","Guard uninitialized counters before assignment","Use Math.Max(1, tapCount) when the value is computed"],"exampleFix":"// before\ntapConfig.RequiredNumberOfTaps = 0;\n// after\ntapConfig.RequiredNumberOfTaps = Math.Max(1, configuredTaps);","handlingStrategy":"validation","validationCode":"if (taps < 1) throw new ArgumentException(\"RequiredNumberOfTaps must be >= 1\");\ntapConfig.RequiredNumberOfTaps = taps;","typeGuard":"bool IsValidTapCount(int v) => v >= 1;","tryCatchPattern":"try { tapConfig.RequiredNumberOfTaps = taps; }\ncatch (ArgumentOutOfRangeException ex) when (ex.ParamName == \"value\")\n{\n    tapConfig.RequiredNumberOfTaps = Math.Max(1, taps);\n}","preventionTips":["Initialize tap-count settings to 1, not 0","Clamp computed counts with Math.Max(1, count)","Don't assume 0 means 'default'; the API requires >= 1"],"tags":["csharp","argument-out-of-range","input","gestures"],"backgroundTag":"argument-out-of-range","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}