当前位置: 首页>>代码示例>>C#>>正文


C# TProtocol.WriteMessageBegin方法代码示例

本文整理汇总了C#中FluentCassandra.Thrift.Protocol.TProtocol.WriteMessageBegin方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.WriteMessageBegin方法的具体用法?C# TProtocol.WriteMessageBegin怎么用?C# TProtocol.WriteMessageBegin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FluentCassandra.Thrift.Protocol.TProtocol的用法示例。


在下文中一共展示了TProtocol.WriteMessageBegin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Fail

        private void Fail( TProtocol oprot, TMessage message, TApplicationException.ExceptionType extype, string etxt)
        {
            TApplicationException appex = new TApplicationException( extype, etxt);

            TMessage newMessage = new TMessage(message.Name, TMessageType.Exception, message.SeqID);

            oprot.WriteMessageBegin(newMessage);
            appex.Write( oprot);
            oprot.WriteMessageEnd();
            oprot.Transport.Flush();
        }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:11,代码来源:TMultiplexedProcessor.cs

示例2: describe_splits_ex_Process

 public void describe_splits_ex_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   describe_splits_ex_args args = new describe_splits_ex_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   describe_splits_ex_result result = new describe_splits_ex_result();
   try {
     result.Success = iface_.describe_splits_ex(args.CfName, args.Start_token, args.End_token, args.Keys_per_split);
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   }
   oprot.WriteMessageBegin(new TMessage("describe_splits_ex", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:16,代码来源:Cassandra.cs

示例3: trace_next_query_Process

 public void trace_next_query_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   trace_next_query_args args = new trace_next_query_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   trace_next_query_result result = new trace_next_query_result();
   result.Success = iface_.trace_next_query();
   oprot.WriteMessageBegin(new TMessage("trace_next_query", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:12,代码来源:Cassandra.cs

示例4: describe_keyspace_Process

 public void describe_keyspace_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   describe_keyspace_args args = new describe_keyspace_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   describe_keyspace_result result = new describe_keyspace_result();
   try {
     result.Success = iface_.describe_keyspace(args.Keyspace);
   } catch (NotFoundException nfe) {
     result.Nfe = nfe;
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   }
   oprot.WriteMessageBegin(new TMessage("describe_keyspace", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:18,代码来源:Cassandra.cs

示例5: describe_snitch_Process

 public void describe_snitch_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   describe_snitch_args args = new describe_snitch_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   describe_snitch_result result = new describe_snitch_result();
   result.Success = iface_.describe_snitch();
   oprot.WriteMessageBegin(new TMessage("describe_snitch", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:12,代码来源:Cassandra.cs

示例6: describe_schema_versions_Process

 public void describe_schema_versions_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   describe_schema_versions_args args = new describe_schema_versions_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   describe_schema_versions_result result = new describe_schema_versions_result();
   try {
     result.Success = iface_.describe_schema_versions();
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   }
   oprot.WriteMessageBegin(new TMessage("describe_schema_versions", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:16,代码来源:Cassandra.cs

示例7: Process

 public bool Process(TProtocol iprot, TProtocol oprot)
 {
   try
   {
     TMessage msg = iprot.ReadMessageBegin();
     ProcessFunction fn;
     processMap_.TryGetValue(msg.Name, out fn);
     if (fn == null) {
       TProtocolUtil.Skip(iprot, TType.Struct);
       iprot.ReadMessageEnd();
       TApplicationException x = new TApplicationException (TApplicationException.ExceptionType.UnknownMethod, "Invalid method name: '" + msg.Name + "'");
       oprot.WriteMessageBegin(new TMessage(msg.Name, TMessageType.Exception, msg.SeqID));
       x.Write(oprot);
       oprot.WriteMessageEnd();
       oprot.Transport.Flush();
       return true;
     }
     fn(msg.SeqID, iprot, oprot);
   }
   catch (IOException)
   {
     return false;
   }
   return true;
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:25,代码来源:Cassandra.cs

示例8: execute_prepared_cql3_query_Process

 public void execute_prepared_cql3_query_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   execute_prepared_cql3_query_args args = new execute_prepared_cql3_query_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   execute_prepared_cql3_query_result result = new execute_prepared_cql3_query_result();
   try {
     result.Success = iface_.execute_prepared_cql3_query(args.ItemId, args.Values, args.Consistency);
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   } catch (UnavailableException ue) {
     result.Ue = ue;
   } catch (TimedOutException te) {
     result.Te = te;
   } catch (SchemaDisagreementException sde) {
     result.Sde = sde;
   }
   oprot.WriteMessageBegin(new TMessage("execute_prepared_cql3_query", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:22,代码来源:Cassandra.cs

示例9: remove_counter_Process

 public void remove_counter_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   remove_counter_args args = new remove_counter_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   remove_counter_result result = new remove_counter_result();
   try {
     iface_.remove_counter(args.Key, args.Path, args.Consistency_level);
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   } catch (UnavailableException ue) {
     result.Ue = ue;
   } catch (TimedOutException te) {
     result.Te = te;
   }
   oprot.WriteMessageBegin(new TMessage("remove_counter", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:20,代码来源:Cassandra.cs

示例10: cas_Process

 public void cas_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   cas_args args = new cas_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   cas_result result = new cas_result();
   try {
     result.Success = iface_.cas(args.Key, args.Column_family, args.Expected, args.Updates, args.Serial_consistency_level, args.Commit_consistency_level);
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   } catch (UnavailableException ue) {
     result.Ue = ue;
   } catch (TimedOutException te) {
     result.Te = te;
   }
   oprot.WriteMessageBegin(new TMessage("cas", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:20,代码来源:Cassandra.cs

示例11: insert_Process

 public void insert_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   insert_args args = new insert_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   insert_result result = new insert_result();
   try {
     iface_.insert(args.Key, args.Column_parent, args.Column, args.Consistency_level);
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   } catch (UnavailableException ue) {
     result.Ue = ue;
   } catch (TimedOutException te) {
     result.Te = te;
   }
   oprot.WriteMessageBegin(new TMessage("insert", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:20,代码来源:Cassandra.cs

示例12: get_indexed_slices_Process

 public void get_indexed_slices_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   get_indexed_slices_args args = new get_indexed_slices_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   get_indexed_slices_result result = new get_indexed_slices_result();
   try {
     result.Success = iface_.get_indexed_slices(args.Column_parent, args.Index_clause, args.Column_predicate, args.Consistency_level);
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   } catch (UnavailableException ue) {
     result.Ue = ue;
   } catch (TimedOutException te) {
     result.Te = te;
   }
   oprot.WriteMessageBegin(new TMessage("get_indexed_slices", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:20,代码来源:Cassandra.cs

示例13: get_Process

 public void get_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   get_args args = new get_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   get_result result = new get_result();
   try {
     result.Success = iface_.get(args.Key, args.Column_path, args.Consistency_level);
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   } catch (NotFoundException nfe) {
     result.Nfe = nfe;
   } catch (UnavailableException ue) {
     result.Ue = ue;
   } catch (TimedOutException te) {
     result.Te = te;
   }
   oprot.WriteMessageBegin(new TMessage("get", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:22,代码来源:Cassandra.cs

示例14: login_Process

 public void login_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   login_args args = new login_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   login_result result = new login_result();
   try {
     iface_.login(args.Auth_request);
   } catch (AuthenticationException authnx) {
     result.Authnx = authnx;
   } catch (AuthorizationException authzx) {
     result.Authzx = authzx;
   }
   oprot.WriteMessageBegin(new TMessage("login", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:18,代码来源:Cassandra.cs

示例15: system_update_column_family_Process

 public void system_update_column_family_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   system_update_column_family_args args = new system_update_column_family_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   system_update_column_family_result result = new system_update_column_family_result();
   try {
     result.Success = iface_.system_update_column_family(args.Cf_def);
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   } catch (SchemaDisagreementException sde) {
     result.Sde = sde;
   }
   oprot.WriteMessageBegin(new TMessage("system_update_column_family", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
开发者ID:achinn,项目名称:fluentcassandra,代码行数:18,代码来源:Cassandra.cs


注:本文中的FluentCassandra.Thrift.Protocol.TProtocol.WriteMessageBegin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。