本文整理汇总了C#中IClientMessage.GetInt方法的典型用法代码示例。如果您正苦于以下问题:C# IClientMessage.GetInt方法的具体用法?C# IClientMessage.GetInt怎么用?C# IClientMessage.GetInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IClientMessage
的用法示例。
在下文中一共展示了IClientMessage.GetInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
int readCount ;
readCount = clientMessage.GetInt();
parameters.readCount = readCount;
IList<IData> items = null;
int items_size = clientMessage.GetInt();
items = new List<IData>();
for (int items_index = 0; items_index<items_size; items_index++) {
IData items_item;
items_item = clientMessage.GetData();
items.Add(items_item);
}
parameters.items = items;
return parameters;
}
示例2: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
int response ;
response = clientMessage.GetInt();
parameters.response = response;
return parameters;
}
示例3: 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);
}
示例4: 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();
}
}
示例5: 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;
}
}
示例6: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
IList<IData> list = null;
int list_size = clientMessage.GetInt();
list = new List<IData>();
for (int list_index = 0; list_index<list_size; list_index++) {
IData list_item;
list_item = clientMessage.GetData();
list.Add(list_item);
}
parameters.list = list;
return parameters;
}
示例7: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
ISet<KeyValuePair<IData,IData>> entrySet = null;
int entrySet_size = clientMessage.GetInt();
entrySet = new HashSet<KeyValuePair<IData,IData>>();
for (int entrySet_index = 0; entrySet_index<entrySet_size; entrySet_index++) {
KeyValuePair<IData,IData> entrySet_item;
entrySet_item = clientMessage.GetMapEntry();
entrySet.Add(entrySet_item);
}
parameters.entrySet = entrySet;
return parameters;
}
示例8: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
ISet<IData> set = null;
int set_size = clientMessage.GetInt();
set = new HashSet<IData>();
for (int set_index = 0; set_index<set_size; set_index++) {
IData set_item;
set_item = clientMessage.GetData();
set.Add(set_item);
}
parameters.set = set;
return parameters;
}
示例9: 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);
}
示例10: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
IList<DistributedObjectInfo> infoCollection = null;
var infoCollection_size = clientMessage.GetInt();
infoCollection = new List<DistributedObjectInfo>();
for (var infoCollection_index = 0; infoCollection_index < infoCollection_size; infoCollection_index++)
{
DistributedObjectInfo infoCollection_item;
infoCollection_item = DistributedObjectInfoCodec.Decode(clientMessage);
infoCollection.Add(infoCollection_item);
}
parameters.infoCollection = infoCollection;
return parameters;
}
示例11: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
IDictionary<Address, IList<int>> partitions = null;
var partitions_size = clientMessage.GetInt();
partitions = new Dictionary<Address, IList<int>>(partitions_size);
for (var partitions_index = 0; partitions_index < partitions_size; partitions_index++)
{
Address partitions_key;
IList<int> partitions_val;
partitions_key = AddressCodec.Decode(clientMessage);
var partitions_val_size = clientMessage.GetInt();
partitions_val = new List<int>();
for (var partitions_val_index = 0; partitions_val_index < partitions_val_size; partitions_val_index++)
{
int partitions_val_item;
partitions_val_item = clientMessage.GetInt();
partitions_val.Add(partitions_val_item);
}
partitions.Add(partitions_key, partitions_val);
}
parameters.partitions = partitions;
return parameters;
}
示例12: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
IList<KeyValuePair<IData, IData>> response = null;
int response_size = clientMessage.GetInt();
response = new List<KeyValuePair<IData, IData>>();
for (int response_index = 0; response_index < response_size; response_index++)
{
KeyValuePair<IData, IData> response_item;
IData response_item_key;
IData response_item_val;
response_item_key = clientMessage.GetData();
response_item_val = clientMessage.GetData();
response_item = new KeyValuePair<IData, IData>(response_item_key, response_item_val);
response.Add(response_item);
}
parameters.response = response;
return parameters;
}
示例13: 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());
}
示例14: 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());
}
示例15: 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());
}