コード例 #1
0
        internal void HandleClientToGamePhaseTransition(ILeagueSession session, LeagueSessionPhaseChangedArgs e)
        {
            logger.Info("Handling Client to Game Phase Transition!");

            var modifications         = modificationLoader.EnumerateModifications();
            int compilationsRemaining = modifications.Count;

            foreach (var modification in modifications)
            {
                var resolutionChain = resolutionChainsByModificationName.GetOrAdd(
                    modification.RepositoryName,
                    add => new CompletionChain(cancellationToken => leagueBuildUtilities.ResolveModification(modification, cancellationToken))
                    );
                var compilationChain = compilationChainsByModificationName.GetOrAdd(
                    modification.RepositoryName,
                    add => new CompletionChain(cancellationToken => leagueBuildUtilities.CompileModification(modification, cancellationToken))
                    );
                var resolutionLink  = resolutionChain.CreateLink("resolution_" + DateTime.Now.ToFileTimeUtc());
                var compilationLink = compilationChain.CreateLink("compilation_" + DateTime.Now.ToFileTimeUtc());
                resolutionLink.Tail(compilationLink.StartAndWaitForChain);
                compilationLink.Tail(() => {
                    logger.Info("Compilation counter at " + compilationsRemaining);
                    if (Interlocked.Decrement(ref compilationsRemaining) == 0)
                    {
                        var gameModifications = leagueBuildUtilities.LinkGameModifications(modifications);
                        trinketSpawner.SpawnTrinket(
                            session.GetProcessOrNull(LeagueProcessType.GameClient),
                            leagueTrinketSpawnConfigurationFactory.GetGameConfiguration(gameModifications)
                            );
                    }
                });
                resolutionChain.StartNext(resolutionLink);
            }
        }
コード例 #2
0
        protected virtual void OnPhaseChanged(ILeagueSession session, LeagueSessionPhaseChangedArgs e)
        {
            LeagueSessionPhaseChangedHandler handler = PhaseChanged;

            if (handler != null)
            {
                handler(session, e);
            }
        }
コード例 #3
0
        protected virtual void OnProcessLaunched(ILeagueSession session, LeagueSessionProcessLaunchedArgs e)
        {
            LeagueSessionProcessLaunchedHandler handler = ProcessLaunched;

            if (handler != null)
            {
                handler(session, e);
            }
        }
コード例 #4
0
        internal void HandleSessionProcessLaunched(ILeagueSession session, LeagueSessionProcessLaunchedArgs e)
        {
            logger.Info("Process Launched " + e.Type + ": " + e.Process.Id);
            LeagueSessionProcessLaunchedHandler handler;

            if (processLaunchedHandlers.TryGetValue(e.Type, out handler))
            {
                handler(session, e);
            }
        }
コード例 #5
0
        internal void HandleSessionPhaseChanged(ILeagueSession session, LeagueSessionPhaseChangedArgs e)
        {
            logger.Info("Phase Change from " + e.Previous + " to " + e.Current);
            PhaseChangeHandler handler;

            if (phaseChangeHandlers.TryGetValue(new PhaseChange(e.Previous, e.Current), out handler))
            {
                handler(session, e);
            }
        }
コード例 #6
0
        internal void HandleUninitializedToPreclientPhaseTransition(ILeagueSession session, LeagueSessionPhaseChangedArgs e)
        {
            logger.Info("Handling Uninitialized to Preclient Phase Transition!");
            var modifications = modificationLoader.EnumerateModifications();

            foreach (var modification in modifications)
            {
                var resolutionChain = resolutionChainsByModificationName.GetOrAdd(
                    modification.RepositoryName,
                    add => new CompletionChain(cancellationToken => leagueBuildUtilities.ResolveModification(modification, cancellationToken))
                    );
                var compilationChain = compilationChainsByModificationName.GetOrAdd(
                    modification.RepositoryName,
                    add => new CompletionChain(cancellationToken => leagueBuildUtilities.CompileModification(modification, cancellationToken))
                    );

                var resolutionLink  = resolutionChain.CreateLink("resolution_" + DateTime.Now.ToFileTimeUtc());
                var compilationLink = compilationChain.CreateLink("compilation_" + DateTime.Now.ToFileTimeUtc());
                resolutionLink.Tail(compilationLink.StartAndWaitForChain);
                resolutionChain.StartNext(resolutionLink);
            }
            radsService.Suspend();
        }
コード例 #7
0
 private void HandlePhaseContextPhaseChanged(ILeagueSession session, LeagueSessionPhaseChangedArgs e)
 {
     OnPhaseChanged(this, e);
 }
