/// <summary> /// 转文本输出 /// </summary> protected override void toWriteDataString(DataWriter writer) { writer.writeTabs(); writer.sb.Append("id"); writer.sb.Append(':'); writer.sb.Append(this.id); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("price"); writer.sb.Append(':'); writer.sb.Append(this.price); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("days"); writer.sb.Append(':'); writer.sb.Append("Queue<CountData>"); if (this.days != null) { SQueue <CountData> daysT = this.days; int daysLen = daysT.size(); writer.sb.Append('('); writer.sb.Append(daysLen); writer.sb.Append(')'); writer.writeEnter(); writer.writeLeftBrace(); for (int daysI = 0; daysI < daysLen; ++daysI) { CountData daysV = daysT.get(daysI); writer.writeTabs(); writer.sb.Append(daysI); writer.sb.Append(':'); if (daysV != null) { daysV.writeDataString(writer); } else { writer.sb.Append("CountData=null"); } writer.writeEnter(); } writer.writeRightBrace(); } else { writer.sb.Append("=null"); } writer.writeEnter(); }
/// <summary> /// 是否数据一致 /// </summary> protected override bool toDataEquals(BaseData data) { ChatChannelData mData = (ChatChannelData)data; if (mData.queue != null) { if (this.queue == null) { return(false); } if (this.queue.size() != mData.queue.size()) { return(false); } SQueue <RoleChatData> queueT = this.queue; SQueue <RoleChatData> queueR = mData.queue; int queueLen = queueT.size(); for (int queueI = 0; queueI < queueLen; ++queueI) { RoleChatData queueU = queueT.get(queueI); RoleChatData queueV = queueR.get(queueI); if (queueV != null) { if (queueU == null) { return(false); } if (!queueU.dataEquals(queueV)) { return(false); } } else { if (queueU != null) { return(false); } } } } else { if (this.queue != null) { return(false); } } return(true); }
/// <summary> /// 转文本输出 /// </summary> protected override void toWriteDataString(DataWriter writer) { writer.writeTabs(); writer.sb.Append("queue"); writer.sb.Append(':'); writer.sb.Append("Queue<RoleChatData>"); if (this.queue != null) { SQueue <RoleChatData> queueT = this.queue; int queueLen = queueT.size(); writer.sb.Append('('); writer.sb.Append(queueLen); writer.sb.Append(')'); writer.writeEnter(); writer.writeLeftBrace(); for (int queueI = 0; queueI < queueLen; ++queueI) { RoleChatData queueV = queueT.get(queueI); writer.writeTabs(); writer.sb.Append(queueI); writer.sb.Append(':'); if (queueV != null) { queueV.writeDataString(writer); } else { writer.sb.Append("RoleChatData=null"); } writer.writeEnter(); } writer.writeRightBrace(); } else { writer.sb.Append("=null"); } writer.writeEnter(); }
/// <summary> /// 是否数据一致 /// </summary> protected override bool toDataEquals(BaseData data) { AuctionItemRecordData mData = (AuctionItemRecordData)data; if (this.id != mData.id) { return(false); } if (this.price != mData.price) { return(false); } if (mData.days != null) { if (this.days == null) { return(false); } if (this.days.size() != mData.days.size()) { return(false); } SQueue <CountData> daysT = this.days; SQueue <CountData> daysR = mData.days; int daysLen = daysT.size(); for (int daysI = 0; daysI < daysLen; ++daysI) { CountData daysU = daysT.get(daysI); CountData daysV = daysR.get(daysI); if (daysV != null) { if (daysU == null) { return(false); } if (!daysU.dataEquals(daysV)) { return(false); } } else { if (daysU != null) { return(false); } } } } else { if (this.days != null) { return(false); } } return(true); }
/// <summary> /// 是否数据一致 /// </summary> protected override bool toDataEquals(BaseData data) { SystemPartData mData = (SystemPartData)data; if (mData.version != null) { if (this.version == null) { return(false); } if (!this.version.dataEquals(mData.version)) { return(false); } } else { if (this.version != null) { return(false); } } if (this.serverTime != mData.serverTime) { return(false); } if (this.isBlock != mData.isBlock) { return(false); } if (this.flowStep != mData.flowStep) { return(false); } if (mData.keepSave != null) { if (this.keepSave == null) { return(false); } if (!this.keepSave.dataEquals(mData.keepSave)) { return(false); } } else { if (this.keepSave != null) { return(false); } } if (mData.clientRandomSeeds != null) { if (this.clientRandomSeeds == null) { return(false); } if (this.clientRandomSeeds.Length != mData.clientRandomSeeds.Length) { return(false); } int[] clientRandomSeedsT = this.clientRandomSeeds; int[] clientRandomSeedsR = mData.clientRandomSeeds; int clientRandomSeedsLen = clientRandomSeedsT.Length; for (int clientRandomSeedsI = 0; clientRandomSeedsI < clientRandomSeedsLen; ++clientRandomSeedsI) { int clientRandomSeedsU = clientRandomSeedsT[clientRandomSeedsI]; int clientRandomSeedsV = clientRandomSeedsR[clientRandomSeedsI]; if (clientRandomSeedsU != clientRandomSeedsV) { return(false); } } } else { if (this.clientRandomSeeds != null) { return(false); } } if (this.clientRandomSeedIndex != mData.clientRandomSeedIndex) { return(false); } if (this.clientOfflineWorkReceiveIndex != mData.clientOfflineWorkReceiveIndex) { return(false); } if (mData.gmCommandSet != null) { if (this.gmCommandSet == null) { return(false); } if (this.gmCommandSet.size() != mData.gmCommandSet.size()) { return(false); } SSet <string> gmCommandSetR = mData.gmCommandSet; if (!this.gmCommandSet.isEmpty()) { string[] gmCommandSetVKeys = this.gmCommandSet.getKeys(); for (int gmCommandSetVI = gmCommandSetVKeys.Length - 1; gmCommandSetVI >= 0; --gmCommandSetVI) { if (gmCommandSetVKeys[gmCommandSetVI] != null) { string gmCommandSetV = gmCommandSetVKeys[gmCommandSetVI]; if (!gmCommandSetR.contains(gmCommandSetV)) { return(false); } } } } } else { if (this.gmCommandSet != null) { return(false); } } if (this.gmType != mData.gmType) { return(false); } if (this.serverBornCode != mData.serverBornCode) { return(false); } if (this.serverStartTime != mData.serverStartTime) { return(false); } if (mData.logQueue != null) { if (this.logQueue == null) { return(false); } if (this.logQueue.size() != mData.logQueue.size()) { return(false); } SQueue <InfoLogData> logQueueT = this.logQueue; SQueue <InfoLogData> logQueueR = mData.logQueue; int logQueueLen = logQueueT.size(); for (int logQueueI = 0; logQueueI < logQueueLen; ++logQueueI) { InfoLogData logQueueU = logQueueT.get(logQueueI); InfoLogData logQueueV = logQueueR.get(logQueueI); if (logQueueV != null) { if (logQueueU == null) { return(false); } if (!logQueueU.dataEquals(logQueueV)) { return(false); } } else { if (logQueueU != null) { return(false); } } } } else { if (this.logQueue != null) { return(false); } } if (this.nextDailyTime != mData.nextDailyTime) { return(false); } if (mData.createDate != null) { if (this.createDate == null) { return(false); } if (!this.createDate.dataEquals(mData.createDate)) { return(false); } } else { if (this.createDate != null) { return(false); } } if (this.clientRandomSeedKey != mData.clientRandomSeedKey) { return(false); } return(true); }
/// <summary> /// 转文本输出 /// </summary> protected override void toWriteDataString(DataWriter writer) { writer.writeTabs(); writer.sb.Append("version"); writer.sb.Append(':'); if (this.version != null) { this.version.writeDataString(writer); } else { writer.sb.Append("SaveVersionData=null"); } writer.writeEnter(); writer.writeTabs(); writer.sb.Append("serverTime"); writer.sb.Append(':'); writer.sb.Append(this.serverTime); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("isBlock"); writer.sb.Append(':'); writer.sb.Append(this.isBlock); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("flowStep"); writer.sb.Append(':'); writer.sb.Append(this.flowStep); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("keepSave"); writer.sb.Append(':'); if (this.keepSave != null) { this.keepSave.writeDataString(writer); } else { writer.sb.Append("KeepSaveData=null"); } writer.writeEnter(); writer.writeTabs(); writer.sb.Append("clientRandomSeeds"); writer.sb.Append(':'); writer.sb.Append("Array<int>"); if (this.clientRandomSeeds != null) { int[] clientRandomSeedsT = this.clientRandomSeeds; int clientRandomSeedsLen = clientRandomSeedsT.Length; writer.sb.Append('('); writer.sb.Append(clientRandomSeedsLen); writer.sb.Append(')'); writer.writeEnter(); writer.writeLeftBrace(); for (int clientRandomSeedsI = 0; clientRandomSeedsI < clientRandomSeedsLen; ++clientRandomSeedsI) { int clientRandomSeedsV = clientRandomSeedsT[clientRandomSeedsI]; writer.writeTabs(); writer.sb.Append(clientRandomSeedsI); writer.sb.Append(':'); writer.sb.Append(clientRandomSeedsV); writer.writeEnter(); } writer.writeRightBrace(); } else { writer.sb.Append("=null"); } writer.writeEnter(); writer.writeTabs(); writer.sb.Append("clientRandomSeedIndex"); writer.sb.Append(':'); writer.sb.Append(this.clientRandomSeedIndex); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("clientOfflineWorkReceiveIndex"); writer.sb.Append(':'); writer.sb.Append(this.clientOfflineWorkReceiveIndex); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("gmCommandSet"); writer.sb.Append(':'); writer.sb.Append("Set<string>"); if (this.gmCommandSet != null) { writer.sb.Append('('); writer.sb.Append(this.gmCommandSet.size()); writer.sb.Append(')'); writer.writeEnter(); writer.writeLeftBrace(); if (!this.gmCommandSet.isEmpty()) { string[] gmCommandSetVKeys = this.gmCommandSet.getKeys(); for (int gmCommandSetVI = gmCommandSetVKeys.Length - 1; gmCommandSetVI >= 0; --gmCommandSetVI) { if (gmCommandSetVKeys[gmCommandSetVI] != null) { string gmCommandSetV = gmCommandSetVKeys[gmCommandSetVI]; writer.writeTabs(); writer.sb.Append(gmCommandSetV); writer.writeEnter(); } } } writer.writeRightBrace(); } else { writer.sb.Append("=null"); } writer.writeEnter(); writer.writeTabs(); writer.sb.Append("gmType"); writer.sb.Append(':'); writer.sb.Append(this.gmType); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("serverBornCode"); writer.sb.Append(':'); writer.sb.Append(this.serverBornCode); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("serverStartTime"); writer.sb.Append(':'); writer.sb.Append(this.serverStartTime); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("logQueue"); writer.sb.Append(':'); writer.sb.Append("Queue<InfoLogData>"); if (this.logQueue != null) { SQueue <InfoLogData> logQueueT = this.logQueue; int logQueueLen = logQueueT.size(); writer.sb.Append('('); writer.sb.Append(logQueueLen); writer.sb.Append(')'); writer.writeEnter(); writer.writeLeftBrace(); for (int logQueueI = 0; logQueueI < logQueueLen; ++logQueueI) { InfoLogData logQueueV = logQueueT.get(logQueueI); writer.writeTabs(); writer.sb.Append(logQueueI); writer.sb.Append(':'); if (logQueueV != null) { logQueueV.writeDataString(writer); } else { writer.sb.Append("InfoLogData=null"); } writer.writeEnter(); } writer.writeRightBrace(); } else { writer.sb.Append("=null"); } writer.writeEnter(); writer.writeTabs(); writer.sb.Append("nextDailyTime"); writer.sb.Append(':'); writer.sb.Append(this.nextDailyTime); writer.writeEnter(); writer.writeTabs(); writer.sb.Append("createDate"); writer.sb.Append(':'); if (this.createDate != null) { this.createDate.writeDataString(writer); } else { writer.sb.Append("DateData=null"); } writer.writeEnter(); writer.writeTabs(); writer.sb.Append("clientRandomSeedKey"); writer.sb.Append(':'); writer.sb.Append(this.clientRandomSeedKey); writer.writeEnter(); }