可以使用工厂的Filter,例如下一个是AuditRecord,可以和BugFactory一样使用
AuditRecordFactory auditLog = this.ALMConnection.AuditRecordFactory as AuditRecordFactory;
var auditLogFilter = auditLog.Filter as ITDFilter;
//Get the field list
List fieldList= auditLogFilter.Fields;
更新:我在这里找到了完整的答案
https://stackoverflow.com/a/24368561/3915468
:)
@TheArtTrooper 使用下一个方法提供了一个很好的答案
private void ExploreFactoryFieldDefinitions(IBaseFactory factory)
{
List fields = factory.Fields;
foreach (TDField field in fields)
{
FieldProperty field_property = (FieldProperty)field.Property;
if (field_property.IsRequired)
{
Log(String.Format("User Label: {0}\n", field_property.UserLabel));
Log(String.Format("User Column Type: {0}\n", field_property.UserColumnType));
Log(String.Format("DB Column Name: {0}\n", field_property.DBColumnName));
Log(String.Format("DB Column Type: {0}\n", field_property.DBColumnType));
Log(String.Format("DB Table Name: {0}\n", field_property.DBTableName));
}
}
}