예제 #1
0
 void IAnalysisAccessor.CallOnAnalysisMemberStop(AnalysisMember member)
 {
     if (member is RootAnalysisMember)
     {
         return;
     }
     this.OnAnalysisMemberStop(member);
 }
예제 #2
0
 void IAnalysisAccessor.CallOnAnalysisMemberEvaluate(AnalysisMember member, Result result)
 {
     if (member is RootAnalysisMember)
     {
         return;
     }
     this.OnAnalysisMemberEvaluate(member, result);
 }
예제 #3
0
 public IEnumerable <AnalysisMember> AncestorsAndSelf()
 {
     for (AnalysisMember current = this; current != null; current = current.Parent)
     {
         yield return(current);
     }
     yield break;
 }
예제 #4
0
        public Results <T> RelativeResults(Result relativeTo)
        {
            HashSet <AnalysisMember> ancestors      = new HashSet <AnalysisMember>(base.AncestorsAndSelf());
            AnalysisMember           commonAncestor = (from x in relativeTo.Source.AncestorsAndSelf()
                                                       where ancestors.Contains(x)
                                                       select x).First <AnalysisMember>();
            Result result = (from x in relativeTo.AncestorsAndSelf()
                             where x.Source == commonAncestor
                             select x).First <Result>();

            return(result.DescendantsOfType <T>(this));
        }
예제 #5
0
        public Result <T> AncestorOfType <T>(AnalysisMember <T> ancestor)
        {
            Result result = (from x in this.AncestorsAndSelf()
                             where x.Source == ancestor
                             select x).FirstOrDefault <Result>();

            if (ancestor != null)
            {
                return((Result <T>)result);
            }
            throw new AnalysisException(this.Source, Strings.ResultAncestorNotFound(ancestor.Name));
        }
예제 #6
0
 public string GetAnalysisMemberName(AnalysisMember analysisMemeber)
 {
     return(this.analysisMemberNames.Value[analysisMemeber]);
 }
예제 #7
0
 public ConsumerEnumerator(AnalysisMember <T> owner)
 {
     this.owner        = owner;
     this.currentIndex = -1;
     this.hasValue     = false;
 }
예제 #8
0
 public AnalysisException(AnalysisMember source, string message, Exception inner) : base(message, inner)
 {
     this.AnalysisMemberSource = source;
 }
 public AccessedFailedResultException(AnalysisMember source, Exception inner) : base(source, Strings.AccessedFailedResult, inner)
 {
 }
예제 #10
0
 public Results <T> DescendantsOfType <T>(AnalysisMember <T> analysisMemeber)
 {
     return(new Results <T>(analysisMemeber, from x in analysisMemeber.Results
                            where x.AncestorsAndSelf().Contains(this)
                            select x));
 }
예제 #11
0
 public FailureException(AnalysisMember source, string message) : base(source, message)
 {
 }
 public EmptyResultsException(AnalysisMember source) : base(source, Strings.EmptyResults)
 {
 }
예제 #13
0
 public Results(AnalysisMember source, IEnumerable <Result <T> > results)
 {
     this.Source  = source;
     this.results = results;
 }
예제 #14
0
 protected virtual void OnAnalysisMemberStop(AnalysisMember member)
 {
 }
예제 #15
0
 void IResultAccessor.SetSource(AnalysisMember source)
 {
     this.Source = source;
 }
예제 #16
0
 protected virtual void OnAnalysisMemberEvaluate(AnalysisMember member, Result result)
 {
 }
예제 #17
0
 public ConsumerEnumerable(AnalysisMember <T> owner)
 {
     this.owner = owner;
 }
예제 #18
0
 public MultipleResultsException(AnalysisMember source) : base(source, Strings.AccessedValueWhenMultipleResults)
 {
 }
예제 #19
0
 public AnalysisException(AnalysisMember source)
 {
     this.AnalysisMemberSource = source;
 }