コード例 #1
0
ファイル: PipeServer.cs プロジェクト: wuhan890809/Playnite
 public void InvokeCommand(CmdlineCommand command, string args)
 {
     // We don't want to block this call because it causes issues if some sync operation that shuts down server is also called.
     // For example, mode switch or instance shutdown calls are stopping server,
     // which results in serviceHost.Close() timeout, since server would be still waiting for InvokeCommand to finish.
     Task.Run(async() =>
     {
         await Task.Delay(100);
         syncContext.Post(_ => CommandExecuted?.Invoke(this, new CommandExecutedEventArgs(command, args)), null);
     });
 }
コード例 #2
0
ファイル: PipeServer.cs プロジェクト: zjz894251se/Playnite
 public void InvokeCommand(CmdlineCommand command, string args)
 {
     Channel.InvokeCommand(command, args);
 }
コード例 #3
0
ファイル: PipeServer.cs プロジェクト: zjz894251se/Playnite
 public void InvokeCommand(CmdlineCommand command, string args)
 {
     CommandExecuted?.Invoke(this, new CommandExecutedEventArgs(command, args));
 }
コード例 #4
0
ファイル: PipeServer.cs プロジェクト: zjz894251se/Playnite
 public CommandExecutedEventArgs(CmdlineCommand command, string args)
 {
     Command = command;
     Args    = args;
 }