private int GetMetadataHeaderLength(string runtimeVersion) { return(20 + ImageWriter.GetZeroTerminatedStringLength(runtimeVersion) + 12 + 20 + (this.metadata.user_string_heap.IsEmpty ? 0 : 12) + 16 + (this.metadata.blob_heap.IsEmpty ? 0 : 16)); }
private static byte[] GetZeroTerminatedString(string @string) { return(ImageWriter.GetString(@string, ImageWriter.GetZeroTerminatedStringLength(@string))); }