public void Modify(ConnegGraph graph, BehaviorGraph behaviorGraph) { graph.OutputNodesFor <T>().Each(node => _modifications.Each(x => x(node))); if (_projection.IsValueCreated) { behaviorGraph.Services.SetServiceIfNone(typeof(IProjection <T>), ObjectDef.ForValue(_projection.Value)); } if (_links.IsValueCreated) { behaviorGraph.Services.SetServiceIfNone(typeof(ILinkSource <T>), ObjectDef.ForValue(_links.Value)); } }
public void Configure(BehaviorGraph graph) { _filters.Each(filter => { graph.Behaviors.Where(filter.Filter).ToList().Each(chain => { // TODO -- need to do better config logging here chain.ApplyConneg(); }); }); var connegGraph = new ConnegGraph(graph); // TODO -- add some config logging here _types .TypesMatching(x => x.IsConcreteTypeOf <IResourceRegistration>() && !x.IsOpenGeneric()) .Each(t => t.Create <IResourceRegistration>().Modify(connegGraph, graph)); }