本文整理汇总了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));
}
示例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'." } });
}
示例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");
}
示例4: Run
public void Run(IAppBuilder builder)
{
builder.AddPlugin(new LeaderBoardPlugin(builder));
}
示例5: Run
public void Run(IAppBuilder builder)
{
builder.AddPlugin(new MatchmakingPlugin());
}
示例6: Run
public void Run(IAppBuilder builder)
{
builder.AddPlugin(new ESClientPlugin());
}
示例7: Run
public void Run(IAppBuilder builder)
{
builder.AddPlugin(new ManagementPlugin());
}