Beispiel #1
0
        public void SetUp()
        {
            _systemContainer = Substitute.For <ISystemContainer>();

            _entityEngine = Substitute.For <IEntityEngine>();
            _systemContainer.EntityEngine.Returns(_entityEngine);
            _mutableEntities = new List <IEntity>();
            _entityEngine.MutableEntities.Returns(_mutableEntities);

            _mapSystem = Substitute.For <IMapSystem>();
            _systemContainer.MapSystem.Returns(_mapSystem);
            _mapCollection = new Atlas();
            _mapSystem.MapCollection.Returns(_mapCollection);

            _messageSystem = Substitute.For <IMessageSystem>();
            _systemContainer.MessageSystem.Returns(_messageSystem);
            _messages = new List <Message>();
            _messageSystem.AllMessages.Returns(_messages);

            _timeSystem = Substitute.For <ITimeSystem>();
            _systemContainer.TimeSystem.Returns(_timeSystem);
            _currentTime = 0;
            _timeSystem.CurrentTime.Returns(_currentTime);

            _worldGenerator = Substitute.For <IWorldGenerator>();

            _saveSystem = new SaveSystem(_systemContainer, _worldGenerator);
        }
 public CheckEnoughAuraToActivateSkillRule(ISystemContainer systemContainer)
 {
     entityEngine    = systemContainer.EntityEngine;
     skillSystem     = systemContainer.SkillSystem;
     prototypeSystem = systemContainer.PrototypeSystem;
     messageSystem   = systemContainer.MessageSystem;
 }
Beispiel #3
0
 public FighterSystem(IEntityEngine engine, IMessageSystem messageSystem, IEventSystem eventRuleSystem, ITimeSystem timeSystem, IStatSystem statSystem)
 {
     _engine          = engine;
     _messageSystem   = messageSystem;
     _eventRuleSystem = eventRuleSystem;
     _timeSystem      = timeSystem;
     _statSystem      = statSystem;
 }
Beispiel #4
0
 public ItemSystem(IEntityEngine entityEngine, IPrototypeSystem prototypeSystem, IScriptExecutor scriptExecutor, IMessageSystem messageSystem, IEventSystem eventSystem)
 {
     this.entityEngine    = entityEngine;
     this.prototypeSystem = prototypeSystem;
     this.scriptExecutor  = scriptExecutor;
     this.messageSystem   = messageSystem;
     this.eventSystem     = eventSystem;
 }
Beispiel #5
0
 public FollowPathBehaviour(ISystemContainer systemContainer)
 {
     _positionSystem  = systemContainer.PositionSystem;
     _eventRuleSystem = systemContainer.EventSystem;
     _playerSystem    = systemContainer.PlayerSystem;
     _mapSystem       = systemContainer.MapSystem;
     _entityEngine    = systemContainer.EntityEngine;
     _messageSystem   = systemContainer.MessageSystem;
     _timeSystem      = systemContainer.TimeSystem;
 }
Beispiel #6
0
 public CourseStudentRepository(ILogger logger
                                , IGenericsDbContextRepository <Models.CourseStudent> courseStudentDbContext
                                , IGenericsDbContextRepository <Models.Course> courseDbContext
                                , IMessageSystem messageSystem
                                , RabbitMQBus messagingServiceBus)
 {
     _logger = logger;
     _messagingServiceBus    = messagingServiceBus;
     _courseStudentDbContext = courseStudentDbContext;
     _courseDbContext        = courseDbContext;
     _messageSystem          = messageSystem;
 }
Beispiel #7
0
        // GET: Home
        public ActionResult Index()
        {
            IMessageSystem client   = MessageSystemFactory.Create("http://localhost:57878/");
            var            response = client.Log.PostByrequest(new LogModel()
            {
                ProjectName  = "HelloWeb",
                AppName      = "Client",
                LogLevelId   = 10,
                ShortMessage = "Hello world",
                FullMessage  = new Exception("Hello Exception", new Exception("Hello Inner")).ToString(),
                CreatedOnUtc = DateTime.UtcNow,
                Extended     = new Dictionary <string, string>
                {
                    { "CTime", string.Format("{0:yyyy-MM-dd HH:mm:ss.fff}", DateTime.Now) }
                }
            });

            return(Content(string.Format("{0:yyyy-MM-dd HH:mm:ss.fff}", DateTime.Now)));
        }
 public PlayerRestBehaviour(ISystemContainer systemContainer)
 {
     EventSystem   = systemContainer.EventSystem;
     MessageSystem = systemContainer.MessageSystem;
 }
 public PreventDamageIfGodModeRule(ISystemContainer systemContainer)
 {
     _messageSystem = systemContainer.MessageSystem;
 }