资源简介
一个简单的自动化测试架构的实现(C#).属性会作为元数据嵌入到程序集,通过反射机制能够得到这些元数据信息。程序员可以自己定义属性,对属性进行某种格式的定义,并利用属性来影响自己编写代码编译后的程序集(assmbly)自定义属性在编译时作为元数据被编译到程序集中,运行时通过反射机制被读取。这应该是这个自动化测试架构的立足点。

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AttributesClass
{
[AttributeUsage(AttributeTargets.Method AllowMultiple = true)]
public sealed class ClassCleanupAttribute:Attribute
{
public ClassCleanupAttribute()
{ }
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 926 2011-03-01 14:45 PropertyDemo\PropertyDemo.sln
文件 32256 2011-03-02 10:38 PropertyDemo\PropertyDemo.suo
目录 0 2011-03-02 16:00 PropertyDemo\PropertyDemo\
目录 0 2011-03-02 09:56 PropertyDemo\PropertyDemo\bin\
目录 0 2011-03-02 10:40 PropertyDemo\PropertyDemo\bin\Debug\
文件 5632 2011-03-02 10:40 PropertyDemo\PropertyDemo\bin\Debug\AttributesClass.dll
文件 30208 2011-03-02 10:40 PropertyDemo\PropertyDemo\bin\Debug\AttributesClass.pdb
文件 5632 2011-03-02 16:00 PropertyDemo\PropertyDemo\bin\Debug\PropertyDemo.dll
文件 38400 2011-03-02 16:00 PropertyDemo\PropertyDemo\bin\Debug\PropertyDemo.pdb
文件 14328 2011-03-01 14:45 PropertyDemo\PropertyDemo\bin\Debug\PropertyDemo.vshost.exe
文件 490 2009-06-11 05:14 PropertyDemo\PropertyDemo\bin\Debug\PropertyDemo.vshost.exe.manifest
文件 1532 2011-03-02 10:39 PropertyDemo\PropertyDemo\DemoTest.cs
文件 1376 2011-03-02 16:00 PropertyDemo\PropertyDemo\DemoTestThree.cs
文件 1422 2011-03-02 15:58 PropertyDemo\PropertyDemo\DemoTestTwo.cs
目录 0 2011-03-01 14:45 PropertyDemo\PropertyDemo\obj\
目录 0 2011-03-02 16:00 PropertyDemo\PropertyDemo\obj\Debug\
文件 832 2011-03-02 10:40 PropertyDemo\PropertyDemo\obj\Debug\PropertyDemo.csproj.FileListAbsolute.txt
文件 5632 2011-03-02 16:00 PropertyDemo\PropertyDemo\obj\Debug\PropertyDemo.dll
文件 38400 2011-03-02 16:00 PropertyDemo\PropertyDemo\obj\Debug\PropertyDemo.pdb
文件 2622 2011-03-02 10:40 PropertyDemo\PropertyDemo\obj\Debug\ResolveAssemblyReference.cache
目录 0 2011-03-01 14:45 PropertyDemo\PropertyDemo\obj\Debug\TempPE\
目录 0 2011-03-01 14:45 PropertyDemo\PropertyDemo\Properties\
文件 1460 2011-03-01 14:45 PropertyDemo\PropertyDemo\Properties\AssemblyInfo.cs
文件 2898 2011-03-02 16:00 PropertyDemo\PropertyDemo\PropertyDemo.csproj
文件 938 2011-03-01 16:20 PropertyDemoTest\PropertyDemoTest.sln
文件 17920 2011-03-02 10:56 PropertyDemoTest\PropertyDemoTest.suo
目录 0 2011-03-02 16:10 PropertyDemoTest\PropertyDemoTest\
目录 0 2011-03-01 16:20 PropertyDemoTest\PropertyDemoTest\bin\
目录 0 2011-03-02 10:40 PropertyDemoTest\PropertyDemoTest\bin\Debug\
文件 5632 2011-03-02 10:40 PropertyDemoTest\PropertyDemoTest\bin\Debug\AttributesClass.dll
文件 30208 2011-03-02 10:40 PropertyDemoTest\PropertyDemoTest\bin\Debug\AttributesClass.pdb
............此处省略45个文件信息
- 上一篇:网络文件传送 c#源码
- 下一篇:C#2.0进程CPU占用率
相关资源
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
- C#指纹识别系统程序 报告
- c# 高校档案信息管理系统
- c#向word文件插入图片
- C#左侧导航菜单(动态生成)
- C#TCP 通信(TCP发送16进制)
- C# sql实现批量导入数据到数据库
评论
共有 条评论