public async Task TestAsync(int _class, int _struct, CancellationToken cancellationToken = default(CancellationToken)) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("Test", TMessageType.Call, SeqId), cancellationToken); var args = new TestArgs(); args._class = _class; args._struct = _struct; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new TestResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); return; }
public async Task ShowInGameOverlayAsync(Ruyi.SDK.Overlay.OverlayState arguments, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("ShowInGameOverlay", TMessageType.Call, SeqId), cancellationToken); var args = new ShowInGameOverlayArgs(); args.Arguments = arguments; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new ShowInGameOverlayResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); return; }
public async Task needSplitAsync(long rootID, TNeedSplitInfo splitInfo, CancellationToken cancellationToken = default(CancellationToken)) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("needSplit", TMessageType.Call, SeqId), cancellationToken); var args = new needSplitArgs(); args.RootID = rootID; args.SplitInfo = splitInfo; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new needSplitResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); return; }
public async Task pingAsync(CancellationToken cancellationToken = default(CancellationToken)) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("ping", TMessageType.Call, SeqId), cancellationToken); var args = new pingArgs(); await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new pingResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); return; }
public async Task <List <User> > GetAllAsync(CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("GetAll", TMessageType.Call, SeqId), cancellationToken); var args = new GetAllArgs(); await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new GetAllResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "GetAll failed: unknown result"); }
public async global::System.Threading.Tasks.Task HelloWorldAsync(global::automl.HelloWorldStruct input, CancellationToken cancellationToken = default) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("HelloWorld", TMessageType.Call, SeqId), cancellationToken); var args = new InternalStructs.HelloWorldArgs() { Input = input, }; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new InternalStructs.HelloWorldResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); return; }
public async Task UpdateAsync(Person person, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("Update", TMessageType.Call, SeqId), cancellationToken); var args = new UpdateArgs(); args.Person = person; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new UpdateResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); return; }
public async Task <short> getLibraryByIdConsumerAsync(short idConsumer, CancellationToken cancellationToken = default(CancellationToken)) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("getLibraryByIdConsumer", TMessageType.Call, SeqId), cancellationToken); var args = new getLibraryByIdConsumerArgs(); args.IdConsumer = idConsumer; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new getLibraryByIdConsumerResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.sErrorNotFoundE) { throw result.SErrorNotFoundE; } if (result.__isset.sErrorSystemE) { throw result.SErrorSystemE; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getLibraryByIdConsumer failed: unknown result"); }
public async Task <SnsFriends> getSnsFriendsAsync(SnsIdType snsIdType, string snsAccessToken, int startIdx, int limit, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("getSnsFriends", TMessageType.Call, SeqId), cancellationToken); var args = new getSnsFriendsArgs(); args.SnsIdType = snsIdType; args.SnsAccessToken = snsAccessToken; args.StartIdx = startIdx; args.Limit = limit; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new getSnsFriendsResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.e) { throw result.E; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getSnsFriends failed: unknown result"); }
public async Task <SpotNearbyResponse> lookupNearbyAsync(Location location, SpotCategory category, string query, string countryAreaCode, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("lookupNearby", TMessageType.Call, SeqId), cancellationToken); var args = new lookupNearbyArgs(); args.Location = location; args.Category = category; args.Query = query; args.CountryAreaCode = countryAreaCode; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new lookupNearbyResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.e) { throw result.E; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "lookupNearby failed: unknown result"); }
public async global::System.Threading.Tasks.Task <global::Thrift5320.enums.Task> TaskAsync(global::Thrift5320.structs.Task foo, global::Thrift5320.Task.Foobar bar, CancellationToken cancellationToken = default) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("Task", TMessageType.Call, SeqId), cancellationToken); var args = new InternalStructs.TaskArgs() { Foo = foo, Bar = bar, }; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new InternalStructs.TaskResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.error) { throw result.Error; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Task failed: unknown result"); }
public async Task <MessageOperations> fetchMessageOperationsAsync(long localRevision, long lastOpTimestamp, int count, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("fetchMessageOperations", TMessageType.Call, SeqId), cancellationToken); var args = new fetchMessageOperationsArgs(); args.LocalRevision = localRevision; args.LastOpTimestamp = lastOpTimestamp; args.Count = count; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new fetchMessageOperationsResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.e) { throw result.E; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "fetchMessageOperations failed: unknown result"); }
public async global::System.Threading.Tasks.Task <THashSet <THashSet <THashSet <global::OptReqDefTest.Distance> > > > DoItNowAsync(List <List <List <global::OptReqDefTest.RaceDetails> > > rd, int mitDefault, CancellationToken cancellationToken = default) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("DoItNow", TMessageType.Call, SeqId), cancellationToken); var args = new InternalStructs.DoItNowArgs() { Rd = rd, MitDefault = mitDefault, }; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new InternalStructs.DoItNowResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.cbb) { throw result.Cbb; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "DoItNow failed: unknown result"); }
public async global::System.Threading.Tasks.Task <global::APIGateway.Thrift.Generated.NotificationTypes.NotificationQueueResponse> SendNotificationAsync(global::APIGateway.Thrift.Generated.NotificationTypes.NotificationQueueRequest queueRequest, CancellationToken cancellationToken = default) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("SendNotification", TMessageType.Call, SeqId), cancellationToken); var args = new InternalStructs.SendNotificationArgs() { QueueRequest = queueRequest, }; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new InternalStructs.SendNotificationResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.ne) { throw result.Ne; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "SendNotification failed: unknown result"); }
public async Task <SpotPhoneNumberResponse> lookupByPhoneNumberAsync(string countryAreaCode, string phoneNumber, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("lookupByPhoneNumber", TMessageType.Call, SeqId), cancellationToken); var args = new lookupByPhoneNumberArgs(); args.CountryAreaCode = countryAreaCode; args.PhoneNumber = phoneNumber; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new lookupByPhoneNumberResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.e) { throw result.E; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "lookupByPhoneNumber failed: unknown result"); }
public async Task <int> calculateAsync(int logid, Work w, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("calculate", TMessageType.Call, SeqId), cancellationToken); var args = new calculateArgs(); args.Logid = logid; args.W = w; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new calculateResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.ouch) { throw result.Ouch; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "calculate failed: unknown result"); }
public async Task <Ruyi.SDK.UserServiceExternal.UserInfo_Public> GetPlayingUserInfoAsync(string appId, string userId, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("GetPlayingUserInfo", TMessageType.Call, SeqId), cancellationToken); var args = new GetPlayingUserInfoArgs(); args.AppId = appId; args.UserId = userId; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new GetPlayingUserInfoResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.error1) { throw result.Error1; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "GetPlayingUserInfo failed: unknown result"); }
public async Task <BotUseInfo> getBotUseInfoAsync(string botMid, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("getBotUseInfo", TMessageType.Call, SeqId), cancellationToken); var args = new getBotUseInfoArgs(); args.BotMid = botMid; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new getBotUseInfoResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.e) { throw result.E; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getBotUseInfo failed: unknown result"); }
public async Task <List <LastReadMessageIds> > multiGetLastReadMessageIdsAsync(List <string> chatIds, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("multiGetLastReadMessageIds", TMessageType.Call, SeqId), cancellationToken); var args = new multiGetLastReadMessageIdsArgs(); args.ChatIds = chatIds; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new multiGetLastReadMessageIdsResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } if (result.__isset.e) { throw result.E; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "multiGetLastReadMessageIds failed: unknown result"); }
public async Task sendChatCheckedByWatermarkAsync(int seq, string mid, long watermark, sbyte sessionId, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("sendChatCheckedByWatermark", TMessageType.Call, SeqId), cancellationToken); var args = new sendChatCheckedByWatermarkArgs(); args.Seq = seq; args.Mid = mid; args.Watermark = watermark; args.SessionId = sessionId; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new sendChatCheckedByWatermarkResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.e) { throw result.E; } return; }
public async Task postSnsInvitationMessageAsync(SnsIdType snsIdType, string snsAccessToken, string toSnsUserId, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("postSnsInvitationMessage", TMessageType.Call, SeqId), cancellationToken); var args = new postSnsInvitationMessageArgs(); args.SnsIdType = snsIdType; args.SnsAccessToken = snsAccessToken; args.ToSnsUserId = toSnsUserId; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new postSnsInvitationMessageResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.e) { throw result.E; } return; }
public async Task <bool> setMetaIDAsync(long key, long metaID, CancellationToken cancellationToken = default(CancellationToken)) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("setMetaID", TMessageType.Call, SeqId), cancellationToken); var args = new setMetaIDArgs(); args.Key = key; args.MetaID = metaID; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new setMetaIDResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "setMetaID failed: unknown result"); }
public async Task <int> putAsync(byte[] key, byte[] @value, CancellationToken cancellationToken = default(CancellationToken)) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("put", TMessageType.Call, SeqId), cancellationToken); var args = new putArgs(); args.Key = key; args.Value = @value; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new putResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "put failed: unknown result"); }
public async global::System.Threading.Tasks.Task <List <global::Jaeger.Thrift.BatchSubmitResponse> > submitBatchesAsync(List <global::Jaeger.Thrift.Batch> batches, CancellationToken cancellationToken = default) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("submitBatches", TMessageType.Call, SeqId), cancellationToken); var args = new InternalStructs.submitBatchesArgs() { Batches = batches, }; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new InternalStructs.submitBatchesResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "submitBatches failed: unknown result"); }
public async Task <int> SendMsgAsync(Ruyi.SDK.MediaService.RequestMsg request, bool broadcast, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("SendMsg", TMessageType.Call, SeqId), cancellationToken); var args = new SendMsgArgs(); args.Request = request; args.Broadcast = broadcast; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new SendMsgResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "SendMsg failed: unknown result"); }
public async global::System.Threading.Tasks.Task <global::PElementServer.Thrift.PElement> @GetAsync(string name, CancellationToken cancellationToken = default) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("Get", TMessageType.Call, SeqId), cancellationToken); var args = new InternalStructs.GetArgs() { Name = name, }; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new InternalStructs.GetResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Get failed: unknown result"); }
public async Task <int> @AddAsync(int num1, int num2, CancellationToken cancellationToken = default(CancellationToken)) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("Add", TMessageType.Call, SeqId), cancellationToken); var args = new AddArgs(); args.Num1 = num1; args.Num2 = num2; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new AddResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Add failed: unknown result"); }
public async Task <ReportOutput> getBatchReportsAsync(string _reportName, string _date, CancellationToken cancellationToken = default(CancellationToken)) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("getBatchReports", TMessageType.Call, SeqId), cancellationToken); var args = new getBatchReportsArgs(); args._reportName = _reportName; args._date = _date; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new getBatchReportsResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getBatchReports failed: unknown result"); }
public async global::System.Threading.Tasks.Task <string> secondtestStringAsync(string thing, CancellationToken cancellationToken = default) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("secondtestString", TMessageType.Call, SeqId), cancellationToken); var args = new InternalStructs.secondtestStringArgs() { Thing = thing, }; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new InternalStructs.secondtestStringResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "secondtestString failed: unknown result"); }
public async global::System.Threading.Tasks.Task <List <global::Jaeger.Thrift.Agent.BaggageRestriction> > getBaggageRestrictionsAsync(string serviceName, CancellationToken cancellationToken = default) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("getBaggageRestrictions", TMessageType.Call, SeqId), cancellationToken); var args = new InternalStructs.getBaggageRestrictionsArgs() { ServiceName = serviceName, }; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new InternalStructs.getBaggageRestrictionsResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getBaggageRestrictions failed: unknown result"); }