BFSchema.Environments.CheckValueOnRange C# (CSharp) Method

CheckValueOnRange() private static method

private static CheckValueOnRange ( long val, BfsEnumRange range, BfsEnumField field ) : void
val long
range BfsEnumRange
field BfsEnumField
return void
        private static void CheckValueOnRange(long val, BfsEnumRange range, BfsEnumField field)
        {
            if ( val < range.StartValue || val > range.EndValue)
                return;

            if (val > range.StartValue && val < range.EndValue)
                BfsCompiler.ReportError(field.SourceRange, "Value intersecting range is not allowed: '" + range + "'");

            if (range.StartInclusion == BfsInclusionEnum.Included && val == range.StartValue
                || range.EndInclusion == BfsInclusionEnum.Included && val == range.EndValue)
                BfsCompiler.ReportError(field.SourceRange, "Value intersecting range is not allowed. Check the inclusion brackets: '" + range + "'");
        }