// dnlib: See LICENSE.txt for more info using System.Collections.Generic; namespace dnlib.DotNet.Writer { /// /// Interface to get and set raw heap data. Implemented by the offset heaps: #Strings, /// #GUID, #Blob, and #US. /// /// Type of cooked data public interface IOffsetHeap { /// /// Gets the size of the data as raw data when written to the heap /// /// The data /// Size of the data as raw data when written to the heap int GetRawDataSize(TValue data); /// /// Overrides what value should be written to the heap. /// /// Offset of value. Must match an offset returned by /// /// The new raw data. The size must match the raw size exactly. void SetRawData(uint offset, byte[] rawData); /// /// Gets all inserted raw data and their offsets. The returned array /// is owned by the caller. /// /// An enumerable of all raw data and their offsets IEnumerable> GetAllRawData(); } }