public ContainerResourceManager(IUpdateHub updateHub, IExtensionResolver extensionResolver, IDefinitionManager definitionManager, ISettings settings) { UpdateHub = updateHub; this.extensionResolver = extensionResolver; this.definitionManager = definitionManager; this.settings = settings; }
static NotificationCommands() { updateHub = TypeContainer.Get <IUpdateHub>(); entityNotificationPool = TypeContainer.Get <IPool <EntityNotification> >(); blockChangedNotificationPool = TypeContainer.Get <IPool <BlockChangedNotification> >(); blocksChangedNotificationPool = TypeContainer.Get <IPool <BlocksChangedNotification> >(); }
public NetworkUpdateManager(Client client, IUpdateHub updateHub, IDefinitionManager manager) { this.client = client; this.updateHub = updateHub; hubSubscription = updateHub.Subscribe(this, DefaultChannels.Network); clientSubscription = client.Subscribe(this); definitionManager = manager; }
public ServerHandler(ISettings settings) { logger = LogManager.GetCurrentClassLogger(); var updateHub = new UpdateHub(); UpdateHub = updateHub; server = new Server(); SimulationManager = new SimulationManager(settings, updateHub); defaultManager = new DefaultCommandManager <ushort, CommandParameter, byte[]>(typeof(ServerHandler).Namespace + ".Commands"); }
public NetworkUpdateManager(Client client, IUpdateHub updateHub) { this.client = client; this.updateHub = updateHub; logger = (TypeContainer.GetOrNull <ILogger>() ?? NullLogger.Default).As(typeof(NetworkUpdateManager)); entityNotificationPool = TypeContainer.Get <IPool <EntityNotification> >(); blockChangedNotificationPool = TypeContainer.Get <IPool <BlockChangedNotification> >(); blocksChangedNotificationPool = TypeContainer.Get <IPool <BlocksChangedNotification> >(); packagePool = TypeContainer.Get <PackagePool>(); hubSubscription = updateHub.Subscribe(this, DefaultChannels.Network); clientSubscription = client.Subscribe(this); }
public ServerHandler() { logger = (TypeContainer.GetOrNull <ILogger>() ?? NullLogger.Default).As(typeof(ServerHandler)); TypeContainer.Register <UpdateHub>(InstanceBehaviour.Singleton); TypeContainer.Register <IUpdateHub, UpdateHub>(InstanceBehaviour.Singleton); TypeContainer.Register <Server>(InstanceBehaviour.Singleton); TypeContainer.Register <SimulationManager>(InstanceBehaviour.Singleton); SimulationManager = TypeContainer.Get <SimulationManager>(); UpdateHub = TypeContainer.Get <IUpdateHub>(); server = TypeContainer.Get <Server>(); defaultManager = new DefaultCommandManager <ushort, CommandParameter, byte[]>(typeof(ServerHandler).Namespace + ".Commands"); }
public ContainerResourceManager() { UpdateHub = new UpdateHub(); }
public void InsertUpdateHub(IUpdateHub updateHub) => throw new NotImplementedException();
public void InsertUpdateHub(IUpdateHub updateHub) => this.updateHub = updateHub;
public DiskPersistenceManager(IExtensionResolver extensionResolver, ISettings Settings, IUpdateHub updateHub) { this.extensionResolver = extensionResolver; settings = Settings; databaseProvider = new DatabaseProvider(GetRoot(), TypeContainer.Get <ILogger>()); awaiterPool = TypeContainer.Get <IPool <Awaiter> >(); blockChangedNotificationPool = TypeContainer.Get <IPool <BlockChangedNotification> >(); chunkSubscription = updateHub.Subscribe(this, DefaultChannels.Chunk); }
static NotificationCommands() { updateHub = Program.ServerHandler.UpdateHub; }
static PlayerCommands() { updateHub = Program.ServerHandler.UpdateHub; }