• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SectionKind类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SectionKind的典型用法代码示例。如果您正苦于以下问题:C# SectionKind类的具体用法?C# SectionKind怎么用?C# SectionKind使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SectionKind类属于命名空间,在下文中一共展示了SectionKind类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Elf32Section

 /// <summary>
 /// Initializes a new instance of the <see cref="Elf32Section"/> class.
 /// </summary>
 /// <param name="kind">The kind of the section.</param>
 /// <param name="name">The name.</param>
 /// <param name="virtualAddress">The virtualAddress.</param>
 public Elf32Section(SectionKind kind, string name, IntPtr virtualAddress)
     : base(kind, name, virtualAddress)
 {
     _header = new Elf32SectionHeader();
     _header.Name = Elf32StringTableSection.AddString(name);
     _sectionStream = new System.IO.MemoryStream();
 }
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:13,代码来源:Elf32Section.cs


示例2: LinkerSymbol

 internal LinkerSymbol(string name, SectionKind kind, uint alignment)
 {
     Name = name;
     Alignment = alignment;
     SectionKind = kind;
     LinkRequests = new List<LinkRequest>();
 }
开发者ID:modulexcite,项目名称:MOSA-Project,代码行数:7,代码来源:LinkerSymbol.cs


示例3: Section

 /// <summary>
 /// Initializes a new instance of the <see cref="Section"/> class.
 /// </summary>
 /// <param name="kind">The kind of the section.</param>
 /// <param name="name">The name.</param>
 /// <param name="virtualAddress">The virtualAddress.</param>
 public Section(SectionKind kind, string name, IntPtr virtualAddress)
     : base(kind, name, virtualAddress)
 {
     header = new SectionHeader();
     header.Name = StringTableSection.AddString(name);
     stream = new MemoryStream();
 }
开发者ID:pdelprat,项目名称:MOSA-Project,代码行数:13,代码来源:Section.cs


示例4: LinkerSection

 public LinkerSection(SectionKind sectionKind, uint alignment)
 {
     SectionKind = sectionKind;
     IsResolved = false;
     symbolLookup = new Dictionary<string, LinkerSymbol>();
     Symbols = new List<LinkerSymbol>();
     SectionAlignment = alignment;
     Size = 0;
 }
开发者ID:tgiphil,项目名称:MOSA-Project,代码行数:9,代码来源:LinkerSection.cs


示例5: SimLinkerSection

        /// <summary>
        /// Initializes a new instance of the <see cref="SimLinkerSection" /> class.
        /// </summary>
        /// <param name="kind">The kind of the section.</param>
        /// <param name="name">The name.</param>
        /// <param name="address">The address.</param>
        /// <param name="size">The size.</param>
        /// <param name="simAdapter">The sim adapter.</param>
        public SimLinkerSection(SectionKind kind, string name, uint address, uint size, ISimAdapter simAdapter)
            : base(kind, name, 0)
        {
            Memory = new byte[size];

            VirtualAddress = address;

            simAdapter.SimCPU.AddMemory(address, size, 1);

            stream = new MemoryStream(Memory, true);
        }
开发者ID:tea,项目名称:MOSA-Project,代码行数:19,代码来源:SimLinkerSection.cs


示例6: LinkerSymbol

        /// <summary>
        /// Initializes a new instance of the <see cref="LinkerSymbol"/> class.
        /// </summary>
        /// <param name="name">The name of the symbol.</param>
        /// <param name="section">The section holding the symbol.</param>
        /// <param name="sectionAddress">Holds the section relative address of the symbol.</param>
        /// <exception cref="T:System.ArgumentException"><paramref name="name"/> is empty.</exception>
        /// <exception cref="T:System.ArgumentNullException"><paramref name="name"/> is null.</exception>
        public LinkerSymbol(string name, SectionKind section, long sectionAddress)
        {
            Debug.Assert(!String.IsNullOrEmpty(name), @"LinkerSymbol requires a proper name.");
            if (name == null)
                throw new ArgumentNullException(@"name");
            if (name.Length == 0)
                throw new ArgumentException(@"Name can't be empty.", @"name");

            this.name = name;
            this.section = section;
            this.sectionAddress = sectionAddress;
        }
