public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _graph.ReadSettings(_services);
     OpenChannels();
     _graph.StartReceiving(_pipeline, _logger);
     ExecuteActivators();
 }
Example #2
0
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _graph.ReadSettings(_services);
     OpenChannels();
     _graph.StartReceiving(_pipeline, _logger);
     ExecuteActivators();
 }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     if (!_strategies.Any())
     {
         log.MarkFailure("There are no IAuthenticationStrategy services registered.  Either register an IAuthenticationStrategy or remove FubuMVC.Authentication from your application");
     }
 }
 public Task<BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
 {
     return Task.Factory.StartNew(() =>
     {
         return timer.Record("Building System Level Handler Chains", () => buildChains(graph).ToArray());
     });
 }
Example #5
0
 public Task <BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
 {
     return(Task.Factory.StartNew(() =>
     {
         return timer.Record("Building System Level Handler Chains", () => buildChains(graph).ToArray());
     }));
 }
Example #6
0
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     if (!_strategies.Any())
     {
         log.MarkFailure("There are no IAuthenticationStrategy services registered.  Either register an IAuthenticationStrategy or remove FubuMVC.Authentication from your application");
     }
 }
        public void Activate(IActivationLog log, IPerfTimer timer)
        {
            if (!_graph.HasChannels) return;

            log.Trace("Determining subscriptions for node " + _cache.NodeName);

            // assuming that there are no automaticly persistent tasks
            // upon startup
            _repository.Persist(new TransportNode(_graph));

            var requirements = determineStaticRequirements(log);

            if (requirements.Any())
            {
                log.Trace("Found static subscription requirements:");
                requirements.Each(x => log.Trace(x.ToString()));
            }
            else
            {
                log.Trace("No static subscriptions found from registry");
            }

            _repository.PersistSubscriptions(requirements);

            var subscriptions = _repository.LoadSubscriptions(SubscriptionRole.Publishes);
            _cache.LoadSubscriptions(subscriptions);

            sendSubscriptions();
        }
Example #8
0
        public void Activate(IActivationLog log, IPerfTimer timer)
        {
            if (!_graph.HasChannels)
            {
                return;
            }

            log.Trace("Determining subscriptions for node " + _cache.NodeName);

            // assuming that there are no automaticly persistent tasks
            // upon startup
            _repository.Persist(new TransportNode(_graph));

            var requirements = determineStaticRequirements(log);


            if (requirements.Any())
            {
                log.Trace("Found static subscription requirements:");
                requirements.Each(x => log.Trace(x.ToString()));
            }
            else
            {
                log.Trace("No static subscriptions found from registry");
            }

            _repository.PersistSubscriptions(requirements);

            var subscriptions = _repository.LoadSubscriptions(SubscriptionRole.Publishes);

            _cache.LoadSubscriptions(subscriptions);

            sendSubscriptions();
        }
Example #9
0
        public static BehaviorGraph BuildFrom(Action<FubuRegistry> configure, IPerfTimer timer = null)
        {
            var registry = new FubuRegistry();
            configure(registry);

            return BehaviorGraphBuilder.Build(registry, timer ?? new PerfTimer(), new Assembly[0], new ActivationDiagnostics(), FubuApplicationFiles.ForDefault());
        }
Example #10
0
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     // Find the input models that have remote rules
     // "Bake" them into the remote graph
     _behaviorGraph
     .Actions()
     .Each(FillRules);
 }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     // Find the input models that have remote rules
     // "Bake" them into the remote graph
     _behaviorGraph
         .Actions()
         .Each(FillRules);
 }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _registries.Each(r =>
     {
         log.Trace("Adding " + r);
         r.Configure(_stringifier);
     });
 }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _registries.Each(r =>
     {
         log.Trace("Adding " + r);
         r.Configure(_stringifier);
     });
 }
