Ejemplo n.º 1
0
 public void RecordEvents(ITracedModel model)
 {
     model.RecordEvents(e =>
     {
         _currentSource.AddEvent(e);
         _bySubject[model].Add(e);
     });
 }
Ejemplo n.º 2
0
 public void RecordEvents(BehaviorChain chain, ITracedModel model)
 {
     model.RecordEvents(e =>
     {
         e.Chain = chain;
         _currentSource.AddEvent(e);
     });
 }
Ejemplo n.º 3
0
        public void provenance_chain_from_a_fubu_registry_extension()
        {
            ITracedModel model = theGraph.BehaviorFor <RandomExtension>(x => x.SayHello()).As <ITracedModel>();
            var          chain = model.AllEvents().OfType <Created>().Single().Source.ProvenanceChain.Chain;

            chain.ElementAt(0).ShouldEqual(new FubuRegistryProvenance(theRegistry));
            chain.ElementAt(1).ShouldBeOfType <FubuRegistryExtensionProvenance>().Extension
            .ShouldBeOfType <RandomExtension>();
        }
Ejemplo n.º 4
0
        public void provenance_chain_from_a_bottle()
        {
            ITracedModel model = theGraph.BehaviorFor <AssemblyEndpoint>(x => x.get_hello()).As <ITracedModel>();
            var          chain = model.AllEvents().OfType <Created>().Single().Source.ProvenanceChain.Chain;

            chain.Each(x => Debug.WriteLine(x));

            var assemblyPackage = PackageRegistry.Packages.Single(x => x.Name == typeof(AssemblyEndpoint).Assembly.GetName().Name);

            assemblyPackage.ShouldNotBeNull();

            chain.ShouldContain(new BottleProvenance(assemblyPackage));
            chain.OfType <FubuRegistryProvenance>().Last().Registry.ShouldBeOfType <AssemblyPackageRegistry>();
        }
Ejemplo n.º 5
0
        public void SetUp()
        {
            source1 = new LambdaConfigurationAction(g => { });
            theLog = new ConfigLog();

            node = new TracedNode();
            node.Trace("something");
            node.Trace("else");

            node2 = new TracedNode();

            theConfigSource = theLog.StartSource(source1);
            theLog.RecordEvents(node);
            theLog.RecordEvents(node2);
        }
Ejemplo n.º 6
0
        public void SetUp()
        {
            source1  = new LambdaConfigurationAction(g => { });
            theLog   = new ConfigLog(null);
            theChain = new BehaviorChain();

            node = new TracedNode();
            node.Trace("something");
            node.Trace("else");

            node2 = new TracedNode();

            theConfigSource = theLog.StartSource(new FubuRegistry(), source1);
            theLog.RecordEvents(theChain, node);
            theLog.RecordEvents(theChain, node2);
        }
Ejemplo n.º 7
0
        public void SetUp()
        {
            source1 = new LambdaConfigurationAction(g => { });
            theLog = new ConfigLog(null);
            theChain = new BehaviorChain();

            node = new TracedNode();
            node.Trace("something");
            node.Trace("else");

            node2 = new TracedNode();

            theConfigSource = theLog.StartSource(new FubuRegistry(), source1);
            theLog.RecordEvents(theChain, node);
            theLog.RecordEvents(theChain, node2);
        }
 public void SetUp()
 {
     theNode       = new AuthorizationNode();
     theTracedNode = theNode.As <ITracedModel>();
 }
 public void SetUp()
 {
     theNode = new AuthorizationNode();
     theTracedNode = theNode.As<ITracedModel>();
 }
Ejemplo n.º 10
0
        public void SetUp()
        {
            theGraph = new ServiceGraph();

            theTracedNode = theGraph.As <ITracedModel>();
        }