Mono.Linker.Pipeline.AddStepBefore C# (CSharp) Method

AddStepBefore() public method

public AddStepBefore ( Type target, IStep step ) : void
target System.Type
step IStep
return void
		public void AddStepBefore (Type target, IStep step)
		{
			for (int i = 0; i < _steps.Count; i++) {
				if (_steps [i].GetType () == target) {
					_steps.Insert (i, step);
					return;
				}
			}
		}

Usage Example

コード例 #1
0
        protected static void AddCustomStep(Pipeline pipeline, string arg)
        {
            int pos = arg.IndexOf(":");

            if (pos == -1)
            {
                pipeline.AppendStep(ResolveStep(arg));
                return;
            }

            string [] parts = arg.Split(':');
            if (parts.Length != 2)
            {
                Usage("Step is specified as TYPE:STEP");
            }

            if (parts [0].IndexOf(",") > -1)
            {
                pipeline.AddStepBefore(FindStep(pipeline, parts [1]), ResolveStep(parts [0]));
            }
            else if (parts [1].IndexOf(",") > -1)
            {
                pipeline.AddStepAfter(FindStep(pipeline, parts [0]), ResolveStep(parts [1]));
            }
            else
            {
                Usage("No comma separator in TYPE or STEP");
            }
        }
All Usage Examples Of Mono.Linker.Pipeline::AddStepBefore