コード例 #1
0
ファイル: API.cs プロジェクト: cezary12/kokos
 /// <summary>
 /// Sends streaming command to the server or throws exception if user is not logged in.
 /// </summary>
 /// <param name="apiStreamingCommand">Streaming command</param>
 private void SendStreamingCommand(APIStreamingCommand apiStreamingCommand)
 {
     if (StreamSessionId != null)
     {
         connector.Execute(apiStreamingCommand);
     }
     else
     {
         throw new APIException("You must login to perform any streaming command.");
     }
 }
コード例 #2
0
 /// <summary>
 /// Executes streaming commands.
 /// </summary>
 /// <param name="command">Command</param>
 public void Execute(APIStreamingCommand command)
 {
     Send(command.JSONString, null);
 }