ShaderInterpreter.Converter.ErrorIfLinesWith C# (CSharp) Method

ErrorIfLinesWith() private static method

Throws an exception if there is a line with the //#if syntax, which is not supported in C# (except very annoying //#define at the very beginning of the file)!
private static ErrorIfLinesWith ( string _Source, string _Pattern ) : void
_Source string
_Pattern string
return void
        private static void ErrorIfLinesWith( string _Source, string _Pattern )
        {
            int	MatchIndex = _Source.IndexOf( _Pattern, StringComparison.InvariantCultureIgnoreCase );
            if ( MatchIndex == -1 )
                return;	// We're safe!

            throw new ConverterException( "Found an unsupported preprocess #if! Please remove the concerned block...", _Source, MatchIndex );
        }