Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ObjectFile"/> class with the specified name.
        /// </summary>
        /// <param name="format">The format of the object file.</param>
        /// <param name="architecture">The architecture.</param>
        /// <param name="name">The name of the object file; or <see langword="null"/> to specify no name.</param>
        public ObjectFile(IObjectFileFormat format, IArchitecture architecture, string name)
        {
            #region Contract
            Contract.Requires<ArgumentNullException>(format != null);
            Contract.Requires<ArgumentNullException>(architecture != null);
            Contract.Requires<ArgumentException>(format.IsSupportedArchitecture(architecture));
            #endregion

            this.format = format;
            this.architecture = architecture;
            this.sections = new SectionCollection(this);
            this.AssociatedSymbol = new Symbol(SymbolType.None, name);
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ObjectFile"/> class with the specified name.
        /// </summary>
        /// <param name="format">The format of the object file.</param>
        /// <param name="architecture">The architecture.</param>
        /// <param name="name">The name of the object file; or <see langword="null"/> to specify no name.</param>
        public ObjectFile(IObjectFileFormat format, IArchitecture architecture, string name)
        {
            #region Contract
            Contract.Requires <ArgumentNullException>(format != null);
            Contract.Requires <ArgumentNullException>(architecture != null);
            Contract.Requires <ArgumentException>(format.IsSupportedArchitecture(architecture));
            #endregion

            this.format           = format;
            this.architecture     = architecture;
            this.sections         = new SectionCollection(this);
            this.AssociatedSymbol = new Symbol(SymbolType.None, name);
        }
 public ObjectFileMock(IObjectFileFormat format, IArchitecture architecture)
     : base(format, architecture, null)
 {
 }
 public ObjectFileMock(IObjectFileFormat format, IArchitecture architecture)
     : base(format, architecture, null)
 {
 }