public CameraController(UnityEngine.Camera camera, ITinyMessengerHub messengerHub, ILogger logger, IStore store) { this.camera = camera; this.messengerHub = messengerHub; this.logger = PrefixedLogger.ForType <CameraController>(logger); var transform = camera.transform; cameraPivot = transform.parent; defaultPosition = transform.position; defaultRotation = transform.rotation.eulerAngles; context = new StateContext(this.logger, store); context.TransitionTo( new WaitingForDragState(context, messengerHub, this.logger, camera)); context.Disable(); spinSubscriptionToken = messengerHub.Subscribe <SpinCamera360Message>(OnSpinRequested); enableDisableSubscriptionToken = messengerHub.Subscribe <EnableCameraControlMessage>(EnableControl); resetPositionSubscriptionToken = messengerHub.Subscribe <ResetCameraMessage>(Reset); orbitSubscriptionToken = messengerHub.Subscribe <CameraOrbitRequestMessage>(Orbit); }
/// <summary> /// The custom initialization for the Facility. /// </summary> /// <remarks>It must be overriden.</remarks> protected override void Init() { if (Kernel.HasComponent(typeof(ILoggerFactory))) { log = Kernel.Resolve <ILoggerFactory>().Create(GetType()); } facilitySettingConfig.Init(FacilityConfig, Kernel); AssertHasConfig(); AssertHasAtLeastOneFactoryConfigured(); RegisterComponents(); ConfigureFacility(); }
/// <summary> /// The custom initialization for the Facility. /// </summary> /// <remarks>It must be overriden.</remarks> protected override void Init() { if (Kernel.HasComponent(typeof (ILoggerFactory))) { log = Kernel.Resolve<ILoggerFactory>().Create(GetType()); } AssertHasConfig(); AssertHasAtLeastOneFactoryConfigured(); RegisterComponents(); ConfigureFacility(); }
public Registry(IHostingEnvironment hostingEnvironment, Settings settingst) { _hostingEnvironment = hostingEnvironment; _settings = settingst; _logger = new SerilogLoggerWrapper(CreateLogger(_hostingEnvironment)); }
public TelegramCrosspostService(string token, string name, ILogger logger) { _logger = logger; _token = token; _name = name; }