public HostSupportComponent(IEntityLogger logger, IPlatformSupport platformSupport, HumanoidNPCGameComponentContext internalContext, IWorldCoreGameComponentContext worldContext)
     : base(logger)
 {
     _internalContext     = internalContext;
     _worldContext        = worldContext;
     _invokerInMainThread = worldContext.InvokerInMainThread;
     _platformSupport     = platformSupport;
 }
Exemplo n.º 2
0
 protected BaseGameComponent(BaseGameComponentSettings settings, IWorldCoreGameComponentContext worldContext)
 {
     _instanceId = settings.InstanceId;
     worldContext.AddGameComponent(this);
     _worldContext        = worldContext;
     _invokerInMainThread = worldContext.InvokerInMainThread;
     _logger = _worldContext.CreateLogger(settings.Id);
 }
 public CommonPersistIndexedLogicalData(IEntityLogger logger)
     : base(logger)
 {
     IndexedRuleInstancesDict    = new Dictionary <StrongIdentifierValue, RuleInstance>();
     AdditionalRuleInstancesDict = new Dictionary <StrongIdentifierValue, RuleInstance>();
     IndexedRulePartsOfFactsDict = new Dictionary <StrongIdentifierValue, IList <BaseRulePart> >();
     IndexedRulePartsWithOneRelationWithVarsDict = new Dictionary <StrongIdentifierValue, IList <BaseRulePart> >();
     RelationsList = new List <LogicalQueryNode>();
 }
Exemplo n.º 4
0
        public DateTimeProvider(IEntityLogger logger, IActivePeriodicObjectCommonContext syncContext)
            : base(logger)
        {
            var activeContext = new ActivePeriodicObjectContext(syncContext);

            _activeObject = new AsyncActivePeriodicObject(activeContext)
            {
                PeriodicMethod = NRun
            };
        }
Exemplo n.º 5
0
        public VisionComponent(IEntityLogger logger, IVisionProvider visionProvider, HumanoidNPCGameComponentContext internalContext, IWorldCoreGameComponentContext worldContext)
            : base(logger)
        {
            _internalContext = internalContext;
            _selfInstanceId  = internalContext.SelfInstanceId;
            _worldContext    = worldContext;
            _visionProvider  = visionProvider;

            _activePeriodicObjectContext = new ActivePeriodicObjectContext(worldContext.SyncContext);
            _activeObject = new AsyncActivePeriodicObject(_activePeriodicObjectContext);
            _activeObject.PeriodicMethod = CommandLoop;
        }
Exemplo n.º 6
0
        protected virtual void Dispose(Boolean disposing)
        {
            if (disposed)
            {
                return;
            }

            if (logger != null)
            {
                logger.Dispose();
            }
            context.Dispose();
            context = null;
            logger  = null;

            disposed = true;
        }
Exemplo n.º 7
0
        public CoreLogger(LoggingSettings settings, IWorldCoreContext coreContext)
        {
            _coreContext              = coreContext;
            _settings                 = new CoreLoggerSettings();
            _settings.LogDir          = settings.LogDir;
            _settings.PlatformLoggers = settings.PlatformLoggers?.ToList();

            _loggerContext.Enable = settings.Enable;

            if (!string.IsNullOrWhiteSpace(_settings.LogDir))
            {
                Directory.CreateDirectory(_settings.LogDir);

                var now       = DateTime.Now;
                var todaysDir = $"{now.Year}_{now.Month:00}_{now.Day:00}_{now.Hour:00}_{now.Minute:00}_{now.Second:00}";

                _settings.LogDir = Path.Combine(_settings.LogDir, todaysDir);

                Directory.CreateDirectory(_settings.LogDir);
            }

            _coreLogger = new InternalLogger(_loggerContext, "Core", _settings);
        }
 public SunucuEnvanterDbContext(IEntityLogger entityLogger)
     : base(entityLogger)
 {
 }
 public PlatformTypesConvertorsRegistry(IEntityLogger logger)
     : base(logger)
 {
 }
