Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Nefs20Header"/> class.
        /// </summary>
        /// <param name="intro">Header intro.</param>
        /// <param name="toc">Header intro table of contents.</param>
        /// <param name="items">List of items.</param>
        public Nefs20Header(NefsHeaderIntro intro, Nefs20HeaderIntroToc toc, NefsItemList items)
        {
            this.Intro           = intro ?? throw new ArgumentNullException(nameof(intro));
            this.TableOfContents = toc ?? throw new ArgumentNullException(nameof(toc));

            this.Part3 = new NefsHeaderPart3(items);
            this.Part4 = new Nefs20HeaderPart4(items);

            this.Part1 = new NefsHeaderPart1(items, this.Part4);
            this.Part2 = new NefsHeaderPart2(items, this.Part3);
            this.Part5 = new NefsHeaderPart5();
            this.Part6 = new Nefs20HeaderPart6(items);
            this.Part7 = new NefsHeaderPart7(items);
            this.Part8 = new NefsHeaderPart8(intro.HeaderSize - toc.OffsetToPart8);
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Nefs20Header"/> class.
 /// </summary>
 /// <param name="intro">Header intro.</param>
 /// <param name="toc">Header intro table of contents.</param>
 /// <param name="part1">Header part 1.</param>
 /// <param name="part2">Header part 2.</param>
 /// <param name="part3">Header part 3.</param>
 /// <param name="part4">Header part 4.</param>
 /// <param name="part5">Header part 5.</param>
 /// <param name="part6">Header part 6.</param>
 /// <param name="part7">Header part 7.</param>
 /// <param name="part8">Header part 8.</param>
 public Nefs20Header(
     NefsHeaderIntro intro,
     Nefs20HeaderIntroToc toc,
     NefsHeaderPart1 part1,
     NefsHeaderPart2 part2,
     NefsHeaderPart3 part3,
     Nefs20HeaderPart4 part4,
     NefsHeaderPart5 part5,
     Nefs20HeaderPart6 part6,
     NefsHeaderPart7 part7,
     NefsHeaderPart8 part8)
 {
     this.Intro           = intro ?? throw new ArgumentNullException(nameof(intro));
     this.TableOfContents = toc ?? throw new ArgumentNullException(nameof(toc));
     this.Part1           = part1 ?? throw new ArgumentNullException(nameof(part1));
     this.Part2           = part2 ?? throw new ArgumentNullException(nameof(part2));
     this.Part3           = part3 ?? throw new ArgumentNullException(nameof(part3));
     this.Part4           = part4 ?? throw new ArgumentNullException(nameof(part4));
     this.Part5           = part5 ?? throw new ArgumentNullException(nameof(part5));
     this.Part6           = part6 ?? throw new ArgumentNullException(nameof(part6));
     this.Part7           = part7 ?? throw new ArgumentNullException(nameof(part7));
     this.Part8           = part8 ?? throw new ArgumentNullException(nameof(part8));
 }