ExtendedAttributeDefinition.CreateExtendedAttribute
内容
[
隐藏
]CreateExtendedAttribute()
创建一个新的扩展属性,其字段 ID 等于此对象的字段 ID 值。
public ExtendedAttribute CreateExtendedAttribute()
返回值
返回创建的实例ExtendedAttributefieldID 等于此对象的 fieldID 值的类。
也可以看看
- class ExtendedAttribute
- class ExtendedAttributeDefinition
- 命名空间 Aspose.Tasks
- 部件 Aspose.Tasks
CreateExtendedAttribute(string)
创建一个新的扩展属性,其字段 ID 等于此对象的字段 ID 值和指定的文本值。
public ExtendedAttribute CreateExtendedAttribute(string textValue)
| 范围 | 类型 | 描述 |
|---|---|---|
| textValue | String | 指定的文本值。 |
返回值
返回创建的实例ExtendedAttributefieldID 等于此对象的 fieldID 值的类。
例外
| 例外 | (健康)状况 |
|---|---|
| InvalidOperationException | 如果当前CfType不是“文本” |
也可以看看
- class ExtendedAttribute
- class ExtendedAttributeDefinition
- 命名空间 Aspose.Tasks
- 部件 Aspose.Tasks
CreateExtendedAttribute(decimal)
创建一个新的扩展属性,其字段 ID 等于此对象的字段 ID 值和指定的数值。
public ExtendedAttribute CreateExtendedAttribute(decimal numericValue)
| 范围 | 类型 | 描述 |
|---|---|---|
| numericValue | Decimal | 指定的数值。 |
返回值
返回创建的实例ExtendedAttributefieldID 等于此对象的 fieldID 值的类。
例外
| 例外 | (健康)状况 |
|---|---|
| InvalidOperationException | 如果当前CfType不是“数量”或“成本” |
也可以看看
- class ExtendedAttribute
- class ExtendedAttributeDefinition
- 命名空间 Aspose.Tasks
- 部件 Aspose.Tasks
CreateExtendedAttribute(DateTime)
创建一个新的扩展属性,其字段 ID 等于此对象的字段 ID 值和指定的日期值。
public ExtendedAttribute CreateExtendedAttribute(DateTime dateTimeValue)
| 范围 | 类型 | 描述 |
|---|---|---|
| dateTimeValue | DateTime | 指定的日期时间值。 |
返回值
返回创建的实例ExtendedAttributefieldID 等于此对象的 fieldID 值的类。
例外
| 例外 | (健康)状况 |
|---|---|
| InvalidOperationException | 如果当前CfType不是“日期”、“开始”或“完成” |
也可以看看
- class ExtendedAttribute
- class ExtendedAttributeDefinition
- 命名空间 Aspose.Tasks
- 部件 Aspose.Tasks
CreateExtendedAttribute(Duration)
创建一个新的扩展属性,其字段 ID 等于此对象的字段 ID 值和指定的持续时间值。
public ExtendedAttribute CreateExtendedAttribute(Duration durationValue)
| 范围 | 类型 | 描述 |
|---|---|---|
| durationValue | Duration | 指定的持续时间值。 |
返回值
返回创建的实例ExtendedAttributefieldID 等于此对象的 fieldID 值的类。
例外
| 例外 | (健康)状况 |
|---|---|
| InvalidOperationException | 如果当前CfType不是“持续时间” |
也可以看看
- class ExtendedAttribute
- struct Duration
- class ExtendedAttributeDefinition
- 命名空间 Aspose.Tasks
- 部件 Aspose.Tasks
CreateExtendedAttribute(bool)
创建一个新的扩展属性,其字段 ID 等于此对象的字段 ID 值和指定的标志值。
public ExtendedAttribute CreateExtendedAttribute(bool flagValue)
| 范围 | 类型 | 描述 |
|---|---|---|
| flagValue | Boolean | 指定的标志值。 |
返回值
返回创建的实例ExtendedAttributefieldID 等于此对象的 fieldID 值的类。
例外
| 例外 | (健康)状况 |
|---|---|
| InvalidOperationException | 如果当前CfType不是“旗帜” |
也可以看看
- class ExtendedAttribute
- class ExtendedAttributeDefinition
- 命名空间 Aspose.Tasks
- 部件 Aspose.Tasks
CreateExtendedAttribute(Value)
创建与指定链接的新扩展属性Value项目.
public ExtendedAttribute CreateExtendedAttribute(Value lookupValue)
| 范围 | 类型 | 描述 |
|---|---|---|
| lookupValue | Value | 指定的Value物品。 |
返回值
返回创建的实例ExtendedAttribute与指定链接的类Value物品。
评论
lookupValue应该事先添加到ExtendedAttributeDefinition使用AddLookupValue方法.
例子
使用此代码创建新的ExtendedAttribute使用特定值:
taskTextAttr.AddLookupValue(value1);
taskTextAttr.AddLookupValue(value2);
var extendedAttribute = taskTextAttr.CreateExtendedAttribute(value2);
也可以看看
- class ExtendedAttribute
- class Value
- class ExtendedAttributeDefinition
- 命名空间 Aspose.Tasks
- 部件 Aspose.Tasks