开发者ID:shanebrown99,项目名称:MOSA-Project,代码行数:20,代码来源:LinkerSymbol.cs


示例7: AllocateSpace

 private void AllocateSpace(RuntimeField field, SectionKind section, int size, int alignment)
 {
     using (Stream stream = linker.Allocate(field.ToString(), section, size, alignment))
     {
         if (field.RVA != 0)
         {
             InitializeStaticValueFromRVA(stream, size, field);
         }
         else
         {
             stream.WriteZeroBytes(size);
         }
     }
 }
开发者ID:toddhainsworth,项目名称:MOSA-Project,代码行数:14,代码来源:TypeLayoutStage.cs


示例8: AllocateSpace

 private void AllocateSpace(MosaField field, SectionKind section, int size, int alignment)
 {
     using (var stream = Compiler.Linker.Allocate(field.FullName, section, size, alignment))
     {
         if (field.Data != null)
         {
             stream.Write(field.Data, 0, size);
         }
         else
         {
             stream.WriteZeroBytes(size);
         }
     }
 }
开发者ID:tea,项目名称:MOSA-Project,代码行数:14,代码来源:TypeLayoutStage.cs


示例9: Allocate

 /// <summary>
 /// Allocates a symbol of the given name in the specified section.
 /// </summary>
 /// <param name="name">The name of the symbol.</param>
 /// <param name="section">The executable section to allocate From.</param>
 /// <param name="size">The number of bytes to allocate. If zero, indicates an unknown amount of memory is required.</param>
 /// <param name="alignment">The alignment. A value of zero indicates the use of a default alignment for the section.</param>
 /// <returns>
 /// A stream, which can be used to populate the section.
 /// </returns>
 public virtual Stream Allocate(string name, SectionKind section, int size, int alignment)
 {
     return null;
 }
开发者ID:hj1980,项目名称:Mosa,代码行数:14,代码来源:ObjectFileBuilderBase.cs


示例10: Section

 /// <summary>
 /// Initializes a new instance of the <see cref="Section"/> class.
 /// </summary>
 /// <param name="kind">The kind of the section.</param>
 /// <param name="name">The name of the section.</param>
 /// <param name="virtualAddress">The virtualAddress of the section.</param>
 public Section(SectionKind kind, string name, IntPtr virtualAddress)
     : base(kind, name, virtualAddress)
 {
     stream = new MemoryStream();
 }
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:11,代码来源:Section.cs


示例11: GetSectionLength

        private uint GetSectionLength(SectionKind sectionKind)
        {
            LinkerSection section;
            if (this.sections.TryGetValue(sectionKind, out section) == true && section.Length > 0)
                return (uint)section.Length;

            return 0;
        }
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:8,代码来源:PortableExecutableLinker.cs


示例12: GetSection

 protected LinkerSection GetSection(SectionKind kind)
 {
     return Sections[(int)kind];
 }
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:4,代码来源:BaseLinker.cs


示例13: Link

        public void Link(LinkType linkType, PatchType patchType, LinkerSymbol patchSymbol, int patchOffset, int relativeBase, string referenceSymbol, SectionKind patchRelativeBase, int referenceOffset)
        {
            var referenceObject = GetSymbol(referenceSymbol, patchRelativeBase);

            Link(linkType, patchType, patchSymbol, patchOffset, relativeBase, referenceObject, referenceOffset);
        }
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:6,代码来源:BaseLinker.cs


示例14: GetSymbol

 public LinkerSymbol GetSymbol(string name, SectionKind kind)
 {
     return CreateSymbol(name, kind, 0);
 }
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:4,代码来源:BaseLinker.cs


