Beispiel #1
0
 public MainController(
     ConcurrentChain chain,
     RapidBaseConfiguration config)
 {
     Configuration = config;
     Chain         = chain;
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            var conf = RapidBaseConfiguration.FromConfiguration();

            conf.EnsureSetup();
            RapidBaseListener listener = new RapidBaseListener(conf);

            listener.Listen();
            listener.Wait();
        }
Beispiel #3
0
        public ServerTester(string ns)
        {
            CleanTable    = true;
            Address       = "http://localhost:" + (ushort)RandomUtils.GetUInt32() + "/";
            Configuration = RapidBaseConfiguration.FromConfiguration();
            Configuration.Indexer.StorageNamespace = ns;
            var server = WebApp.Start(Address, appBuilder =>
            {
                var config = new HttpConfiguration
                {
                    IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always
                };
                WebApiConfig.Register(config, Configuration);
                _resolver = (RapidBaseDependencyResolver)config.DependencyResolver;
                appBuilder.UseWebApi(config);
            });

            _disposables.Add(server);
            ChainBuilder = new ChainBuilder(this);
            _resolver.Get <ConcurrentChain>(); //So ConcurrentChain load
        }