protected override void OnValidateReferences(Validation.ValidationContext result) { base.OnValidateReferences(result); result.CheckSchemaIsValidURI("Uri", this._uri); result.CheckArrayIndexAccess("BufferView", _bufferView, this.LogicalParent.LogicalBufferViews); }
protected override void OnValidateReferences(Validation.ValidationContext result) { base.OnValidateReferences(result); result.CheckSchemaIsDefined("BufferView", _bufferView); result.CheckArrayIndexAccess("BufferView", _bufferView, this.LogicalParent.LogicalBufferViews); result.CheckSchemaNonNegative("ByteOffset", _byteOffset); result.CheckSchemaIsInRange("Count", _count, _countMinimum, int.MaxValue); _sparse?.ValidateReferences(result); }
protected override void OnValidateReferences(Validation.ValidationContext result) { base.OnValidateReferences(result); // check out of range indices foreach (var idx in this._nodes) { result.CheckArrayIndexAccess(nameof(VisualChildren), idx, this.LogicalParent.LogicalNodes); } // check duplicated indices // if (this._nodes.Distinct().Count() != this._nodes.Count) result.AddError(this, "has duplicated node references"); }
protected override void OnValidateReferences(Validation.ValidationContext result) { base.OnValidateReferences(result); result.CheckArrayIndexAccess(nameof(Buffer), _buffer, this.LogicalParent.LogicalBuffers); result.CheckSchemaNonNegative("ByteOffset", _byteOffset); result.CheckSchemaIsInRange("ByteLength", _byteLength, _byteLengthMinimum, int.MaxValue); // ByteStride must be multiple of 4, between 4 and 252 if (_byteStride.HasValue) { result.CheckSchemaIsInRange(nameof(ByteStride), _byteStride.Value, _byteStrideMinimum, _byteStrideMaximum); result.CheckSchemaIsMultipleOf(nameof(ByteStride), _byteStride.Value, 4); } }