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


C# IClientMessage.GetStringUtf8方法代码示例

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


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

示例1: DecodeResponse

 public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
 {
     ResponseParameters parameters = new ResponseParameters();
     byte status;
     status = clientMessage.GetByte();
     parameters.status = status;
     Address address = null;
     bool address_isNull = clientMessage.GetBoolean();
     if (!address_isNull)
     {
         address = AddressCodec.Decode(clientMessage);
         parameters.address = address;
     }
     string uuid = null;
     bool uuid_isNull = clientMessage.GetBoolean();
     if (!uuid_isNull)
     {
         uuid = clientMessage.GetStringUtf8();
         parameters.uuid = uuid;
     }
     string ownerUuid = null;
     bool ownerUuid_isNull = clientMessage.GetBoolean();
     if (!ownerUuid_isNull)
     {
         ownerUuid = clientMessage.GetStringUtf8();
         parameters.ownerUuid = ownerUuid;
     }
     byte serializationVersion;
     serializationVersion = clientMessage.GetByte();
     parameters.serializationVersion = serializationVersion;
     return parameters;
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:32,代码来源:ClientAuthenticationCustomCodec.cs

示例2: Decode

 public static StackTraceElement Decode(IClientMessage clientMessage)
 {
     var declaringClass = clientMessage.GetStringUtf8();
     var methodName = clientMessage.GetStringUtf8();
     var fileName_notNull = clientMessage.GetBoolean();
     string fileName = null;
     if (fileName_notNull)
     {
         fileName = clientMessage.GetStringUtf8();
     }
     var lineNumber = clientMessage.GetInt();
     return new StackTraceElement(declaringClass, methodName, fileName, lineNumber);
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:13,代码来源:StackTraceElementCodec.cs

示例3: Decode

 public static Member Decode(IClientMessage clientMessage)
 {
     Address address = AddressCodec.Decode(clientMessage);
     string uuid = clientMessage.GetStringUtf8();
     bool liteMember = clientMessage.GetBoolean();
     int attributeSize = clientMessage.GetInt();
     IDictionary<string, string> attributes = new Dictionary<string, string>();
     for (int i = 0; i < attributeSize; i++)
     {
         string key = clientMessage.GetStringUtf8();
         string value = clientMessage.GetStringUtf8();
         attributes[key] = value;
     }
     return new Member(address, uuid, attributes, liteMember);
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:15,代码来源:MemberCodec.cs

示例4: Handle

 public static void Handle(IClientMessage clientMessage, HandleDistributedObject handleDistributedObject)
 {
     int messageType = clientMessage.GetMessageType();
     if (messageType == EventMessageConst.EventDistributedObject)
     {
         string name = null;
         name = clientMessage.GetStringUtf8();
         string serviceName = null;
         serviceName = clientMessage.GetStringUtf8();
         string eventType = null;
         eventType = clientMessage.GetStringUtf8();
         handleDistributedObject(name, serviceName, eventType);
         return;
     }
     Hazelcast.Logging.Logger.GetLogger(typeof(AbstractEventHandler)).Warning("Unknown message type received on event handler :" + clientMessage.GetMessageType());
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:16,代码来源:ClientAddDistributedObjectListenerCodec.cs

示例5: DecodeResponse

 public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
 {
     ResponseParameters parameters = new ResponseParameters();
     string response = null;
     response = clientMessage.GetStringUtf8();
     parameters.response = response;
     return parameters;
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:8,代码来源:MultiMapAddEntryListenerToKeyCodec.cs

示例6: Error

 public Error(IClientMessage message)
 {
     ErrorCode = message.GetInt();
     ClassName = message.GetStringUtf8();
     var message_isNull = message.GetBoolean();
     if (!message_isNull)
     {
         Message = message.GetStringUtf8();
     }
     var stackTraceCount = message.GetInt();
     StackTrace = new StackTraceElement[stackTraceCount];
     for (var i = 0; i < stackTraceCount; i++)
     {
         StackTrace[i] = StackTraceElementCodec.Decode(message);
     }
     CauseErrorCode = message.GetInt();
     var causeClassName_isNull = message.GetBoolean();
     if (!causeClassName_isNull)
     {
         CauseClassName = message.GetStringUtf8();
     }
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:22,代码来源:Error.cs

示例7: Decode

 public static Address Decode(IClientMessage clientMessage)
 {
     var host = clientMessage.GetStringUtf8();
     var port = clientMessage.GetInt();
     try
     {
         return new Address(host, port);
     }
     catch (SocketException)
     {
         return null;
     }
 }
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:13,代码来源:AddressCodec.cs

示例8: Handle

 public static void Handle(IClientMessage clientMessage, HandleEntry handleEntry)
 {
     int messageType = clientMessage.GetMessageType();
     if (messageType == EventMessageConst.EventEntry) {
     IData key = null;
     bool key_isNull = clientMessage.GetBoolean();
     if (!key_isNull)
     {
     key = clientMessage.GetData();
     }
     IData value = null;
     bool value_isNull = clientMessage.GetBoolean();
     if (!value_isNull)
     {
     value = clientMessage.GetData();
     }
     IData oldValue = null;
     bool oldValue_isNull = clientMessage.GetBoolean();
     if (!oldValue_isNull)
     {
     oldValue = clientMessage.GetData();
     }
     IData mergingValue = null;
     bool mergingValue_isNull = clientMessage.GetBoolean();
     if (!mergingValue_isNull)
     {
     mergingValue = clientMessage.GetData();
     }
     int eventType ;
     eventType = clientMessage.GetInt();
     string uuid = null;
     uuid = clientMessage.GetStringUtf8();
     int numberOfAffectedEntries ;
     numberOfAffectedEntries = clientMessage.GetInt();
         handleEntry(key, value, oldValue, mergingValue, eventType, uuid, numberOfAffectedEntries);
         return;
     }
     Hazelcast.Logging.Logger.GetLogger(typeof(AbstractEventHandler)).Warning("Unknown message type received on event handler :" + clientMessage.GetMessageType());
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:39,代码来源:MultiMapAddEntryListenerToKeyCodec.cs

示例9: Handle

 public static void Handle(IClientMessage clientMessage, HandleItem handleItem)
 {
     int messageType = clientMessage.GetMessageType();
     if (messageType == EventMessageConst.EventItem)
     {
         IData item = null;
         bool item_isNull = clientMessage.GetBoolean();
         if (!item_isNull)
         {
             item = clientMessage.GetData();
         }
         string uuid = null;
         uuid = clientMessage.GetStringUtf8();
         int eventType;
         eventType = clientMessage.GetInt();
         handleItem(item, uuid, eventType);
         return;
     }
     Hazelcast.Logging.Logger.GetLogger(typeof(AbstractEventHandler)).Warning("Unknown message type received on event handler :" + clientMessage.GetMessageType());
 }
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:20,代码来源:QueueAddListenerCodec.cs

示例10: Handle

 public static void Handle(IClientMessage clientMessage, HandleMember handleMember,
     HandleMemberSet handleMemberSet, HandleMemberAttributeChange handleMemberAttributeChange)
 {
     var messageType = clientMessage.GetMessageType();
     if (messageType == EventMessageConst.EventMember)
     {
         IMember member = null;
         member = MemberCodec.Decode(clientMessage);
         int eventType;
         eventType = clientMessage.GetInt();
         handleMember(member, eventType);
         return;
     }
     if (messageType == EventMessageConst.EventMemberSet)
     {
         IList<IMember> members = null;
         var members_size = clientMessage.GetInt();
         members = new List<IMember>();
         for (var members_index = 0; members_index < members_size; members_index++)
         {
             IMember members_item;
             members_item = MemberCodec.Decode(clientMessage);
             members.Add(members_item);
         }
         handleMemberSet(members);
         return;
     }
     if (messageType == EventMessageConst.EventMemberAttributeChange)
     {
         string uuid = null;
         uuid = clientMessage.GetStringUtf8();
         string key = null;
         key = clientMessage.GetStringUtf8();
         int operationType;
         operationType = clientMessage.GetInt();
         string value = null;
         var value_isNull = clientMessage.GetBoolean();
         if (!value_isNull)
         {
             value = clientMessage.GetStringUtf8();
         }
         handleMemberAttributeChange(uuid, key, operationType, value);
         return;
     }
     Logger.GetLogger(typeof (AbstractEventHandler))
         .Warning("Unknown message type received on event handler :" + clientMessage.GetMessageType());
 }
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:47,代码来源:ClientAddMembershipListenerCodec.cs

示例11: Decode

 public static DistributedObjectInfo Decode(IClientMessage clientMessage)
 {
     var serviceName = clientMessage.GetStringUtf8();
     var name = clientMessage.GetStringUtf8();
     return new DistributedObjectInfo(serviceName, name);
 }
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:6,代码来源:DistributedObjectInfoCodec.cs

示例12: Handle

 public static void Handle(IClientMessage clientMessage, HandleTopic handleTopic)
 {
     var messageType = clientMessage.GetMessageType();
     if (messageType == EventMessageConst.EventTopic)
     {
         IData item = null;
         item = clientMessage.GetData();
         long publishTime;
         publishTime = clientMessage.GetLong();
         string uuid = null;
         uuid = clientMessage.GetStringUtf8();
         handleTopic(item, publishTime, uuid);
         return;
     }
     Logger.GetLogger(typeof (AbstractEventHandler))
         .Warning("Unknown message type received on event handler :" + clientMessage.GetMessageType());
 }
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:17,代码来源:TopicAddMessageListenerCodec.cs


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