Esempio n. 1
0
 /// <summary>
 /// Creates a WebAssembly file from the given list of sections.
 /// </summary>
 /// <param name="header">The WebAssembly version header.</param>
 /// <param name="sections">The list of all sections in the WebAssembly file.</param>
 public WasmFile(VersionHeader header, IEnumerable <Section> sections)
 {
     this.Header   = header;
     this.Sections = new List <Section>(sections);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BadHeaderException"/> class.
 /// </summary>
 /// <param name="header">The version header.</param>
 /// <param name="message">The error message.</param>
 public BadHeaderException(VersionHeader header, string message)
     : base(message)
 {
     this.Header = header;
 }
Esempio n. 3
0
 /// <summary>
 /// Creates an empty WebAssembly file with the given header.
 /// </summary>
 /// <param name="header">The WebAssembly version header.</param>
 public WasmFile(VersionHeader header)
     : this(header, Enumerable.Empty <Section>())
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Wasm.Binary.BadHeaderException"/> class.
 /// </summary>
 /// <param name="Header">The version header.</param>
 /// <param name="Message">The error message.</param>
 public BadHeaderException(VersionHeader Header, string Message)
     : base(Message)
 {
     this.Header = Header;
 }