Example #14
0
        public static BehaviorGraph Build(FubuRegistry registry, IPerfTimer perfTimer,
                                          IEnumerable <Assembly> packageAssemblies, IActivationDiagnostics diagnostics, IFubuApplicationFiles files)
        {
            var featureLoader = new FeatureLoader();

            featureLoader.LookForFeatures();

            if (registry.Mode.InDevelopment())
            {
                registry.AlterSettings <DiagnosticsSettings>(_ => _.TraceLevel = TraceLevel.Verbose);
                registry.AlterSettings <AssetSettings>(_ => _.SetupForDevelopment());
            }



            var graph = new BehaviorGraph
            {
                ApplicationAssembly = registry.ApplicationAssembly,
                PackageAssemblies   = packageAssemblies
            };

            var accessorRules         = AccessorRulesCompiler.Compile(graph, perfTimer);
            var validationCompilation = ValidationCompiler.Compile(graph, perfTimer, registry);



            var config = registry.Config;

            perfTimer.Record("Applying Settings", () => applySettings(config, graph, diagnostics, files));

            perfTimer.Record("Enable built in polling jobs", () => enableBuiltInJobs(graph));
            perfTimer.Record("Applying Feature Settings", () => featureLoader.ApplyAll(graph.Settings, registry).Wait(30.Seconds()).AssertFinished());


            config.Add(new ActionlessViewChainSource());
            perfTimer.Record("Local Application BehaviorGraph", () => config.BuildLocal(graph, perfTimer));

            perfTimer.Record("Explicit Configuration", () => config.Global.Explicits.RunActions(graph));
            perfTimer.Record("Global Policies", () => config.Global.Policies.RunActions(graph));

            perfTimer.Record("Inserting Conneg and Authorization Nodes",
                             () => insertConnegAndAuthorizationNodes(graph));

            perfTimer.Record("Applying Global Reorderings", () => config.ApplyGlobalReorderings(graph));


            if (registry.Mode.InDevelopment() || graph.Settings.Get <DiagnosticsSettings>().TraceLevel != TraceLevel.None)
            {
                perfTimer.Record("Applying Tracing", () => ApplyTracing.Configure(graph));
            }


            Task.WaitAll(new Task[] { accessorRules, validationCompilation }, 30.Seconds()).AssertFinished();

            new AutoImportModelNamespacesConvention().Configure(graph);

            return(graph);
        }
Example #15
0
        public Task <BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            var types = TypeRepository.FindTypes(graph.AllAssemblies(), TypeClassification.Concretes,
                                                 type => type.CanBeCastTo <Topic>());

            return
                (types.ContinueWith(
                     t => { return t.Result.Select(x => new SseTopicChain(x).As <BehaviorChain>()).ToArray(); }));
        }
Example #16
0
        public LoggingSession(IPerfTimer timer)
        {
            _timer = timer;

            _logs = new Cache <object, ActivationLog>(o => new ActivationLog(_timer)
            {
                Description = o.ToString()
            });
        }
        public Task <BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            var settings = graph.Settings.Get <DiagnosticsSettings>();

            return(findActions(graph).ContinueWith(t =>
            {
                return fromActions(settings, t.Result).ToArray();
            }));
        }
Example #18
0
        public Task<BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            var types = TypeRepository.FindTypes(graph.AllAssemblies(), TypeClassification.Concretes,
                type => type.CanBeCastTo<Topic>());

            return
                types.ContinueWith(
                    t => { return t.Result.Select(x => new SseTopicChain(x).As<BehaviorChain>()).ToArray(); });
        }
        public Task<BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            var settings = graph.Settings.Get<DiagnosticsSettings>();

            return findActions(graph).ContinueWith(t =>
            {
                return fromActions(settings, t.Result).ToArray();
            });
        }
Example #20
0
 public static Task Compile(BehaviorGraph graph, IPerfTimer timer, FubuRegistry registry)
 {
     return TypeRepository.FindTypes(graph.AllAssemblies(),
         TypeClassification.Concretes | TypeClassification.Closed, IsValidationRegistration)
         .ContinueWith(t =>
         {
                 t.Result.Distinct()
                 .Each(type => registry.Services.For(typeof(IValidationRegistration)).Add(type));
         });
 }
