public PropertyContext(ulong nid, PSTFile pst) { var bytes = BlockBO.GetNodeData(nid, pst); var HN = new HN(bytes); this.BTH = new BTH(HN); this.Properties = this.BTH.GetExchangeProperties(); }
public PropertyContext(NodeDataDTO data) { var HN = new HN(data); BTH = new BTH(HN); Properties = BTH.GetExchangeProperties(); }
public BTH(HN heapNode, HID userRoot = null) { this.HeapNode = heapNode; var bthHeaderHID = userRoot ?? heapNode.HeapNodes[0].Header.UserRoot; this.Header = new BTHHEADER(HeapNodeBO.GetHNHIDBytes(heapNode, bthHeaderHID)); this.Root = new BTHIndexNode(this.Header.BTreeRoot, this, (int)this.Header.NumLevels); this.Properties = new Dictionary <byte[], BTHDataEntry>(new ArrayUtilities.ByteArrayComparer()); var stack = new Stack <BTHIndexNode>(); stack.Push(this.Root); while (stack.Count > 0) { var cur = stack.Pop(); if (cur.Data != null) { foreach (var entry in cur.Data.DataEntries) { this.Properties.Add(entry.Key, entry); } } if (cur.Children != null) { foreach (var child in cur.Children) { stack.Push(child); } } } }
public BTH(HN heapNode, HID userRoot = null) { this.HeapNode = heapNode; var bthHeaderHID = userRoot ?? heapNode.HeapNodes[0].Header.UserRoot; this.Header = new BTHHEADER(HeapNodeBO.GetHNHIDBytes(heapNode, bthHeaderHID)); this.Root = new BTHIndexNode(this.Header.BTreeRoot, this, (int)this.Header.NumLevels); this.Properties = new Dictionary<byte[], BTHDataEntry>(new ArrayUtilities.ByteArrayComparer()); var stack = new Stack<BTHIndexNode>(); stack.Push(this.Root); while (stack.Count > 0) { var cur = stack.Pop(); if (cur.Data != null) foreach (var entry in cur.Data.DataEntries) this.Properties.Add(entry.Key, entry); if (cur.Children != null) foreach (var child in cur.Children) stack.Push(child); } }
public TableContext(NodeDataDTO nodeData) { this.NodeData = nodeData; this.HeapNode = new HN(this.NodeData); var tcinfoHID = this.HeapNode.HeapNodes[0].Header.UserRoot; var tcinfoHIDbytes = this.HeapNode.GetHIDBytes(tcinfoHID); this.TCHeader = new TCINFOHEADER(tcinfoHIDbytes.Data); this.RowIndexBTH = new BTH(this.HeapNode, this.TCHeader.RowIndexLocation); this.ReverseRowIndex = new Dictionary<uint, uint>(); foreach (var prop in this.RowIndexBTH.Properties) { var temp = BitConverter.ToUInt32(prop.Value.Data, 0); this.ReverseRowIndex.Add(temp, BitConverter.ToUInt32(prop.Key, 0)); } this.RowMatrix = new TCRowMatrix(this, this.RowIndexBTH); }
public TableContext(NodeDataDTO nodeData) { this.NodeData = nodeData; this.HeapNode = new HN(this.NodeData); var tcinfoHID = this.HeapNode.HeapNodes[0].Header.UserRoot; var tcinfoHIDbytes = this.HeapNode.GetHIDBytes(tcinfoHID); this.TCHeader = new TCINFOHEADER(tcinfoHIDbytes.Data); this.RowIndexBTH = new BTH(this.HeapNode, this.TCHeader.RowIndexLocation); this.ReverseRowIndex = new Dictionary <uint, uint>(); foreach (var prop in this.RowIndexBTH.Properties) { var temp = BitConverter.ToUInt32(prop.Value.Data, 0); this.ReverseRowIndex.Add(temp, BitConverter.ToUInt32(prop.Key, 0)); } this.RowMatrix = new TCRowMatrix(this, this.RowIndexBTH); }
public static HNDataDTO GetHNHIDBytes(HN heapNode, HID hid) { var hnblock = heapNode.HeapNodes[(int)hid.hidBlockIndex]; return(hnblock.GetAllocation(hid)); }
public PropertyContext(NodeDataDTO data) { var HN = new HN(data); this.BTH = new BTH(HN); this.Properties = this.BTH.GetExchangeProperties(); }
public static HNDataDTO GetHNHIDBytes(HN heapNode, HID hid) { var hnblock = heapNode.HeapNodes[(int)hid.hidBlockIndex]; return hnblock.GetAllocation(hid); }