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

C# OpenTagCache类代码示例

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

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



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

示例1: ParseTagName

        public static TagInstance ParseTagName(OpenTagCache info, string name)
        {
            if (name.Length == 0 || !char.IsLetter(name[0]) || !name.Contains('.'))
                throw new Exception($"Invalid tag name: {name}");

            var namePieces = name.Split('.');

            var groupTag = ParseGroupTag(info.StringIDs, namePieces[1]);
            if (groupTag == Tag.Null)
                throw new Exception($"Invalid tag name: {name}");

            var tagName = namePieces[0];
            
            foreach (var nameEntry in info.TagNames)
            {
                if (nameEntry.Value == tagName)
                {
                    var instance = info.Cache.Tags[nameEntry.Key];

                    if (instance.Group.Tag == groupTag)
                        return instance;
                }
            }

            Console.WriteLine($"Invalid tag name: {name}");
            return null;
        }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:27,代码来源:ArgumentParser.cs


示例2: Create

 public static CommandContext Create(CommandContext parent, OpenTagCache info, HaloTag tag, Model model)
 {
     var context = new CommandContext(parent, string.Format("{0:X8}.hlmt", tag.Index));
     context.AddCommand(new HlmtListVariantsCommand(info, model));
     context.AddCommand(new HlmtExtractModeCommand(info, model));
     return context;
 }
开发者ID:Gurten,项目名称:HaloOnlineTagTool,代码行数:7,代码来源:HlmtContextFactory.cs


示例3: Create

 public static CommandContext Create(CommandContextStack stack, OpenTagCache info)
 {
     var context = new CommandContext(null, info.CacheFile.Name);
     context.AddCommand(new HelpCommand(stack));
     context.AddCommand(new DependencyCommand(info));
     context.AddCommand(new FixupCommand(info));
     context.AddCommand(new ExtractCommand(info));
     context.AddCommand(new ImportCommand(info));
     context.AddCommand(new InfoCommand(info));
     context.AddCommand(new InsertCommand(info));
     context.AddCommand(new ListCommand(info));
     context.AddCommand(new MapCommand());
     context.AddCommand(new EditCommand(stack, info));
     context.AddCommand(new DuplicateTagCommand(info));
     context.AddCommand(new AddressCommand());
     context.AddCommand(new ExtractBitmapsCommand(info));
     context.AddCommand(new ResourceDataCommand());
     context.AddCommand(new TagBlockCommand(info));
     if (info.StringIds != null)
     {
         context.AddCommand(new StringIdCommand(info));
         context.AddCommand(new ListStringsCommand(info));
         context.AddCommand(new GenerateLayoutsCommand(info));
         context.AddCommand(new ModelTestCommand(info));
     }
     return context;
 }
开发者ID:FishPhd,项目名称:HaloOnlineTagTool,代码行数:27,代码来源:TagCacheContextFactory.cs


示例4: Create

 public static CommandContext Create(CommandContextStack stack, OpenTagCache info)
 {
     var context = new CommandContext(null, info.CacheFile.Name);
     context.AddCommand(new HelpCommand(stack));
     context.AddCommand(new ClearCommand());
     context.AddCommand(new DumpLogCommand());
     context.AddCommand(new EchoCommand());
     context.AddCommand(new DependencyCommand(info));
     context.AddCommand(new ExtractCommand(info));
     context.AddCommand(new ImportCommand(info));
     context.AddCommand(new InfoCommand(info));
     context.AddCommand(new ListCommand(info));
     context.AddCommand(new MapCommand());
     context.AddCommand(new DuplicateTagCommand(info));
     context.AddCommand(new AddressCommand());
     context.AddCommand(new ResourceDataCommand());
     if (info.StringIds != null)
     {
         context.AddCommand(new EditCommand(stack, info));
         context.AddCommand(new ExtractBitmapsCommand(info));
         context.AddCommand(new ImportBitmapCommand(info));
         context.AddCommand(new CollisionGeometryTestCommand(info));
         context.AddCommand(new PhysicsModelTestCommand(info));
         context.AddCommand(new StringIdCommand(info));
         context.AddCommand(new ListStringsCommand(info));
         context.AddCommand(new GenerateLayoutsCommand(info));
         context.AddCommand(new ModelTestCommand(info));
         context.AddCommand(new ConvertPluginsCommand(info));
         context.AddCommand(new GenerateTagNamesCommand(info));
         context.AddCommand(new MatchTagsCommand(info));
         context.AddCommand(new ConvertCommand(info));
     }
     return context;
 }
