Boo.Lang.Compiler.CompilerPipeline.Find C# (CSharp) Метод

Find() публичный Метод

public Find ( Type stepExactType ) : int
stepExactType System.Type
Результат int
        public int Find(Type stepExactType)
        {
            if (null == stepExactType) throw new ArgumentNullException("stepExactType");

            for (int i=0; i<_items.Count; ++i)
            {
                if (_items[i].GetType() == stepExactType)
                {
                    return i;
                }
            }
            return -1;
        }

Usage Example

        public static CompilerPipeline Extend(CompilerPipeline pipeline) {
            if(pipeline.Find(typeof(ExtensionsPreprocessorCompilerStep))==-1) {
#if !LIB2
                if (pipeline.Find(typeof (BooParsingStep)) != -1) {
                    pipeline.InsertAfter(typeof (BooParsingStep), new ExtensionsPreprocessorCompilerStep());
                }
#else
                if (pipeline.Find(typeof(Parsing)) != -1)
                {
                    pipeline.InsertAfter(typeof(Parsing), new ExtensionsPreprocessorCompilerStep());
                }
#endif
            }
            return pipeline;
        }
All Usage Examples Of Boo.Lang.Compiler.CompilerPipeline::Find