public bool Read(MemoryStream pStream) { EMessageKeyType type = EMessageKeyType.Variable; uint tag = 0; while (pStream.ReadKey(out type, out tag)) { switch (tag) { case ImportedServiceHashTag: { MemoryStream stream = null; if (!pStream.ReadPrefixed(out stream)) return false; uint hash = 0; while (stream.ReadFixed32(out hash)) mImportedServiceHashes.Add(hash); break; } case ExportedServiceTag: { BoundService boundService = new BoundService(); if (!pStream.ReadPackable(boundService)) return false; mExportedServices.Add(boundService); break; } default: return false; } } return true; }
public bool Read(MemoryStream pStream) { EMessageKeyType type = EMessageKeyType.Variable; uint tag = 0; while (pStream.ReadKey(out type, out tag)) { switch (tag) { case ImportedServiceHashTag: { MemoryStream stream = null; if (!pStream.ReadPrefixed(out stream)) { return(false); } uint hash = 0; while (stream.ReadFixed32(out hash)) { mImportedServiceHashes.Add(hash); } break; } case ExportedServiceTag: { BoundService boundService = new BoundService(); if (!pStream.ReadPackable(boundService)) { return(false); } mExportedServices.Add(boundService); break; } default: return(false); } } return(true); }