-
大小: 5.80M文件类型: .zip金币: 1下载: 0 次发布日期: 2025-01-20
- 语言: JavaScript
- 标签: vue
资源简介
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace RimTrans.Reflection {
class DistinctAttributeComparer : IEqualityComparer {
public bool Equals(Attribute x Attribute y) {
return x.GetType() == y.GetType();
}
public int GetHashCode(Attribute obj) {
return obj.GetHashCode();
}
}
///
/// The crawler for assemblies of RimWorld game or mods.
///
public static class Crawler {
///
/// Gets type packages from assemblies.
///
/// The intput/output paths map input is the path to a assembly output is the path to output type package
public static void Crawl(Dictionary mapInputOutput) {
var mapAsmOutput = new Dictionary();
foreach (var (input output) in mapInputOutput) {
if (input.ToLower() == “core“) {
mapAsmOutput.Add(Assemblymeta.assemblyCore output);
} else {
var asm = Assembly.LoadFrom(input);
mapAsmOutput.Add(asm output);
}
}
foreach (var (asm output) in mapAsmOutput) {
var asmmeta = new Assemblymeta(asm);
var jsonText = Serialize(asmmeta);
File.WriteAllText(output jsonText);
}
}
public static string Serialize(Assemblymeta assmeblymeta) {
var options = new JsonSerializerOptions();
options.Converters.Add(new JsonStringEnumConverter());
options.WriteIndented = true;
var jsonText = JsonSerializer.Serialize(assmeblymeta options);
return jsonText;
}
}
///
/// The meta info of the assembly. Includes enums classes and defs.
///
public class Assemblymeta {
public static readonly Assembly assemblyCore = typeof(Verse.Def).Assembly;
///
/// The name of the assembly.
///
public string name { get; set; }
///
/// All enum types.
///
public SortedDictionaryta> enums { get; set; }
///
/// All class types.
///
public SortedDictionaryta> classes { get; set; }
///
/// The map for defs name to full name.
///
public SortedDictionary defs { get; set; }
public Assemblymeta(Assembly assembly) {
name = assembly.FullName;
enums = new SortedDictionaryta>();
classes = new SortedDictionaryta>();
defs = new SortedDictionary();
foreach (var type in assembly.GetTypes()) {
var typemeta = new Typemeta(type);
if (typemeta.category == TypeCategory.Enum) {
var enummeta = new Enummeta(type);
enums.Add(enummeta.name enummeta);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-01-19 14:25 RimTrans\
文件 6397 2020-01-19 14:25 RimTrans\.editorconfig
文件 16 2020-01-19 14:25 RimTrans\.eslintignore
文件 701 2020-01-19 14:25 RimTrans\.eslintrc.js
文件 2518 2020-01-19 14:25 RimTrans\.gitattributes
文件 4270 2020-01-19 14:25 RimTrans\.gitignore
文件 55 2020-01-19 14:25 RimTrans\.prettierignore
文件 410 2020-01-19 14:25 RimTrans\.prettierrc
文件 1245 2020-01-19 14:25 RimTrans\.st
目录 0 2020-01-19 14:25 RimTrans\.vscode\
文件 50 2020-01-19 14:25 RimTrans\.vscode\settings.json
文件 3355 2020-01-19 14:25 RimTrans\CODE_OF_CONDUCT.md
目录 0 2020-01-19 14:25 RimTrans\Core\
目录 0 2020-01-19 14:25 RimTrans\Core\About\
文件 227 2020-01-19 14:25 RimTrans\Core\About\About.xm
文件 16986 2020-01-19 14:25 RimTrans\Core\About\Preview.png
目录 0 2020-01-19 14:25 RimTrans\Core\Defs\
目录 0 2020-01-19 14:25 RimTrans\Core\Defs\BiomeDefs\
文件 17775 2020-01-19 14:25 RimTrans\Core\Defs\BiomeDefs\Biomes_Cold.xm
文件 8778 2020-01-19 14:25 RimTrans\Core\Defs\BiomeDefs\Biomes_Temperate.xm
文件 8805 2020-01-19 14:25 RimTrans\Core\Defs\BiomeDefs\Biomes_Warm.xm
文件 9759 2020-01-19 14:25 RimTrans\Core\Defs\BiomeDefs\Biomes_WarmArid.xm
文件 925 2020-01-19 14:25 RimTrans\Core\Defs\BiomeDefs\Biomes_Water.xm
目录 0 2020-01-19 14:25 RimTrans\Core\Defs\Bodies\
文件 3766 2020-01-19 14:25 RimTrans\Core\Defs\Bodies\Bodies_Animal_Bird.xm
文件 7249 2020-01-19 14:25 RimTrans\Core\Defs\Bodies\Bodies_Animal_Insect.xm
文件 53561 2020-01-19 14:25 RimTrans\Core\Defs\Bodies\Bodies_Animal_Quadruped.xm
文件 2493 2020-01-19 14:25 RimTrans\Core\Defs\Bodies\Bodies_Animal_Snake.xm
文件 17673 2020-01-19 14:25 RimTrans\Core\Defs\Bodies\Bodies_Humanlike.xm
文件 16999 2020-01-19 14:25 RimTrans\Core\Defs\Bodies\Bodies_Mechanoid.xm
文件 3936 2020-01-19 14:25 RimTrans\Core\Defs\Bodies\BodyPartGroups.xm
............此处省略1705个文件信息
- 上一篇:好用的日期组件calendar.js
- 下一篇:Cesium挖填方设计源码
相关资源
- VUE模仿JD商城
- vue数据驾驶舱
- vue引入krpano
- primeVuePro 修改的实用PC端移动端管理后
- Vue-route简单应用(注册/登陆切换)
- vue视频播放二级三级页面
- 利用js实现vue冒泡排序可视化特效
- Vue基础
- jest单元测试入门(vue项目).docx
- 用vue做的购物车
- js+vue手机app租房
- 前端技术选型分析文档
- vuejs-2.5.21.js
- iview 树形加工类
- vuejs超详细视频学习百度云
- Vue_Pageination
- vue@2.5.16js文件
- vue axios封装 axios 请求
- vue 头像上传,ios图片旋转问题工具类
- axios.js脚本文件
- webVideoCtrl.js海康威视摄像vue引用脚本
- Vue.js面试题整理带答案 .pdf
- mars3d-supermap-master 火星科技vue+cesium工
- vue-resource.js
-
vue动态加载ja
vasc ript - vue引入高德2D和3D地图
- vue实现打印(页面指定区域)
- vue.js的跑马灯效果
- chrome 插件
- vue模拟微信
评论
共有 条评论