示例15: Allocate

 /// <summary>
 /// Allocates a symbol of the given name in the specified section.
 /// </summary>
 /// <param name="section">The executable section to allocate From.</param>
 /// <param name="size">The number of bytes to allocate. If zero, indicates an unknown amount of memory is required.</param>
 /// <param name="alignment">The alignment. A value of zero indicates the use of a default alignment for the section.</param>
 /// <returns>
 /// A stream, which can be used to populate the section.
 /// </returns>
 protected abstract Stream Allocate(SectionKind section, int size, int alignment);
开发者ID:davidbjornn,项目名称:MOSA-Project,代码行数:10,代码来源:AssemblyLinkerStage.cs


示例16: GetSection

 /// <summary>
 /// Gets the section.
 /// </summary>
 /// <param name="sectionKind">Kind of the section.</param>
 /// <returns>The section of the requested kind.</returns>
 public abstract LinkerSection GetSection(SectionKind sectionKind);
开发者ID:davidbjornn,项目名称:MOSA-Project,代码行数:6,代码来源:AssemblyLinkerStage.cs


示例17: Allocate

 /// <summary>
 /// Allocates a symbol of the given name in the specified section.
 /// </summary>
 /// <param name="section">The executable section to allocate From.</param>
 /// <param name="size">The number of bytes to allocate. If zero, indicates an unknown amount of memory is required.</param>
 /// <param name="alignment">The alignment. A value of zero indicates the use of a default alignment for the section.</param>
 /// <returns>
 /// A stream, which can be used to populate the section.
 /// </returns>
 protected override Stream Allocate(SectionKind section, int size, int alignment)
 {
     Section linkerSection = (Section)GetSection(section);
     return linkerSection.Allocate(size, alignment);
 }
开发者ID:grover,项目名称:MOSA-Project,代码行数:14,代码来源:Linker.cs


示例18: GetSection

 /// <summary>
 /// Retrieves a linker section by its type.
 /// </summary>
 /// <param name="sectionKind">The type of the section to retrieve.</param>
 /// <returns>The retrieved linker section.</returns>
 public override LinkerSection GetSection(SectionKind sectionKind)
 {
     return this.sections[(int)sectionKind];
 }
开发者ID:grover,项目名称:MOSA-Project,代码行数:9,代码来源:Linker.cs


示例19: Allocate

 /// <summary>
 /// Allocates memory in the specified section.
 /// </summary>
 /// <param name="symbol">The metadata member to allocate space for.</param>
 /// <param name="section">The executable section to allocate From.</param>
 /// <param name="size">The number of bytes to allocate. If zero, indicates an unknown amount of memory is required.</param>
 /// <param name="alignment">The alignment. A value of zero indicates the use of a default alignment for the section.</param>
 /// <returns>A stream, which can be used to populate the section.</returns>
 public Stream Allocate(RuntimeMember symbol, SectionKind section, int size, int alignment)
 {
     CheckImplementation();
     return this.implementation.Allocate(symbol, section, size, alignment);
 }
开发者ID:hj1980,项目名称:MOSA-Project,代码行数:13,代码来源:LinkerFormatSelector.cs


示例20: Allocate

 /// <summary>
 /// Allocates a symbol of the given name in the specified section.
 /// </summary>
 /// <param name="section">The executable section to allocate From.</param>
 /// <param name="size">The number of bytes to allocate. If zero, indicates an unknown amount of memory is required.</param>
 /// <param name="alignment">The alignment. A value of zero indicates the use of a default alignment for the section.</param>
 /// <returns>
 /// A stream, which can be used to populate the section.
 /// </returns>
 protected override System.IO.Stream Allocate(SectionKind section, int size, int alignment)
 {
     Elf64.Sections.Elf64Section linkerSection = (Elf64.Sections.Elf64Section)GetSection(section);
     return linkerSection.Allocate(size, alignment);
 }
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:14,代码来源:Elf64Linker.cs



注:本文中的SectionKind类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SectionViewModel类代码示例发布时间:2022-05-24
下一篇:
C# Section类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap