private void AnalyzeInternal <TItem>(ServiceCache serviceCache, Type stemType) where TItem : class { var stemDefinition = new StemDefinition(); var attributeAnalyzer = new AttributeAnalyzer(_propertyAutoMapper); attributeAnalyzer.Analyze(stemDefinition, stemType); var implementations = new EngineImplementations <TItem>(); var definitionAnalyzer = new DefinitionAnalyzer <TItem>(_analyzers); definitionAnalyzer.Analyze(implementations, stemDefinition); serviceCache.Add(stemType, implementations); }
public void Analyze(ServiceCache serviceCache, IEnumerable <Type> stemTypes) { foreach (Type stemType in stemTypes) { Type itemType = GetStemItemType(stemType); try { Reflect.Instance(this).GetMethod(nameof(AnalyzeInternal)) .MakeGeneric(itemType) .Invoke(serviceCache, stemType); } catch (TargetInvocationException ex) { // TODO move to Reflectious ExceptionDispatchInfo.Capture(ex.InnerException).Throw(); throw ex.InnerException; } } }
internal AnalyzedServiceGroup(IAnalyzer <ServiceCache, IEnumerable <Type> > analyzer) { _cache = new ServiceCache(); _analyzer = analyzer; }