开发者ID:PersonalityPi,项目名称:HaloOnlineTagTool,代码行数:34,代码来源:TagCacheContextFactory.cs


示例5: Populate

        public static void Populate(CommandContext context, OpenTagCache info, TagInstance tag)
        {
            RenderMethod renderMethod = null;

            using (var cacheStream = info.OpenCacheReadWrite())
            {
                var tagContext = new TagSerializationContext(cacheStream, info.Cache, info.StringIds, tag);

                switch (tag.Group.Tag.ToString())
                {
                    case "rm  ": // render_method
                        renderMethod = info.Deserializer.Deserialize<RenderMethod>(tagContext);
                        break;

                    case "rmsh": // shader
                        renderMethod = info.Deserializer.Deserialize<Shader>(tagContext);
                        break;

                    case "rmd ": // shader_decal
                        renderMethod = info.Deserializer.Deserialize<ShaderDecal>(tagContext);
                        break;

                    case "rmfl": // shader_foliage
                        renderMethod = info.Deserializer.Deserialize<ShaderFoliage>(tagContext);
                        break;

                    case "rmhg": // shader_halogram
                        renderMethod = info.Deserializer.Deserialize<ShaderHalogram>(tagContext);
                        break;

                    case "rmss": // shader_screen
                        renderMethod = info.Deserializer.Deserialize<ShaderScreen>(tagContext);
                        break;

                    case "rmtr": // shader_terrain
                        renderMethod = info.Deserializer.Deserialize<ShaderTerrain>(tagContext);
                        break;

                    case "rmw ": // shader_water
                        renderMethod = info.Deserializer.Deserialize<ShaderWater>(tagContext);
                        break;

                    case "rmzo": // shader_zonly
                        renderMethod = info.Deserializer.Deserialize<ShaderZonly>(tagContext);
                        break;

                    case "rmcs": // shader_custom
                        renderMethod = info.Deserializer.Deserialize<ShaderCustom>(tagContext);
                        break;

                    default:
                        throw new NotImplementedException();
                }
            }
            
            context.AddCommand(new ListArgumentsCommand(info, tag, renderMethod));
            context.AddCommand(new ListBitmapsCommand(info, tag, renderMethod));
            context.AddCommand(new SpecifyBitmapsCommand(info, tag, renderMethod));
        }
开发者ID:karijuana,项目名称:HaloOnlineTagTool,代码行数:59,代码来源:RenderMethodContextFactory.cs


示例6: Populate

        public static void Populate(CommandContext context, OpenTagCache info, TagInstance tag, MultilingualUnicodeStringList unic)
        {
            if (info.StringIds == null)
                return;

            context.AddCommand(new ListCommand(info, unic));
            context.AddCommand(new SetCommand(info, tag, unic));
        }
开发者ID:medsouz,项目名称:HaloOnlineTagTool,代码行数:8,代码来源:UnicodeContextFactory.cs


示例7: 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


示例8: Populate

 public static void Populate(CommandContext context, OpenTagCache info, TagInstance tag, VFilesList vfsl)
 {
     context.AddCommand(new ListCommand(vfsl));
     context.AddCommand(new ExtractCommand(vfsl));
     context.AddCommand(new ExtractAllCommand(vfsl));
     context.AddCommand(new ImportCommand(info, tag, vfsl));
     context.AddCommand(new ImportAllCommand(info, tag, vfsl));
 }
开发者ID:Shad0wShayd3,项目名称:HaloOnlineTagTool,代码行数:8,代码来源:VFilesContextFactory.cs


示例9: NullTagCommand

 public NullTagCommand(OpenTagCache info)
     : base(CommandFlags.None,
           "nulltag",
           "Nulls a tag in the current tag cache.",
           "nulltag <tag index>",
           "Nulls a tag in the current tag index. The tag's data will be removed from cache.")
 {
     Info = info;
 }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:9,代码来源:NullTagCommand.cs


