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

C# CacheBase类代码示例

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

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



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

示例1: BitmapData

            public BitmapData(CacheBase Cache, int Address)
            {
                EndianReader Reader = Cache.Reader;
                Reader.SeekTo(Address);

                Class = Reader.ReadString(4);
                Width = Reader.ReadInt16();
                Height = Reader.ReadInt16();
                Depth = Reader.ReadByte();
                Flags = new Bitmask(Reader.ReadByte());
                Type = (BitmapType)Reader.ReadByte();
                Reader.ReadByte(); //dunno what this is
                Format = (BitmapFormat)Reader.ReadInt16();

                if ((int)Format > 31) //change to match defined format list
                    Format -= 5;

                MoreFlags = new Bitmask(Reader.ReadInt16());
                RegX = Reader.ReadInt16();
                RegY = Reader.ReadInt16();
                MipmapCount = Reader.ReadByte();
                Reader.ReadByte();
                InterleavedIndex = Reader.ReadByte();
                Index2 = Reader.ReadByte();
                PixelsOffset = Reader.ReadInt32();
                PixelsSize = Reader.ReadInt32();
            }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:27,代码来源:bitmap.cs


示例2: LocalCache

        /// <summary>
        /// Overloaded constructor. Takes the properties as a map.
        /// </summary>
        /// <param name="cacheSchemes">collection of cache schemes (config properties).</param>
        /// <param name="properties">properties collection for this cache.</param>
        /// <param name="listener">cache events listener</param>
        /// <param name="timeSched">scheduler to use for periodic tasks</param>
        public LocalCache(IDictionary cacheClasses, CacheBase parentCache, IDictionary properties, ICacheEventsListener listener, CacheRuntimeContext context)

            : base(properties, parentCache, listener, context)
        {
            _stats.ClassName = "local-cache";
            Initialize(cacheClasses, properties);
        }
开发者ID:christrotter,项目名称:NCache,代码行数:14,代码来源:LocalCache.cs


示例3: ArgumentBlock

            public ArgumentBlock(CacheBase Cache, int Address)
            {
                EndianReader Reader = Cache.Reader;
                Reader.SeekTo(Address);

                Argument = Cache.Strings.GetItemByID(Reader.ReadInt32());
            }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:7,代码来源:render_method_template.cs


示例4: ShaderProperties

            public ShaderProperties(CacheBase Cache, int Address)
            {
                EndianReader Reader = Cache.Reader;
                Reader.SeekTo(Address);

                Reader.SeekTo(Address + 12);
                TemplateTagID = Reader.ReadInt32();

                #region ShaderProperties Chunk
                Reader.SeekTo(Address + 16);
                int iCount = Reader.ReadInt32();
                int iOffset = Reader.ReadInt32() - Cache.Magic;
                ShaderMaps = new List<rmsh.ShaderProperties.ShaderMap>();
                for (int i = 0; i < iCount; i++)
                    ShaderMaps.Add(new ShaderMap(Cache, iOffset + 24 * i));
                #endregion

                #region Tiling Chunk
                Reader.SeekTo(Address + 28);
                iCount = Reader.ReadInt32();
                iOffset = Reader.ReadInt32() - Cache.Magic;
                Tilings = new List<rmsh.ShaderProperties.Tiling>();
                for (int i = 0; i < iCount; i++)
                    Tilings.Add(new Tiling(Cache, iOffset + 16 * i));
                #endregion
            }
开发者ID:XeCREATURE,项目名称:TagTool,代码行数:26,代码来源:shader.cs


示例5: bitm

        //H2X, H3B, H3R, ODST, HRB, HRR, H4R
        public static bitmap bitm(CacheBase Cache, CacheBase.IndexItem Tag)
        {
            switch (Cache.Version)
            {
                case DefinitionSet.Halo1PC:
                    return new Halo1PC.bitmap(Cache, Tag.Offset);

                case DefinitionSet.Halo1CE:
                    return new Halo1CE.bitmap(Cache, Tag.Offset);

                case DefinitionSet.Halo2Xbox:
                    return new Halo2Xbox.bitmap(Cache, Tag.Offset);

                case DefinitionSet.Halo3Beta:
                case DefinitionSet.Halo3Retail:
                case DefinitionSet.Halo3ODST:
                    return new Halo3Beta.bitmap(Cache, Tag.Offset);

                case DefinitionSet.HaloReachBeta:
                    return new ReachBeta.bitmap(Cache, Tag.Offset);

                case DefinitionSet.HaloReachRetail:
                case DefinitionSet.Halo4Beta:
                case DefinitionSet.Halo4Retail:
                    return new ReachRetail.bitmap(Cache, Tag.Offset);

                default:
                    throw new NotSupportedException(errorMessage.Replace("----", "bitm"));
            }
        }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:31,代码来源:DefinitionsManager.cs


