Exemplo n.º 1
0
 /// <summary>
 /// Все модули возобновлены.
 /// </summary>
 public async ValueTask <Nothing> AllModulesResumed()
 {
     if (_suspendedAware && _suspendAwareCallbacks != null)
     {
         await _suspendAwareCallbacks.OnAllResumedLifetimeCallback();
     }
     AllResumed?.Invoke(null);
     return(Nothing.Value);
 }
Exemplo n.º 2
0
            /// <summary>
            /// Все модули возобновлены.
            /// </summary>
            public async ValueTask <Nothing> AllModulesResumed()
            {
                List <ValueTask <Nothing> > tasks = new List <ValueTask <Nothing> >();

                foreach (var pt in _providers.Values)
                {
                    foreach (var p in pt.Select(p => p.QueryView <IModuleLifetime>()).Where(p => p != null))
                    {
                        tasks.Add(p.AllModulesResumed());
                    }
                }
                foreach (var task in tasks)
                {
                    await task;
                }
                AllResumed?.Invoke(null);
                return(Nothing.Value);
            }