示例#1
0
 public void AddCalledBy(MosaMethod method)
 {
     lock (this)
     {
         CalledBy.AddIfNew(method);
     }
 }
 public void RemoveFromCalledBy(DependencyMethod calledMethod)
 {
     CalledBy.Remove(calledMethod);
     if (!HasCallers)
     {
         Graph.PromoteToRoot(this);
     }
 }
        private List <DependencyMethod> FindCycle(List <DependencyMethod> callPath)
        {
            callPath.Add(this);

            // follow graph upwards until we find a method that we have visited before -> cycle detected
            var firstCaller = CalledBy.First();
            int callerIndex = callPath.IndexOf(firstCaller);

            if (callerIndex != -1)
            {
                // the original method and some of its callers may not be part of the cycle
                // -> trim callPath to contain only cycle members
                return(callPath.GetRange(callerIndex, callPath.Count - callerIndex));
            }
            return(firstCaller.FindCycle(callPath));
        }
		public ExplicitlySetConstructorExample (KnownC c, KnownD d)
		{
			CalledBy = CalledBy.TwoParametersNoneUnknown;
		}
		public ExplicitlySetConstructorExample (UnknownA a, KnownC c)
		{
			CalledBy = CalledBy.TwoParametersOneUnknown;
		}
		public ExplicitlySetConstructorExample (UnknownA a)
		{
			CalledBy = CalledBy.OneUnknown;
		}
示例#7
0
 public MultipleConstructorExample(KnownC c, KnownD d)
 {
     CalledBy = CalledBy.TwoParametersNoneUnknown;
 }
示例#8
0
 public MultipleConstructorExample(UnknownA a, KnownC c)
 {
     CalledBy = CalledBy.TwoParametersOneUnknown;
 }
示例#9
0
 public MultipleConstructorExample(UnknownA a)
 {
     CalledBy = CalledBy.OneUnknown;
 }
		public MultipleConstructorExample ()
		{
			CalledBy = CalledBy.Empty;
		}
		public UserDefinedConstructorExample (KnownC c)
		{
			CalledBy = CalledBy.OneKnown;
		}
		public UserDefinedConstructorExample (UnknownA a)
		{
			CalledBy = CalledBy.OneUnknown;
		}
 public ExplicitlySetConstructorExample(KnownC c, KnownD d)
 {
     CalledBy = CalledBy.TwoParametersNoneUnknown;
 }
 public ExplicitlySetConstructorExample(UnknownA a, UnknownB b)
 {
     CalledBy = CalledBy.TwoParametersTwoUnknown;
 }
 public ExplicitlySetConstructorExample(UnknownA a, KnownC c)
 {
     CalledBy = CalledBy.TwoParametersOneUnknown;
 }
 public ExplicitlySetConstructorExample(KnownC c)
 {
     CalledBy = CalledBy.OneKnown;
 }
		public MultipleConstructorExample (KnownC c)
		{
			CalledBy = CalledBy.OneKnown;
		}
		public MultipleConstructorExample (UnknownA a, UnknownB b)
		{
			CalledBy = CalledBy.TwoParametersTwoUnknown;
		}
		public UserDefinedConstructorExample (UnknownA a, KnownC c)
		{
			CalledBy = CalledBy.TwoParametersOneUnknown;
		}
 public ExplicitlySetConstructorExample(UnknownA a)
 {
     CalledBy = CalledBy.OneUnknown;
 }
		public UserDefinedConstructorExample (UnknownA a, UnknownB b)
		{
			CalledBy = CalledBy.TwoParametersTwoUnknown;
		}
示例#22
0
 public MultipleConstructorExample(KnownC c)
 {
     CalledBy = CalledBy.OneKnown;
 }
		public UserDefinedConstructorExample (KnownC c, KnownD d)
		{
			CalledBy = CalledBy.TwoParametersNoneUnknown;
		}
示例#24
0
 public MultipleConstructorExample(UnknownA a, UnknownB b)
 {
     CalledBy = CalledBy.TwoParametersTwoUnknown;
 }
		public UserDefinedConstructorExample ()
		{
			CalledBy = CalledBy.Empty;
		}
		public ExplicitlySetConstructorExample ()
		{
			CalledBy = CalledBy.Empty;
		}
 public UserDefinedConstructorExample()
 {
     CalledBy = CalledBy.Empty;
 }
		public ExplicitlySetConstructorExample (KnownC c)
		{
			CalledBy = CalledBy.OneKnown;
		}
 public UserDefinedConstructorExample(UnknownA a)
 {
     CalledBy = CalledBy.OneUnknown;
 }
		public ExplicitlySetConstructorExample (UnknownA a, UnknownB b)
		{
			CalledBy = CalledBy.TwoParametersTwoUnknown;
		}
 public UserDefinedConstructorExample(KnownC c)
 {
     CalledBy = CalledBy.OneKnown;
 }
		public MultipleConstructorExample (UnknownA a)
		{
			CalledBy = CalledBy.OneUnknown;
		}
 public UserDefinedConstructorExample(UnknownA a, KnownC c)
 {
     CalledBy = CalledBy.TwoParametersOneUnknown;
 }
		public MultipleConstructorExample (UnknownA a, KnownC c)
		{
			CalledBy = CalledBy.TwoParametersOneUnknown;
		}
 public UserDefinedConstructorExample(UnknownA a, UnknownB b)
 {
     CalledBy = CalledBy.TwoParametersTwoUnknown;
 }
		public MultipleConstructorExample (KnownC c, KnownD d)
		{
			CalledBy = CalledBy.TwoParametersNoneUnknown;
		}
示例#37
0
 public MultipleConstructorExample()
 {
     CalledBy = CalledBy.Empty;
 }
 public UserDefinedConstructorExample(KnownC c, KnownD d)
 {
     CalledBy = CalledBy.TwoParametersNoneUnknown;
 }
 public ExplicitlySetConstructorExample()
 {
     CalledBy = CalledBy.Empty;
 }