示例#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;
 }
 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;
 }