Beispiel #1
0
 public LinkContext(Pipeline pipeline, AssemblyResolver resolver)
 {
     _pipeline = pipeline;
     _resolver = resolver;
     _actions = new Hashtable ();
     _parameters = new Hashtable ();
     _annotations = new AnnotationStore ();
     _readerParameters = new ReaderParameters {
         AssemblyResolver = _resolver,
     };
 }
Beispiel #2
0
 public LinkContext(Pipeline pipeline)
     : this(pipeline, new AssemblyResolver ())
 {
 }
Beispiel #3
0
        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");
        }
Beispiel #4
0
 static Pipeline GetStandardPipeline()
 {
     Pipeline p = new Pipeline ();
     p.AppendStep (new LoadReferencesStep ());
     p.AppendStep (new BlacklistStep ());
     p.AppendStep (new TypeMapStep ());
     p.AppendStep (new MarkStep ());
     p.AppendStep (new SweepStep ());
     p.AppendStep (new CleanStep ());
     p.AppendStep (new RegenerateGuidStep ());
     p.AppendStep (new OutputStep ());
     return p;
 }
Beispiel #5
0
 static LinkContext GetDefaultContext(Pipeline pipeline)
 {
     LinkContext context = new LinkContext (pipeline);
     context.CoreAction = AssemblyAction.Skip;
     context.OutputDirectory = "output";
     return context;
 }
Beispiel #6
0
        static Type FindStep(Pipeline pipeline, string name)
        {
            foreach (IStep step in pipeline.GetSteps ()) {
                Type t = step.GetType ();
                if (t.Name == name)
                    return t;
            }

            return null;
        }