void IAnalysisAccessor.CallOnAnalysisMemberStop(AnalysisMember member) { if (member is RootAnalysisMember) { return; } this.OnAnalysisMemberStop(member); }
void IAnalysisAccessor.CallOnAnalysisMemberEvaluate(AnalysisMember member, Result result) { if (member is RootAnalysisMember) { return; } this.OnAnalysisMemberEvaluate(member, result); }
public IEnumerable <AnalysisMember> AncestorsAndSelf() { for (AnalysisMember current = this; current != null; current = current.Parent) { yield return(current); } yield break; }
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)); }
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)); }
public string GetAnalysisMemberName(AnalysisMember analysisMemeber) { return(this.analysisMemberNames.Value[analysisMemeber]); }
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) { }
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)); }
public FailureException(AnalysisMember source, string message) : base(source, message) { }
public EmptyResultsException(AnalysisMember source) : base(source, Strings.EmptyResults) { }
public Results(AnalysisMember source, IEnumerable <Result <T> > results) { this.Source = source; this.results = results; }
protected virtual void OnAnalysisMemberStop(AnalysisMember member) { }
void IResultAccessor.SetSource(AnalysisMember source) { this.Source = source; }
protected virtual void OnAnalysisMemberEvaluate(AnalysisMember member, Result result) { }
public ConsumerEnumerable(AnalysisMember <T> owner) { this.owner = owner; }
public MultipleResultsException(AnalysisMember source) : base(source, Strings.AccessedValueWhenMultipleResults) { }
public AnalysisException(AnalysisMember source) { this.AnalysisMemberSource = source; }