コード例 #1
0
        public void TestSetup()
        {
            JsonConverters = GraphClient.DefaultJsonConverters.ToList();
            JsonConverters.Add(new AreaJsonConverter());

            NeoConfig.ConfigureModel();
        }
コード例 #2
0
        static IntegrationTest()
        {
            var connectionString = ConfigurationManager.AppSettings["Neo4jConnectionString"];

            GraphClient = new GraphClient(new Uri(connectionString));

            GraphClient.JsonConverters.Add(new AreaJsonConverter());

            GraphClient.Connect();

            NeoConfig.ConfigureModel();
        }
コード例 #3
0
ファイル: Startup.cs プロジェクト: hiksa/BullsAndCowsNeo
        public void Configure(
            IApplicationBuilder app,
            IHostingEnvironment env,
            NotificationsHandler notifications,
            NeoConfig neoConfig)
        {
            neoConfig.Init();
            notifications.Init();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseDatabaseErrorPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
                app.UseHsts();
            }

            app.UseCors(builder =>
                        builder
                        .WithOrigins("http://localhost:8111", "http://localhost:4200")
                        .AllowAnyMethod()
                        .AllowAnyHeader()
                        .AllowCredentials());

            app.UseStaticFiles();
            app.UseCookiePolicy();

            app.UseSignalR(routes =>
            {
                routes.MapHub <ValuesHub>("/hubs/values");
                routes.MapHub <GameHub>("/hubs/game");
            });


            app.UseAuthentication();

            app.UseMvc();
        }
コード例 #4
0
 public Service(StatelessServiceContext context)
     : base(context)
 {
     NeoConfig.ConfigureModel();
 }