Example #1
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     if (Dependencies != null)
     {
         Dependencies.Each(x => { x.AcceptVisitor(visitor); });
     }
 }
Example #2
0
	public override bool VisitDependencies (IDependencyVisitor<string,string> idv)
	{
	    if (deps != null)
		for (int i = 0; i < deps.Length; i++)
		    if (idv.VisitUnnamedTarget (deps[i]))
			return true;
	    
	    if (cdeps != null)
		for (int i = 0; i < cdeps.Length; i++)
		    if (idv.VisitUnnamedResult (cdeps[i]))
			return true;
	    
	    if (named_deps != null) {
		foreach (string arg in named_deps.Keys) {
		    bool res;
		    object o = named_deps[arg];

		    if (o is string)
			res = idv.VisitNamedTarget (arg, (string) o);
		    else
			res = idv.VisitNamedResult (arg, (Result) o);

		    if (res)
			return true;
		}
	    }

	    return false;
	}
Example #3
0
	public bool VisitDependencies (IDependencyVisitor idv)
	{
	    foreach (SingleValue<TargetBuilder> sv in UnnamedDeps) {
		if (idv.VisitUnnamed (sv))
		    return true;
	    }

	    foreach (SingleValue<TargetBuilder> sv in DefaultOrderedDeps) {
		if (idv.VisitDefaultOrdered (sv))
		    return true;
	    }

	    Rule rinst = (Rule) Activator.CreateInstance (Rule);
	    Dictionary<string,int> argmap = rinst.MakeArgNameMap ();

	    foreach (string arg in ArgsWithDeps) {
		int argid = argmap[arg];

		foreach (SingleValue<TargetBuilder> sv in GetArgDeps (arg)) {
		    if (idv.VisitNamed (argid, sv))
			return true;
		}
	    }

	    foreach (string arg in ArgsWithDefaults) {
		if (idv.VisitDefaultValue (argmap[arg], GetArgDefault (arg)))
		    return true;
	    }

	    return false;
	}
Example #4
0
        public override bool VisitDependencies(IDependencyVisitor <string, string> idv)
        {
            if (deps != null)
            {
                for (int i = 0; i < deps.Length; i++)
                {
                    if (idv.VisitUnnamedTarget(deps[i]))
                    {
                        return(true);
                    }
                }
            }

            if (cdeps != null)
            {
                for (int i = 0; i < cdeps.Length; i++)
                {
                    if (idv.VisitUnnamedResult(cdeps[i]))
                    {
                        return(true);
                    }
                }
            }

            if (named_deps != null)
            {
                foreach (string arg in named_deps.Keys)
                {
                    bool   res;
                    object o = named_deps[arg];

                    if (o is string)
                    {
                        res = idv.VisitNamedTarget(arg, (string)o);
                    }
                    else
                    {
                        res = idv.VisitNamedResult(arg, (Result)o);
                    }

                    if (res)
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
Example #5
0
        public bool VisitDependencies(IDependencyVisitor idv)
        {
            foreach (SingleValue <TargetBuilder> sv in UnnamedDeps)
            {
                if (idv.VisitUnnamed(sv))
                {
                    return(true);
                }
            }

            foreach (SingleValue <TargetBuilder> sv in DefaultOrderedDeps)
            {
                if (idv.VisitDefaultOrdered(sv))
                {
                    return(true);
                }
            }

            Rule rinst = (Rule)Activator.CreateInstance(Rule);
            Dictionary <string, int> argmap = rinst.MakeArgNameMap();

            foreach (string arg in ArgsWithDeps)
            {
                int argid = argmap[arg];

                foreach (SingleValue <TargetBuilder> sv in GetArgDeps(arg))
                {
                    if (idv.VisitNamed(argid, sv))
                    {
                        return(true);
                    }
                }
            }

            foreach (string arg in ArgsWithDefaults)
            {
                if (idv.VisitDefaultValue(argmap[arg], GetArgDefault(arg)))
                {
                    return(true);
                }
            }

            return(false);
        }
Example #6
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Constant(this);
 }
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Referenced(this);
 }
Example #8
0
 public Dependency_Visiting_Tester()
 {
     theVisitor = Substitute.For <IDependencyVisitor>();
 }
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.InlineEnumerable(this);
 }
Example #10
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Dependency(this);
 }
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Configured(this);
 }
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.AllPossibleOf(_elementType);
 }
Example #13
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.AllPossibleOf(_elementType);
 }
 public void SetUp()
 {
     theVisitor = MockRepository.GenerateMock <IDependencyVisitor>();
 }
Example #15
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.InlineEnumerable(this);
 }
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Lifecycled(this);
 }
Example #17
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Configured(this);
 }
Example #18
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Problem(this);
 }
Example #19
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Problem(this);
 }
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Lifecycled(this);
 }
Example #21
0
 void IDependencySource.AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Dependency(this);
 }
 public Dependency_Visiting_Tester()
 {
     theVisitor = Substitute.For<IDependencyVisitor>();
 }
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Default(_dependencyType);
 }
Example #24
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Referenced(this);
 }
Example #25
0
 public void SetUp()
 {
     visitor = MockRepository.GenerateMock<IDependencyVisitor>();
 }
Example #26
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Concrete(this);
 }
 public Dependency_Visiting_Tester()
 {
     theVisitor = MockRepository.GenerateMock<IDependencyVisitor>();
 }
 public Dependency_Visiting_Tester()
 {
     theVisitor = MockRepository.GenerateMock <IDependencyVisitor>();
 }
Example #29
0
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Default(_dependencyType);
 }
Example #30
0
	public bool VisitDependencies (IDependencyVisitor<string,string> idv)
	{
	    return idv.VisitUnnamedResult (result);
	}
 public void AcceptVisitor(IDependencyVisitor visitor)
 {
     visitor.Dependency(this);
 }
Example #32
0
 public bool VisitDependencies(IDependencyVisitor <string, string> idv)
 {
     return(idv.VisitUnnamedResult(result));
 }