Example #21
0
 public static Task Compile(BehaviorGraph graph, IPerfTimer timer, FubuRegistry registry)
 {
     return(TypeRepository.FindTypes(graph.AllAssemblies(),
                                     TypeClassification.Concretes | TypeClassification.Closed, IsValidationRegistration)
            .ContinueWith(t =>
     {
         t.Result.Distinct()
         .Each(type => registry.Services.For(typeof(IValidationRegistration)).Add(type));
     }));
 }
        public void Activate(IActivationLog log, IPerfTimer timer)
        {
            var repository = _services.VerifyRegistration<ISamlCertificateRepository>(log);
            _services.VerifyRegistration<IPrincipalBuilder>(log);
            _services.VerifyAnyRegistrations<ISamlResponseHandler>(log);

            if (repository != null)
            {
                checkCertificates(repository, log);
            }
        }
        public static BehaviorGraph Build(FubuRegistry registry, IPerfTimer perfTimer,
            IEnumerable<Assembly> packageAssemblies, IActivationDiagnostics diagnostics, IFubuApplicationFiles files)
        {
            var featureLoader = new FeatureLoader();
            featureLoader.LookForFeatures();

            if (registry.Mode.InDevelopment())
            {
                registry.AlterSettings<DiagnosticsSettings>(_ => _.TraceLevel = TraceLevel.Verbose);
                registry.AlterSettings<AssetSettings>(_ => _.SetupForDevelopment());
            }

            
            

            var graph = new BehaviorGraph
            {
                ApplicationAssembly = registry.ApplicationAssembly,
                PackageAssemblies = packageAssemblies
            };

            var accessorRules = AccessorRulesCompiler.Compile(graph, perfTimer);



            var config = registry.Config;

            perfTimer.Record("Applying Settings", () => applySettings(config, graph, diagnostics, files));

            perfTimer.Record("Enable built in polling jobs", () => enableBuiltInJobs(graph));
            perfTimer.Record("Applying Feature Settings", () => featureLoader.ApplyAll(graph.Settings, registry).Wait());

            perfTimer.Record("Local Application BehaviorGraph", () => config.BuildLocal(graph, perfTimer));

            perfTimer.Record("Explicit Configuration", () => config.Global.Explicits.RunActions(graph));
            perfTimer.Record("Global Policies", () => config.Global.Policies.RunActions(graph));

            perfTimer.Record("Inserting Conneg and Authorization Nodes",
                () => insertConnegAndAuthorizationNodes(graph));

            perfTimer.Record("Applying Global Reorderings", () => config.ApplyGlobalReorderings(graph));


            if (registry.Mode.InDevelopment() || graph.Settings.Get<DiagnosticsSettings>().TraceLevel != TraceLevel.None)
            {
                perfTimer.Record("Applying Tracing", () => ApplyTracing.Configure(graph));
            }

            accessorRules.Wait();

            new AutoImportModelNamespacesConvention().Configure(graph);

            return graph;
        }
Example #24
0
        public virtual void Fill(ViewEngineSettings settings, BehaviorGraph graph, IPerfTimer timer, IFubuApplicationFiles files)
        {
            var builder = CreateBuilder(graph.Settings, files);
            var match   = FindMatching(graph.Settings);

            // HAS TO BE SHALLOW
            match.DeepSearch = false;

            _bottle = new ViewCollection <T>(this, files, builder, settings, match);

            _views = _bottle.AllViews().ToList();
        }
        public void Activate(IActivationLog log, IPerfTimer timer)
        {
            if (!_settings.Enabled)
            {
                log.Trace("Skipping activation because FubuTranportation is disabled.");
                return;
            }

            timer.Record("Activating Transports and Starting Listening", () => _transports.Activate(log, timer));
            timer.Record("Activating Subscriptions", () => _subscriptions.Activate(log, timer));
            timer.Record("Activating Polling Jobs", () => _pollingJobs.Activate(log, timer));
        }
        public Task<BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            var urlPolicies = graph.Settings.Get<UrlPolicies>();

            var actions = Sources.Select(x => x.FindActions(graph.ApplicationAssembly));

            return Task.WhenAll(actions).ContinueWith(t =>
            {
                return t.Result.SelectMany(x => x).Distinct()
                    .Select(call => call.BuildChain(urlPolicies)).ToArray();
            });
        }
