/// <summary> /// Lists all typed streams. /// </summary> /// <param name="block">The block.</param> /// <returns></returns> public static unsafe StringCollection ListAllTypedStreams(Block block, Journalling.IReadService service) { StringCollection collection = new StringCollection(); fixed(byte *p = block.Data) { NodeVersionHeader *header = (NodeVersionHeader *)p; TSData * data = (TSData *)&header->TypedStreamData[0]; // We go through all. for (uint i = 0; i < header->StreamCount; i++) { Block tsHeader = service.Read(BlockType.TypedStreamHeader, data[i].Address); fixed(byte *pp = tsHeader.Data) { TypedStreamHeader *h = (TypedStreamHeader *)pp; collection.Add(new string(h->Type)); } } } return(collection); }
/// <summary> /// Lists all typed streams. /// </summary> /// <param name="block">The block.</param> /// <returns></returns> public static unsafe List <ulong> ListAllTypedStreamsAsAddresses(Block block, Journalling.IReadService service) { List <ulong> collection = new List <ulong>(); fixed(byte *p = block.Data) { NodeVersionHeader *header = (NodeVersionHeader *)p; TSData * data = (TSData *)&header->TypedStreamData[0]; // We go through all. for (uint i = 0; i < header->StreamCount; i++) { collection.Add(data[i].Address); } } return(collection); }