示例10: GenerateCacheCommand

 public GenerateCacheCommand(OpenTagCache info)
     : base(CommandFlags.Inherit,
           "generatecache",
           "Generates an empty set of cache files.",
           "generatecache <output directory>",
           "Generates an empty set of cache files.")
 {
     Info = info;
 }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:9,代码来源:GenerateCacheCommand.cs


示例11: NewTagCommand

 public NewTagCommand(OpenTagCache info)
     : base(CommandFlags.Inherit,
           "newtag",
           "Creates a new tag of the specified tag group in the current tag cache.",
           "newtag <group tag>",
           "Creates a new tag of the specified tag group in the current tag cache.")
 {
     Info = info;
 }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:9,代码来源:NewTagCommand.cs


示例12: ListUnreferencedTagsCommand

 public ListUnreferencedTagsCommand(OpenTagCache info)
     : base(CommandFlags.None,
           "listunreferencedtags",
           "Lists all unreferenced tags in the current tag cache",
           "listunreferencedtags",
           "Lists all unreferenced tags in the current tag cache")
 {
     Info = info;
 }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:9,代码来源:ListUnreferencedTagsCommand.cs


示例13: ListNullTagsCommand

 public ListNullTagsCommand(OpenTagCache info)
     : base(CommandFlags.None,
           "listnulltags",
           "Lists all null tag indices in the current tag cache",
           "listnulltags",
           "Lists all null tag indices in the current tag cache")
 {
     Info = info;
 }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:9,代码来源:ListNullTagsCommand.cs


示例14: GenerateTagNamesCommand

 public GenerateTagNamesCommand(OpenTagCache info)
     : base(CommandFlags.Inherit,
           "gentagnames",
           "Generates tag names into a csv file (overwriting existing entries).",
           "gentagnames <csv file>",
           "Generates tag names into a csv file (overwriting existing entries).")
 {
     Info = info;
 }
开发者ID:karijuana,项目名称:HaloOnlineTagTool,代码行数:9,代码来源:GenerateTagNamesCommand.cs


示例15: SetVarCommand

 public SetVarCommand(OpenTagCache info)
     : base(CommandFlags.Inherit,
           "setvar",
           "Assigns a value to a variable.",
           "setvar <name> <value>",
           "Assigns a value to a tag tool global variable, which can be accessed via $name")
 {
     Info = info;
 }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:9,代码来源:SetVarCommand.cs


示例16: ExtractCommand

 public ExtractCommand(OpenTagCache info)
     : base(CommandFlags.Inherit,
           "extract",
           "",
           "extract [all] <index|group> <path>",
           "")
 {
     Info = info;
 }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:9,代码来源:ExtractCommand.cs


示例17: ExportTagsCommand

 public ExportTagsCommand(OpenTagCache info)
     : base(CommandFlags.None,
           "exporttags",
           "Exports all tags in the current tag cache to a specific directory.",
           "exporttags <output directory>",
           "Exports all tags in the current tag cache to a specific directory.")
 {
     Info = info;
 }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:9,代码来源:ExportTagsCommand.cs


示例18: Create

        public static CommandContext Create(CommandContext parent, OpenTagCache info, TagInstance tag, VFilesList vfsl)
        {
            var groupName = info.StringIds.GetString(tag.GroupName);

            var context = new CommandContext(parent,
                string.Format("{0:X8}.{1}", tag.Index, groupName));

            return context;
        }
开发者ID:Shad0wShayd3,项目名称:HaloOnlineTagTool,代码行数:9,代码来源:VFilesContextFactory.cs


示例19: ImportCommand

 public ImportCommand(OpenTagCache info)
     : base(CommandFlags.None,
           "import",
           "",
           "import [all] <index> <path>",
           "")
 {
     Info = info;
 }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:9,代码来源:ImportCommand.cs


示例20: ListVariantsCommand

 public ListVariantsCommand(OpenTagCache info, Model model)
     : base(CommandFlags.Inherit,
     "listvariants",
     "List available variants of the current model definition.",
     "listvariants",
     "Lists available variants of the current model definition which can be used with \"extractmodel\".")
 {
     Info = info;
     Definition = model;
 }
开发者ID:TheGuardians,项目名称:TagTool,代码行数:10,代码来源:ListVariantsCommand.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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