Example #1
0
    public static void UnsubscribeFromLoop(this ILooper iLooper)
    {
        LoopController loop = getLoop();

        if (loop == null)
        {
            return;
        }
        loop.Unsubscribe(iLooper);
    }
Example #2
0
    public static void SubscribeToLoop(this ILooper iLooper)
    {
        LoopController loop = getLoop();

        if (loop == null)
        {
            Debug.LogError("Could not find LoopController to subscribe to!");
            return;
        }
        loop.Subscribe(iLooper);
    }
Example #3
0
 public Processor(ISettings settings = null,
                  IControllerService controllerService = null,
                  IConsoleService console = null,
                  IArgumentProcessorService argumentProcessor = null,
                  ILooper looper = null)
 {
     _settings          = settings ?? new Settings();
     _controllerService = controllerService ?? new ControllerService();
     _console           = console ?? new ConsoleService();
     _argumentProcessor = argumentProcessor ?? new ArgumentProcessorService();
     _looper            = looper ?? new Looper();
 }
Example #4
0
        public static void RemoveLooper(ILooper looper)
        {
            if (sInitilized && looper != null)
            {
                sInstance.mLoopers.Remove(looper);
            }
#if UNITY_EDITOR
            else if (!sInitilized && Application.isPlaying)
            {
                RTLog.LogError(LogCat.Game, "MainThread not initialized.");
            }
#endif
        }
 public Worker(ILoggerFactory loggerFactory, ILooper looper)
 {
     _looper = looper;
     _logger = loggerFactory.CreateLogger <Worker>();
 }
 public void Unsubscribe(ILooper iLooper)
 {
     subscribers.Remove(iLooper);
 }
 public void Subscribe(ILooper iLooper)
 {
     subscribers.Add(iLooper);
     iLooper.SetState();
 }