Example #27
0
        public Task <BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            var urlPolicies = graph.Settings.Get <UrlPolicies>();

            var actions = Sources.Select(x => x.FindActions(graph.ApplicationAssembly));

            return(Task.WhenAll(actions).ContinueWith(t =>
            {
                return t.Result.SelectMany(x => x).Distinct()
                .Select(call => call.BuildChain(urlPolicies)).ToArray();
            }));
        }
Example #28
0
        public void Activate(IActivationLog log, IPerfTimer timer)
        {
            if (!_settings.Enabled)
            {
                log.Trace("Skipping activation because FubuTranportation is disabled.");
                return;
            }

            timer.Record("Activating Transports and Starting Listening", () => _transports.Activate(log, timer));
            timer.Record("Activating Subscriptions", () => _subscriptions.Activate(log, timer));
            timer.Record("Activating Polling Jobs", () => _pollingJobs.Activate(log, timer));
        }
        public void Activate(IActivationLog log, IPerfTimer timer)
        {
            var repository = _services.VerifyRegistration <ISamlCertificateRepository>(log);

            _services.VerifyRegistration <IPrincipalBuilder>(log);
            _services.VerifyAnyRegistrations <ISamlResponseHandler>(log);

            if (repository != null)
            {
                checkCertificates(repository, log);
            }
        }
Example #30
0
        public TallyKeepingStream(Stream innerStream, bool ownStream)
        {
            if (innerStream == null)
            {
                throw new ArgumentNullException("innerStream");
            }
            this.innerStream = innerStream;
            this.ownStream   = ownStream;
            bool flag = false;

            this.readTimer  = PerfTimerFactory.CreateTimer(flag, new TimeSpan((long)0));
            this.writeTimer = PerfTimerFactory.CreateTimer(flag, new TimeSpan((long)0));
        }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _jobs.Where(x => x.ScheduledExecution != ScheduledExecution.Disabled).Each(x => {
         try
         {
             log.Trace("Starting " + x.JobType.GetFullName());
             x.Start();
         }
         catch (Exception ex)
         {
             log.MarkFailure(ex);
         }
     });
 }
        public static Task Compile(BehaviorGraph graph, IPerfTimer timer)
        {
            return(TypeRepository.FindTypes(graph.AllAssemblies(),
                                            TypeClassification.Concretes | TypeClassification.Closed, IsAccessorRule)
                   .ContinueWith(t =>
            {
                var rules = new AccessorRules();
                t.Result.Distinct()
                .Select(x => Activator.CreateInstance(x).As <IAccessorRulesRegistration>())
                .Each(x => x.AddRules(rules));

                graph.Settings.Replace(rules);
            }));
        }
Example #33
0
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _jobs.Where(x => x.ScheduledExecution != ScheduledExecution.Disabled).Each(x => {
         try
         {
             log.Trace("Starting " + x.JobType.GetFullName());
             x.Start();
         }
         catch (Exception ex)
         {
             log.MarkFailure(ex);
         }
     });
 }
Example #34
0
        public override void Fill(ViewEngineSettings settings, BehaviorGraph graph, IPerfTimer timer, IFubuApplicationFiles files)
        {
            configureNamespaces(graph);

            base.Fill(settings, graph, timer, files);

            var bindingTemplates = files
                                   .FindFiles(FileSet.Shallow("Shared/bindings.xml"))
                                   .Select(x => new SparkTemplate(files, x, _engine, graph.Settings.Get <SparkEngineSettings>())).ToArray();

            _engine.ViewFolder          = new TemplateViewFolder(AllTemplates());
            _engine.DefaultPageBaseType = typeof(FubuSparkView).FullName;
            _engine.BindingProvider     = new FubuBindingProvider(bindingTemplates);
            _engine.PartialProvider     = new FubuPartialProvider(this);
        }
Example #35
0
        public MD5ReaderStream(Stream innerStream, long streamLength, bool ownStream, RequestContext requestContext)
        {
            if (innerStream == null)
            {
                throw new ArgumentNullException("innerStream");
            }
            this.md5          = MD5.Create();
            this.innerStream  = innerStream;
            this.ownStream    = ownStream;
            this.streamLength = streamLength;
            bool flag = false;

            this.readTimer      = PerfTimerFactory.CreateTimer(flag, new TimeSpan((long)0));
            this.requestContext = requestContext;
        }
        public Task<BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            var finders = HandlerSources.Select(x => x.FindCalls(graph.ApplicationAssembly)).ToArray();
            return Task.WhenAll(finders).ContinueWith(all =>
            {
                var handlers = new HandlerGraph();

                var allCalls = all.Result.SelectMany(x => x).Distinct();

                handlers.Add(allCalls);

                handlers.Compile();

                return handlers.OfType<BehaviorChain>().ToArray();
            });
        }
