public CommandContextBuilder( IOpenModStringLocalizer stringLocalizer, ILifetimeScope lifetimeScope) { m_StringLocalizer = stringLocalizer; m_LifetimeScope = lifetimeScope; }
public CommandEventListener( ICommandCooldownStore commandCooldownStore, IOpenModStringLocalizer stringLocalizer) { m_CommandCooldownStore = commandCooldownStore; m_StringLocalizer = stringLocalizer; }
public CommandOpenModUpdate( IConfiguration configuration, IOpenModStringLocalizer stringLocalizer, IServiceProvider serviceProvider, NuGetPluginAssembliesSource nuGetPlugins) : base(serviceProvider) { m_Configuration = configuration; m_StringLocalizer = stringLocalizer; m_NuGetPlugins = nuGetPlugins; }
public RocketModCommandEventListener( IOpenModUnturnedConfiguration configuration, ICommandCooldownStore commandCooldownStore, IOpenModStringLocalizer stringLocalizer) { m_Configuration = configuration; m_CommandCooldownStore = commandCooldownStore; m_StringLocalizer = stringLocalizer; }
public CommandHelp( IPermissionChecker permissionChecker, ICommandStore commandStore, IServiceProvider serviceProvider, ICommandPermissionBuilder commandPermissionBuilder, ICommandContextBuilder commandContextBuilder, IOpenModStringLocalizer stringLocalizer) : base(serviceProvider) { m_PermissionChecker = permissionChecker; m_CommandStore = commandStore; m_CommandPermissionBuilder = commandPermissionBuilder; m_CommandContextBuilder = commandContextBuilder; m_StringLocalizer = stringLocalizer; }
public CommandHelp( IRuntime runtime, ICommandStore commandStore, IServiceProvider serviceProvider, IPermissionRegistry permissionRegistry, ICommandPermissionBuilder commandPermissionBuilder, ICommandContextBuilder commandContextBuilder, IOpenModStringLocalizer stringLocalizer) : base(serviceProvider) { // get global permission checker instead of scoped m_PermissionChecker = runtime.Host !.Services.GetRequiredService <IPermissionChecker>(); m_CommandStore = commandStore; m_PermissionRegistry = permissionRegistry; m_CommandPermissionBuilder = commandPermissionBuilder; m_CommandContextBuilder = commandContextBuilder; m_StringLocalizer = stringLocalizer; }
public UnturnedUserProvider( IEventBus eventBus, IOpenModStringLocalizer stringLocalizer, IUserDataSeeder dataSeeder, IUserDataStore userDataStore, IRuntime runtime) { m_EventBus = eventBus; m_DataSeeder = dataSeeder; m_StringLocalizer = stringLocalizer; m_UserDataStore = userDataStore; m_Runtime = runtime; m_Users = new HashSet <UnturnedUser>(); m_PendingUsers = new HashSet <UnturnedPendingUser>(); // sync users in case of openmod reloads if (Provider.clients != null) { foreach (var client in Provider.clients) { m_Users.Add(new UnturnedUser(this, userDataStore, client.player)); } } if (Provider.pending != null) { foreach (var pending in Provider.pending) { m_PendingUsers.Add(new UnturnedPendingUser(this, userDataStore, pending)); } } Provider.onCheckValidWithExplanation += OnPendingPlayerConnecting; Provider.onServerConnected += OnPlayerConnected; Provider.onServerDisconnected += OnPlayerDisconnected; Provider.onRejectingPlayer += OnRejectingPlayer; }
public OfflineUserProvider(IOpenModStringLocalizer stringLocalizer, IUserDataStore userDataStore) { m_StringLocalizer = stringLocalizer; m_UserDataStore = userDataStore; }
public CommandParameters(CommandContext commandContext, ICollection <string> args) { m_OpenModStringLocalizer = commandContext.ServiceProvider.GetRequiredService <IOpenModStringLocalizer>(); m_ServiceProvider = commandContext.ServiceProvider; RawParameters = args; }
public TypeDescriptorCommandParameterResolveProvider(IServiceProvider serviceProvider, IOpenModStringLocalizer openModStringLocalizer) { m_ServiceProvider = serviceProvider; m_OpenModStringLocalizer = openModStringLocalizer; }
public NotEnoughPermissionException(IOpenModStringLocalizer stringLocalizer, string permission) : base(stringLocalizer["commands:errors:not_enough_permission", new { Permission = permission }]) { }
public CommandWrongUsageException(ICommandContext context, IOpenModStringLocalizer localizer) : base(localizer["commands:errors:wrong_usage", new { Command = context.CommandPrefix + context.CommandAlias, Args = string.Join(" ", context.Parameters), context.CommandRegistration !.Syntax }])