Ai
86 Star 326 Fork 253

InspireFunction/IFoxCAD

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
TestDBobject.cs 772 Bytes
一键复制 编辑 原始数据 按行查看 历史
vicwjb 提交于 2024-11-25 13:02 +08:00 . 改文件组织形式,添加大量测试函数

namespace TestShared
{
public static class TestDBobject
{
[CommandMethod(nameof(TestForWrite))]
public static void TestForWrite()
{
using var tr = new DBTrans();
var ent = Env.Editor.GetEntity("\npick entity");
if (ent.Status is not PromptStatus.OK) return;
var entid = ent.ObjectId.GetObject<Entity>()!;
Tools.TestTimes3(100000, "using:", i => {
using (entid.ForWrite())
{
entid.ColorIndex = i % 7;
}
});
Tools.TestTimes3(100000, "action:", i => {
entid.ForWrite(e => {
e.ColorIndex = i % 7;
});
});
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/inspirefunction/ifoxcad.git
git@gitee.com:inspirefunction/ifoxcad.git
inspirefunction
ifoxcad
IFoxCAD
v0.9

搜索帮助