示例6: mode

        //H2X, H3B, H3R, ODST, HRB, HRR, H4R
        public static render_model mode(CacheBase Cache, CacheBase.IndexItem Tag)
        {
            switch (Cache.Version)
            {
                case DefinitionSet.Halo1PC:
                case DefinitionSet.Halo1CE:
                case DefinitionSet.Halo1AE:
                    return new Halo1PC.gbxmodel(Cache, Tag.Offset);

                case DefinitionSet.Halo2Xbox:
                    return new Halo2Xbox.render_model(Cache, Tag.Offset);

                case DefinitionSet.Halo3Beta:
                case DefinitionSet.Halo3Retail:
                    return new Halo3Beta.render_model(Cache, Tag.Offset);

                case DefinitionSet.Halo3ODST:
                    return new Halo3ODST.render_model(Cache, Tag.Offset);

                case DefinitionSet.HaloReachBeta:
                    return new ReachBeta.render_model(Cache, Tag.Offset);

                case DefinitionSet.HaloReachRetail:
                    return new ReachRetail.render_model(Cache, Tag.Offset);

                case DefinitionSet.Halo4Beta:
                    return new Halo4Beta.render_model(Cache, Tag.Offset);

                case DefinitionSet.Halo4Retail:
                    return new Halo4Retail.render_model(Cache, Tag.Offset);

                default:
                    throw new NotSupportedException(errorMessage.Replace("----", "mode"));
            }
        }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:36,代码来源:DefinitionsManager.cs


示例7: UsageBlock

            public UsageBlock(CacheBase Cache, int Address)
            {
                EndianReader Reader = Cache.Reader;
                Reader.SeekTo(Address);

                Usage = Cache.Strings.GetItemByID(Reader.ReadInt32());
            }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:7,代码来源:render_method_template.cs


示例8: RawEntry

            public RawEntry(CacheBase Cache, int Address)
            {
                EndianReader Reader = Cache.Reader;
                Reader.SeekTo(Address);

                Reader.SeekTo(Address + 12);
                TagID = Reader.ReadInt32();
                RawID = Reader.ReadInt32();
                FixupOffset = Reader.ReadInt32();
                FixupSize = Reader.ReadInt32();
                Reader.ReadInt32();
                LocationType = Reader.ReadInt16();
                SegmentIndex = Reader.ReadInt16();
                Reader.ReadInt32();

                #region Resource Fixups
                Reader.SeekTo(Address + 40);
                int iCount = Reader.ReadInt32();
                int iOffset = Reader.ReadInt32() - Cache.Magic;
                for (int i = 0; i < iCount; i++)
                    Fixups.Add(new ResourceFixup(Cache, iOffset + 8 * i));
                #endregion

                #region Resource Definition Fixups
                Reader.SeekTo(Address + 52);
                iCount = Reader.ReadInt32();
                iOffset = Reader.ReadInt32() - Cache.Magic;
                for (int i = 0; i < iCount; i++)
                    DefinitionFixups.Add(new ResourceDefinitionFixup(Cache, iOffset + 8 * i));
                #endregion
            }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:31,代码来源:cache_file_resource_gestalt.cs


示例9: cache_file_resource_layout_table

        public cache_file_resource_layout_table(CacheBase Cache, int Address)
        {
            EndianReader Reader = Cache.Reader;
            Reader.SeekTo(Address);

            #region Shared Cache Block
            Reader.SeekTo(Address + 12);
            int iCount = Reader.ReadInt32();
            int iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                SharedCaches.Add(new SharedCache(Cache, iOffset + 264 * i));
            #endregion

            #region Page Block
            Reader.SeekTo(Address + 24);
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                Pages.Add(new Page(Cache, iOffset + 88 * i));
            #endregion

            #region Segment Block
            Reader.SeekTo(Address + 48);
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                Segments.Add(new Segment(Cache, iOffset + 24 * i));
            #endregion
        }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:29,代码来源:cache_file_resource_layout_table.cs