Example #37
0
        public void Activate(IActivationLog log, IPerfTimer timer)
        {
            _jobs.Where(x => x.ScheduledExecution != ScheduledExecution.Disabled).Each(x => {
                try
                {
                    log.Trace($"Starting {x.JobType.GetFullName()} on node {_channels.NodeId}");
                    Debug.WriteLine($"Starting {x.JobType.GetFullName()} on node {_channels.NodeId}");

                    x.Start();
                }
                catch (Exception ex)
                {
                    log.MarkFailure(ex);
                }
            });
        }
Example #38
0
        public CrcReaderStream(Stream innerStream, bool ownStream, int maxCrcRangeSize, long destinationOffset, long streamLength, RequestContext requestContext)
        {
            if (innerStream == null)
            {
                throw new ArgumentNullException("innerStream");
            }
            this.maxCrcRangeSize = maxCrcRangeSize;
            this.innerStream     = innerStream;
            this.ownStream       = ownStream;
            this.pageOffset      = (int)(destinationOffset % (long)512);
            bool flag = false;

            this.crcCalcuationTimer = PerfTimerFactory.CreateTimer(flag, new TimeSpan((long)0));
            this.streamLength       = streamLength;
            this.requestContext     = requestContext;
        }
Example #39
0
        public void Activate(IActivationLog log, IPerfTimer timer)
        {
            _jobs.Where(x => x.ScheduledExecution != ScheduledExecution.Disabled).Each(x => {
                try
                {
                    log.Trace($"Starting {x.JobType.GetFullName()} on node {_channels.NodeId}");
                    Debug.WriteLine($"Starting {x.JobType.GetFullName()} on node {_channels.NodeId}");

                    x.Start();
                }
                catch (Exception ex)
                {
                    log.MarkFailure(ex);
                }
            });
        }
Example #40
0
        public Task<BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            return Task.Factory.StartNew(() =>
            {
                return timer.Record("Building Imported Chains for " + Registry, () =>
                {
                    Registry.Config.BuildLocal(_behaviorGraph, timer);
                    if (Prefix.IsNotEmpty())
                    {
                        _behaviorGraph.Chains.OfType<RoutedChain>().Each(x => x.Route.Prepend(Prefix));
                    }

                    return _behaviorGraph.Chains.ToArray();
                });
            });
        }
        public static Task Compile(BehaviorGraph graph, IPerfTimer timer)
        {
            return TypeRepository.FindTypes(graph.AllAssemblies(),
                TypeClassification.Concretes | TypeClassification.Closed, IsAccessorRule)
                .ContinueWith(t =>
                {
                    var rules = new AccessorRules();
                    t.Result.Distinct()                        
                        .Select(x => Activator.CreateInstance(x).As<IAccessorRulesRegistration>())
                        .Each(x => x.AddRules(rules));

                    graph.Settings.Replace(rules);
                });


        }
Example #42
0
        public Task <BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            return(Task.Factory.StartNew(() =>
            {
                return timer.Record("Building Imported Chains for " + Registry, () =>
                {
                    Registry.Config.BuildLocal(_behaviorGraph, timer);
                    if (Prefix.IsNotEmpty())
                    {
                        _behaviorGraph.Chains.OfType <RoutedChain>().Each(x => x.Route.Prepend(Prefix));
                    }

                    return _behaviorGraph.Chains.ToArray();
                });
            }));
        }
        public Task<BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            var types = TypeRepository.FindTypes(graph.ApplicationAssembly,
                TypeClassification.Closed | TypeClassification.Concretes, t => t.HasAttribute<ViewSubjectAttribute>());

            return types.ContinueWith(t =>
            {
                return t.Result.Select(type =>
                {
                    var chain = ChainForType(type);
                    chain.Tags.Add("ActionlessView");
                    chain.UrlCategory.Category = Categories.VIEW;

                    return chain;
                }).ToArray();
            });
        }
