/// <summary> /// Do the accumulation for a root object. /// </summary> /// <param name="nTObject"></param> private void InternalAccumulateHash(ROOTNET.Interface.NTObject nTObject) { if (nTObject == null) { throw new ArgumentNullException("The argument to InternalAccumulateHash was null - not allowed."); } // Write it to a ROOT buffer using (var buffer = new ROOTNET.NTBufferFile(ROOTNET.Interface.NTBuffer.EMode.kWrite)) { buffer.WriteObject(nTObject); //var result = buffer.Buffer().as_array(buffer.Length()); var result = BufferAsBytes(buffer); // And update the hash value we are holding onto. ComputeHash(result); } }
/// <summary> /// Do the accumulation for a root object. /// </summary> /// <param name="nTObject"></param> private void InternalAccumulateHash(ROOTNET.Interface.NTObject nTObject) { if (nTObject == null) throw new ArgumentNullException("The argument to InternalAccumulateHash was null - not allowed."); // Write it to a ROOT buffer var buffer = new ROOTNET.NTBufferFile(ROOTNET.Interface.NTBuffer.EMode.kWrite); buffer.WriteObject(nTObject); //var result = buffer.Buffer().as_array(buffer.Length()); var result = BufferAsBytes(buffer); // And update the hash value we are holding onto. ComputeHash(result); }