示例10: IndexedLocalCache

        /// <summary>
        /// Overloaded constructor. Takes the properties as a map.
        /// </summary>
        /// <param name="cacheSchemes">collection of cache schemes (config properties).</param>
        /// <param name="properties">properties collection for this cache.</param>
        /// <param name="listener">cache events listener</param>
        /// <param name="timeSched">scheduler to use for periodic tasks</param>
        public IndexedLocalCache(IDictionary cacheClasses, CacheBase parentCache, IDictionary properties, ICacheEventsListener listener, CacheRuntimeContext context)
            : base(cacheClasses, parentCache, properties, listener, context)
        {
            IDictionary props = null;
            if (properties.Contains("indexes"))
            {
                props = properties["indexes"] as IDictionary;
            }

            _queryIndexManager = new QueryIndexManager(props, this, _context.CacheRoot.Name);
            if (!_queryIndexManager.Initialize()) _queryIndexManager = null;


            //+Numan16122014
            _cacheStore.ISizableQueryIndexManager = _queryIndexManager;            
            _cacheStore.ISizableEvictionIndexManager = _evictionPolicy;
            _cacheStore.ISizableExpirationIndexManager = _context.ExpiryMgr;

            _stats.MaxCount = _cacheStore.MaxCount;
            _stats.MaxSize = _cacheStore.MaxSize;

            //+Numan16122014

            if (_context.PerfStatsColl != null)
            {
                if (_queryIndexManager != null)
                    _context.PerfStatsColl.SetQueryIndexSize(_queryIndexManager.IndexInMemorySize);                
            }
        }
开发者ID:christrotter,项目名称:NCache,代码行数:36,代码来源:IndexedLocalCache.cs


示例11: bink

        public bink(CacheBase Cache, int Address)
        {
            EndianReader Reader = Cache.Reader;
            Reader.SeekTo(Address);

            Reader.Skip(4);
            RawID = Reader.ReadInt32();
        }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:8,代码来源:bink.cs


示例12: Create

 public static CommandContext Create(CommandContext parent, OpenTagCache info, CacheBase blamCache)
 {
     var context = new CommandContext(parent, blamCache.Build);
     context.AddCommand(new PortShaderCommand(info, blamCache));
     context.AddCommand(new PortModelCommand(info, blamCache));
     context.AddCommand(new ListBitmapsCommand(info, blamCache));
     return context;
 }
开发者ID:XeCREATURE,项目名称:TagTool,代码行数:8,代码来源:CacheContextFactory.cs


示例13: render_model

        public render_model(CacheBase Cache, int Address)
        {
            cache = Cache;
            EndianReader Reader = Cache.Reader;
            Reader.SeekTo(Address);

            Name = Cache.Strings.GetItemByID(Reader.ReadInt16());
            //Flags = new Bitmask(Reader.ReadInt32());

            #region BoundingBox Block
            Reader.SeekTo(Address + 20);
            int iCount = Reader.ReadInt32();
            int iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                BoundingBoxes.Add(new BoundingBox(Cache, iOffset + 56 * i));
            #endregion

            #region Regions Block
            Reader.SeekTo(Address + 28);
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                Regions.Add(new Region(Cache, iOffset + 16 * i));
            #endregion

            #region ModelParts Block
            Reader.SeekTo(Address + 36);
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                ModelSections.Add(new ModelSection(Cache, iOffset + 92 * i) { FacesIndex = i, VertsIndex = i, NodeIndex = 255 });
            Reader.SeekTo(Address + 72);
            #endregion

            #region Nodes Block
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                Nodes.Add(new Node(Cache, iOffset + 96 * i));
            #endregion

            #region MarkerGroups Block
            Reader.SeekTo(Address + 88);
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                MarkerGroups.Add(new MarkerGroup(Cache, iOffset + 12 * i));
            #endregion

            #region Shaders Block
            Reader.SeekTo(Address + 96);
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                Shaders.Add(new Shader(Cache, iOffset + 32 * i));
            #endregion
        }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:57,代码来源:render_model.cs