コード例 #8
0
        internal void HandleUninitializedToPreclientPhaseTransition(ILeagueSession session, LeagueSessionPhaseChangedArgs e)
        {
            logger.Info("Handling Uninitialized to Preclient Phase Transition!");
             var modifications = modificationLoader.EnumerateModifications();
             foreach (var modification in modifications) {
            var resolutionChain = resolutionChainsByModificationName.GetOrAdd(
               modification.RepositoryName,
               add => new CompletionChain(cancellationToken => leagueBuildUtilities.ResolveModification(modification, cancellationToken))
            );
            var compilationChain = compilationChainsByModificationName.GetOrAdd(
               modification.RepositoryName,
               add => new CompletionChain(cancellationToken => leagueBuildUtilities.CompileModification(modification, cancellationToken))
            );

            var resolutionLink = resolutionChain.CreateLink("resolution_" + DateTime.Now.ToFileTimeUtc());
            var compilationLink = compilationChain.CreateLink("compilation_" + DateTime.Now.ToFileTimeUtc());
            resolutionLink.Tail(compilationLink.StartAndWaitForChain);
            resolutionChain.StartNext(resolutionLink);
             }
             radsService.Suspend();
        }
コード例 #9
0
        internal void HandleClientToGamePhaseTransition(ILeagueSession session, LeagueSessionPhaseChangedArgs e)
        {
            logger.Info("Handling Client to Game Phase Transition!");

             var modifications = modificationLoader.EnumerateModifications();
             int compilationsRemaining = modifications.Count;
             foreach (var modification in modifications) {
            var resolutionChain = resolutionChainsByModificationName.GetOrAdd(
               modification.RepositoryName,
               add => new CompletionChain(cancellationToken => leagueBuildUtilities.ResolveModification(modification, cancellationToken))
            );
            var compilationChain = compilationChainsByModificationName.GetOrAdd(
               modification.RepositoryName,
               add => new CompletionChain(cancellationToken => leagueBuildUtilities.CompileModification(modification, cancellationToken))
            );
            var resolutionLink = resolutionChain.CreateLink("resolution_" + DateTime.Now.ToFileTimeUtc());
            var compilationLink = compilationChain.CreateLink("compilation_" + DateTime.Now.ToFileTimeUtc());
            resolutionLink.Tail(compilationLink.StartAndWaitForChain);
            compilationLink.Tail(() => {
               logger.Info("Compilation counter at " + compilationsRemaining);
               if (Interlocked.Decrement(ref compilationsRemaining) == 0) {
                  var gameModifications = leagueBuildUtilities.LinkGameModifications(modifications);
                  trinketSpawner.SpawnTrinket(
                     session.GetProcessOrNull(LeagueProcessType.GameClient),
                     leagueTrinketSpawnConfigurationFactory.GetGameConfiguration(gameModifications)
                  );
               }
            });
            resolutionChain.StartNext(resolutionLink);
             }
        }
コード例 #10
0
 internal void HandleSessionPhaseChanged(ILeagueSession session, LeagueSessionPhaseChangedArgs e)
 {
     logger.Info("Phase Change from " + e.Previous + " to " + e.Current);
      PhaseChangeHandler handler;
      if (phaseChangeHandlers.TryGetValue(new PhaseChange(e.Previous, e.Current), out handler)) {
     handler(session, e);
      }
 }
コード例 #11
0
 internal void HandleSessionProcessLaunched(ILeagueSession session, LeagueSessionProcessLaunchedArgs e)
 {
     logger.Info("Process Launched " + e.Type + ": " + e.Process.Id);
      LeagueSessionProcessLaunchedHandler handler;
      if (processLaunchedHandlers.TryGetValue(e.Type, out handler)) {
     handler(session, e);
      }
 }
コード例 #12
0
 public LeagueSessionCreatedArgs(ILeagueSession session)
 {
     this.session = session;
 }
コード例 #13
0
 public LeagueSessionCreatedArgs(ILeagueSession session) {
    this.session = session;
 }
コード例 #14
0
 private void HandlePhaseContextPhaseChanged(ILeagueSession session, LeagueSessionPhaseChangedArgs e)
 {
     OnPhaseChanged(this, e);
 }
コード例 #15
0
 protected virtual void OnProcessLaunched(ILeagueSession session, LeagueSessionProcessLaunchedArgs e)
 {
     LeagueSessionProcessLaunchedHandler handler = ProcessLaunched;
      if (handler != null) handler(session, e);
 }
コード例 #16
0
 protected virtual void OnPhaseChanged(ILeagueSession session, LeagueSessionPhaseChangedArgs e)
 {
     LeagueSessionPhaseChangedHandler handler = PhaseChanged;
      if (handler != null) handler(session, e);
 }