Example #44
0
        public Task <BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            var finders = HandlerSources.Select(x => x.FindCalls(graph.ApplicationAssembly)).ToArray();

            return(Task.WhenAll(finders).ContinueWith(all =>
            {
                var handlers = new HandlerGraph();

                var allCalls = all.Result.SelectMany(x => x).Distinct();

                handlers.Add(allCalls);

                handlers.Compile();

                return handlers.OfType <BehaviorChain>().ToArray();
            }));
        }
        public Task <BehaviorChain[]> BuildChains(BehaviorGraph graph, IPerfTimer timer)
        {
            var types = TypeRepository.FindTypes(graph.ApplicationAssembly,
                                                 TypeClassification.Closed | TypeClassification.Concretes, t => t.HasAttribute <ViewSubjectAttribute>());

            return(types.ContinueWith(t =>
            {
                return t.Result.Select(type =>
                {
                    var chain = ChainForType(type);
                    chain.Tags.Add("ActionlessView");
                    chain.UrlCategory.Category = Categories.VIEW;

                    return chain;
                }).ToArray();
            }));
        }
Example #46
0
        public void BuildLocal(BehaviorGraph graph, IPerfTimer timer)
        {
            // Local policies will ONLY apply to chains built by this ConfigGraph,
            // and not to chains that are built by imports

            var imports = UniqueImports().Select(x => x.BuildChains(graph, timer)).ToArray();

            var chainSources =
                Sources.Select(
                    source => source.BuildChains(graph, timer)).ToArray();


            Task.WaitAll(chainSources, 30.Seconds()).AssertFinished();

            chainSources.Each(x => graph.AddChains(x.Result));

            Local.Explicits.RunActions(graph);
            Local.Policies.RunActions(graph);
            Local.Reordering.RunActions(graph);

            Task.WaitAll(imports, 30.Seconds()).AssertFinished();

            imports.Each(x => graph.AddChains(x.Result));
        }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     log.Trace("Starting the in memory performance history tracking");
     _queue.Start();
 }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _factory.LoadAll(text => log.Trace(text));
     _factory.ApplyToLocalizationManager();
 }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     Thread.Sleep(_time);
 }
Example #50
0
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _action();
 }
 void IActivator.Activate(IActivationLog log, IPerfTimer timer)
 {
 }
Example #52
0
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     throw new System.NotImplementedException();
 }
Example #53
0
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     throw new System.NotImplementedException();
 }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _controller.StartWatching(_context.SpecPath);
     _context.AddRemoteListener(_controller);
 }
Example #55
0
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     Thread.Sleep(_time);
 }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     log.Trace("Adding TransportCleanup to the remote EventAggregator");
     Services.Messaging.EventAggregator.Messaging.AddListener(_cleanup);
 }
Example #57
0
        public void BuildLocal(BehaviorGraph graph, IPerfTimer timer)
        {
            // Local policies will ONLY apply to chains built by this ConfigGraph,
            // and not to chains that are built by imports

            var imports = UniqueImports().Select(x => x.BuildChains(graph, timer)).ToArray();

            var chainSources =
                Sources.Select(
                    source => source.BuildChains(graph, timer)).ToArray();

            Task.WaitAll(chainSources, 30.Seconds()).AssertFinished();

            chainSources.Each(x => graph.AddChains(x.Result));

            Local.Explicits.RunActions(graph);
            Local.Policies.RunActions(graph);
            Local.Reordering.RunActions(graph);

            Task.WaitAll(imports, 30.Seconds()).AssertFinished();

            imports.Each(x => graph.AddChains(x.Result));
        }
 public void Fill(ViewEngineSettings settings, BehaviorGraph graph, IPerfTimer timer, IFubuApplicationFiles files)
 {
     _views = tokens().Where(x => !graph.Settings.Get<ViewEngineSettings>().IsExcluded(x)).ToList();
 }
 public void Fill(ViewEngineSettings settings, BehaviorGraph graph, IPerfTimer timer, IFubuApplicationFiles files)
 {
     throw new NotImplementedException();
 }
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _watcher.Start();
 }