//PROTOBUF private CommandInfo ParseCommand(Alachisoft.NCache.Common.Protobuf.Command command, ClientManager clientManager) { CommandInfo cmdInfo = new CommandInfo(); Hashtable eventList = new Hashtable(); Alachisoft.NCache.Common.Protobuf.SyncEventsCommand syncEventsCommand = command.syncEventsCommand; List <Alachisoft.NCache.Common.Protobuf.EventIdCommand> eventIds = syncEventsCommand.eventIds; Alachisoft.NCache.Caching.EventId cacheEventId = null; foreach (EventIdCommand eventId in eventIds) { cacheEventId = new Alachisoft.NCache.Caching.EventId(); cacheEventId.EventUniqueID = eventId.eventUniqueId; cacheEventId.EventCounter = eventId.eventCounter; cacheEventId.OperationCounter = eventId.operationCounter; cacheEventId.EventType = (Persistence.EventType)eventId.eventType; cacheEventId.QueryChangeType = (Caching.Queries.QueryChangeType)eventId.queryChangeType; cacheEventId.QueryId = eventId.queryId; if (String.IsNullOrEmpty(cacheEventId.QueryId)) { cacheEventId.QueryId = null; } // Need to assing querychnagetype and query id here eventList.Add(cacheEventId, null); } cmdInfo.EventsList = eventList; cmdInfo.RequestId = syncEventsCommand.requestId.ToString(); return(cmdInfo); }
//PROTOBUF private CommandInfo ParseCommand(Alachisoft.NCache.Common.Protobuf.Command command, ClientManager clientManager) { CommandInfo cmdInfo = new CommandInfo(); Hashtable eventList = new Hashtable(); Alachisoft.NCache.Common.Protobuf.SyncEventsCommand syncEventsCommand = command.syncEventsCommand; List <Alachisoft.NCache.Common.Protobuf.EventIdCommand> eventIds = syncEventsCommand.eventIds; Alachisoft.NCache.Caching.EventId cacheEventId = null; foreach (EventIdCommand eventId in eventIds) { cacheEventId = new Alachisoft.NCache.Caching.EventId(); cacheEventId.EventUniqueID = eventId.eventUniqueId; cacheEventId.EventCounter = eventId.eventCounter; cacheEventId.OperationCounter = eventId.operationCounter; cacheEventId.EventType = (Persistence.EventType)eventId.eventType; eventList.Add(cacheEventId, null); } cmdInfo.EventsList = eventList; cmdInfo.RequestId = syncEventsCommand.requestId.ToString(); return(cmdInfo); }