Exemplo n.º 10
0
 public BaseCoreContext(IEntityLogger logger)
     : base(logger)
 {
 }
Exemplo n.º 11
0
 protected BaseComponent(IEntityLogger logger)
     : base(logger)
 {
 }
Exemplo n.º 12
0
 public LogEntityCommandHandler(IEntityLogger <TGetModel> entityLogger)
 {
     _entityLogger = entityLogger;
 }
 public LogUserPageCommandHandler(IEntityLogger <GetPublicUserModel> entityLogger) : base(entityLogger)
 {
 }
Exemplo n.º 14
0
 public LogCommentPageCommandHandler(IEntityLogger <GetCommentModel> entityLogger) : base(entityLogger)
 {
 }
Exemplo n.º 15
0
 public UnitOfWork(AContext context, IEntityLogger logger = null)
 {
     this.context = context;
     this.logger  = logger;
 }
Exemplo n.º 16
0
 public EndPointActivator(IEntityLogger logger, IPlatformTypesConvertorsRegistry platformTypesConvertorsRegistry, IInvokerInMainThread invokingInMainThread)
     : base(logger)
 {
     _platformTypesConvertorsRegistry = platformTypesConvertorsRegistry;
     _invokingInMainThread            = invokingInMainThread;
 }
Exemplo n.º 17
0
 public EndpointsRegistry(IEntityLogger logger)
     : base(logger)
 {
 }
Exemplo n.º 18
0
 public IslemDbContext(IEntityLogger entityLogger)
     : base(entityLogger)
 {
 }
Exemplo n.º 19
0
 public MainStorageContext(IEntityLogger logger)
     : base(logger)
 {
 }
 public ReportDbContext(IEntityLogger entityLogger)
     : base(entityLogger)
 {
 }
 public ElmahDbContext(IEntityLogger entityLogger)
     : base(entityLogger)
 {
 }
Exemplo n.º 22
0
 public LogArticleCommandHandler(IEntityLogger <GetArticleModel> entityLogger) : base(entityLogger)
 {
 }
Exemplo n.º 23
0
 public LogBoardPageCommandHandler(IEntityLogger <GetBoardModel> entityLogger) : base(entityLogger)
 {
 }
Exemplo n.º 24
0
 /// <inheritdoc/>
 public object ConvertToCoreType(object platformObject, IEntityLogger logger)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 25
0
 public void SetUp()
 {
     context    = new TestingContext();
     logger     = Substitute.For <IEntityLogger>();
     unitOfWork = new UnitOfWork(context, logger);
 }
Exemplo n.º 26
0
 public EndPointsResolver(IEntityLogger logger, IPlatformTypesConvertorsRegistry platformTypesConvertorsRegistry)
     : base(logger)
 {
     _platformTypesConvertorsRegistry = platformTypesConvertorsRegistry;
 }
 public EndpointsProxyRegistryForDevices(IEntityLogger logger, IEndpointsRegistry sourceEndpointsRegistry, IList <int> devices)
     : base(logger)
 {
     _sourceEndpointsRegistry = sourceEndpointsRegistry;
     Devices = devices;
 }
Exemplo n.º 28
0
        /// <inheritdoc/>
        public object ConvertToPlatformType(object coreObject, IEntityLogger logger)
        {
            var targetValue = (NumberValue)coreObject;

            return((float)(double)targetValue.GetSystemValue());
        }
Exemplo n.º 29
0
 public Lexer(string text, IEntityLogger logger)
 {
     _logger = logger;
     _items  = new Queue <char>(text.ToList());
 }
 protected BaseWorldCoreComponent(IWorldCoreContext coreContext)
 {
     coreContext.AddWorldComponent(this);
     _coreContext = coreContext;
     _logger      = _coreContext.Logger;
 }