示例14: gbxmodel

        public gbxmodel(CacheBase Cache, int Address)
        {
            cache = Cache;
            EndianReader Reader = Cache.Reader;
            Reader.SeekTo(Address);

            Name = "gbxmodel";
            Flags = new Bitmask(Reader.ReadInt16());

            Reader.SeekTo(Address + 0x30);
            uScale = Reader.ReadSingle();
            vScale = Reader.ReadSingle();

            #region MarkerGroups Block
            Reader.SeekTo(Address + 0xAC);
            int iCount = Reader.ReadInt32();
            int iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                MarkerGroups.Add(new MarkerGroup(Cache, iOffset + 64 * i));
            #endregion

            #region Nodes Block
            Reader.SeekTo(Address + 0xB8);
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                Nodes.Add(new Node(Cache, iOffset + 156 * i));
            #endregion

            #region Regions Block
            Reader.SeekTo(Address + 0xC4);
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                Regions.Add(new Region(Cache, iOffset + 76 * i));
            #endregion

            #region ModelParts Block
            Reader.SeekTo(Address + 0xD0);
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                ModelSections.Add(new ModelSection(Cache, iOffset + 48 * i) { FacesIndex = i, VertsIndex = i, NodeIndex = 255 });
            #endregion

            #region Shaders Block
            Reader.SeekTo(Address + 0xDC);
            iCount = Reader.ReadInt32();
            iOffset = Reader.ReadInt32() - Cache.Magic;
            for (int i = 0; i < iCount; i++)
                Shaders.Add(new Shader(Cache, iOffset + 32 * i));
            #endregion

            #region BoundingBox Block
            BoundingBoxes.Add(new BoundingBox());
            #endregion
        }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:57,代码来源:gbxmodel.cs


示例15: Codec

            public Codec(CacheBase Cache, int Address)
            {
                EndianReader Reader = Cache.Reader;
                Reader.SeekTo(Address);

                Unknown = Reader.ReadByte();
                Type = (SoundType)Reader.ReadByte();
                Flags = new Bitmask(Reader.ReadByte());
            }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:9,代码来源:sound_cache_file_gestalt.cs


示例16: CacheHeader

            public CacheHeader(CacheBase Cache)
            {
                cache = Cache;
                EndianReader Reader = cache.Reader;

                Reader.SeekTo(8);
                fileSize = Reader.ReadInt32();
                Reader.ReadInt32();
                indexOffset = Reader.ReadInt32();
            }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:10,代码来源:CacheFile.cs


示例17: PortShaderCommand

 public PortShaderCommand(OpenTagCache info, CacheBase blamCache)
     : base(CommandFlags.None,
           "portshader",
           "",
           "portshader <blam tag path>",
           "")
 {
     Info = info;
     BlamCache = blamCache;
 }
开发者ID:XeCREATURE,项目名称:TagTool,代码行数:10,代码来源:PortShaderCommand.cs


示例18: SoundPermutation

            public SoundPermutation(CacheBase Cache, int Address)
            {
                EndianReader Reader = Cache.Reader;
                Reader.SeekTo(Address);

                NameIndex = Reader.ReadInt16();

                Reader.SeekTo(Address + 8);
                RawChunkIndex = Reader.ReadInt32();
                ChunkCount = Reader.ReadInt16();
            }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:11,代码来源:sound_cache_file_gestalt.cs


示例19: bink

        //---, ---, ---, ----, ---, ---, H4R
        public static bink bink(CacheBase Cache, CacheBase.IndexItem Tag)
        {
            switch (Cache.Version)
            {
                case DefinitionSet.Halo4Retail:
                    return new Halo4Retail.bink(Cache, Tag.Offset);

                default:
                    throw new NotSupportedException(errorMessage.Replace("----", "bink"));
            }
        }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:12,代码来源:DefinitionsManager.cs


示例20: ShaderMap

                public ShaderMap(CacheBase Cache, int Address)
                {
                    EndianReader Reader = Cache.Reader;
                    Reader.SeekTo(Address);

                    Reader.SeekTo(Address + 12);
                    BitmapTagID = Reader.ReadInt32();
                    Type = Reader.ReadInt16();
                    Reader.ReadByte();
                    TilingIndex = Reader.ReadByte();
                }
开发者ID:XeCREATURE,项目名称:TagTool,代码行数:11,代码来源:material.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# CacheCommand类代码示例发布时间:2022-05-24
下一篇:
C# Cache类代码示例发布时间: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