当前位置: 首页>>代码示例>>C#>>正文


C# IAppBuilder.AddPlugin方法代码示例

本文整理汇总了C#中IAppBuilder.AddPlugin方法的典型用法代码示例。如果您正苦于以下问题:C# IAppBuilder.AddPlugin方法的具体用法?C# IAppBuilder.AddPlugin怎么用?C# IAppBuilder.AddPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IAppBuilder的用法示例。


在下文中一共展示了IAppBuilder.AddPlugin方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Run

        public void Run(IAppBuilder builder)
        {
            builder.SceneTemplate("empty", scene => { });

            var userConfig = new Users.UserManagementConfig() { SceneIdRedirect = "main" /*Constants.MATCHMAKER_NAME*/ };
            userConfig.AuthenticationProviders.Add(new LoginPasswordAuthenticationProvider());
            userConfig.AuthenticationProviders.Add(new SteamAuthenticationProvider());

            builder.AddPlugin(new UsersManagementPlugin(userConfig));
        }
开发者ID:Falanwe,项目名称:Stormancer-AuthenticationPlugin,代码行数:10,代码来源:App.cs

示例2: Run

        public void Run(IAppBuilder builder)
        {
            builder.AddPlugin(new MatchmakingPlugin(MatchmakingFactory.Create(
                new DefaultMatchmakingDataExtractor(),
                new DefaultMatchmaker(),
                new DefaultMatchmakingResolver()
                )));

            builder.SceneTemplate("test-template", scene =>
            {
                scene.AddRoute("echo.in", p =>
                {
                    scene.Broadcast("echo.out", s => p.Stream.CopyTo(s, (int)p.Stream.Length), PacketPriority.MEDIUM_PRIORITY, PacketReliability.RELIABLE);
                });
            },
            new Dictionary<string, string> { { "description", "Broadcasts data sent to the route 'echo.in' to all connected users on the route 'echo.out'." } });
        }
开发者ID:Falanwe,项目名称:stormancer-matchmaking,代码行数:17,代码来源:App.cs

示例3: Run

        public void Run(IAppBuilder builder)
        {
            builder.AddGameScene();

            var userConfig = new Users.UserManagementConfig()
            {
                SceneIdRedirect = Constants.MATCHMAKER_NAME,
                UserDataSelector = r => new PlayerInfos
                {
                    isObserver = r.Provider == ViewerAuthenticationProvider.PROVIDER_NAME,
                    userId = r.AuthenticatedUser.Id
                }
            };

            userConfig.AuthenticationProviders.Add(new LoginPasswordAuthenticationProvider());
            userConfig.AuthenticationProviders.Add(new ViewerAuthenticationProvider());
            builder.AddPlugin(new UsersManagementPlugin(userConfig));

            var admintest = builder.AdminPlugin("admintest", Stormancer.Server.Admin.AdminPluginHostVersion.V0_1).Name("admintest");
            //admintest.Get["/"] = ctx => "helloworld";

            var viewer = builder.AdminPlugin("viewer", Stormancer.Server.Admin.AdminPluginHostVersion.V0_1).Name("Viewer");
        }
开发者ID:LaurentQUERSIN,项目名称:boids-demo,代码行数:23,代码来源:App.cs

示例4: Run

        public void Run(IAppBuilder builder)
        {
            builder.AddPlugin(new LeaderBoardPlugin(builder));

        }
开发者ID:LaurentQUERSIN,项目名称:boids-demo,代码行数:5,代码来源:LeaderBoardPlugin.cs

示例5: Run

        public void Run(IAppBuilder builder)
        {
            builder.AddPlugin(new MatchmakingPlugin());

        }
开发者ID:LaurentQUERSIN,项目名称:boids-demo,代码行数:5,代码来源:MatchmakingPlugin.cs

示例6: Run

        public void Run(IAppBuilder builder)
        {
            builder.AddPlugin(new ESClientPlugin());

        }
开发者ID:LaurentQUERSIN,项目名称:boids-demo,代码行数:5,代码来源:ESClientFactory.cs

示例7: Run

 public void Run(IAppBuilder builder)
 {
     builder.AddPlugin(new ManagementPlugin());
 }
开发者ID:LaurentQUERSIN,项目名称:boids-demo,代码行数:4,代码来源:ManagementPlugin.cs


注:本文中的IAppBuilder.AddPlugin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。