Class ExtendedAttributeDefinition
Namespace: Aspose.Tasks
Assembly: Aspose.Tasks.dll (25.2.0)
プロジェクトに関連付けられた拡張属性定義を表します。
[ClassInterface(ClassInterfaceType.AutoDual)]
public class ExtendedAttributeDefinition
継承
object ← ExtendedAttributeDefinition
継承メンバー
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
プロパティ
エイリアス
カスタムフィールドのエイリアスを取得または設定します。
public string Alias { get; set; }
プロパティ値
AppendNewValues
プロジェクトに追加された新しい値がリストに自動的に追加されるかどうかを示す値を取得または設定します。
public bool AppendNewValues { get; set; }
プロパティ値
備考
現在、MSP 2003/2007 XmlおよびMSP 2003 mpp形式でサポートされています。
AutoRollDown
自動的に割り当てにロールダウンすることが有効かどうかを示す値を取得または設定します。
public bool AutoRollDown { get; set; }
プロパティ値
CalculationType
カスタム属性の値の計算タイプを取得または設定します。
public CalculationType CalculationType { get; set; }
プロパティ値
CfType
カスタムフィールドのタイプを取得します。
public CustomFieldType CfType { get; }
プロパティ値
Default
リストのデフォルト値を取得または設定します。
public string Default { get; set; }
プロパティ値
備考
現在、MSP 2003/2007 XmlおよびMSP 2003 mpp形式でサポートされています。
DefaultGuid
デフォルトのルックアップテーブルエントリのGuidを取得または設定します。
public string DefaultGuid { get; set; }
プロパティ値
ElementType
拡張属性がタスク、リソース、または割り当てに関連付けられているかを取得または設定します。
public ElementType ElementType { get; set; }
プロパティ値
FieldId
カスタムフィールドのプロジェクトIDに対応する値を取得または設定します。 Aspose.Tasks.ExtendedAttributeTaskクラスの定数の文字列表現を使用してAspose.Tasks.ExtendedAttributeDefinition.FieldIdプロパティを指定します。
public string FieldId { get; set; }
プロパティ値
例
customFieldDefinition.FieldId = Aspose.Tasks.ExtendedAttributeTask.Number10.ToString("D");
備考
Aspose.Tasks.ExtendedAttributeDefinition.FieldIdプロパティを設定するための推奨方法は、Aspose.Tasks.ExtendedAttributeDefinitionを作成することです。 専用のファクトリメソッドの1つを使用します。例えば、Aspose.Tasks.ExtendedAttributeDefinition.CreateTaskDefinition(Aspose.Tasks.ExtendedAttributeTask,System.String)またはAspose.Tasks.ExtendedAttributeDefinition.CreateLookupTaskDefinition(Aspose.Tasks.CustomFieldType,Aspose.Tasks.ExtendedAttributeTask,System.String)。
FieldName
カスタムフィールドの名前を取得します。
public string FieldName { get; }
プロパティ値
備考
直接設定するべきではありません。代わりに、Create*Definition()という名前の強く型付けされた静的ファクトリメソッドを使用してExtendedAttributeDefinitionを作成します。
Formula
Microsoft Projectがカスタムタスクフィールドを埋めるために使用する数式を取得または設定します。
public string Formula { get; set; }
プロパティ値
GraphicalIndicator
拡張属性に関連付けられたグラフィカルインジケーター情報を取得または設定します。 MPP形式に適用されます。
public GraphicalIndicatorsInfo GraphicalIndicator { get; set; }
プロパティ値
Guid
カスタムフィールドのGuidを取得または設定します。
public string Guid { get; set; }
プロパティ値
備考
現在、Xml形式のみでサポートされています。
LookupUid
カスタムフィールドに関連付けられたルックアップテーブルのGuidを取得します。
public string LookupUid { get; }
プロパティ値
備考
ルックアップ付きのカスタムフィールドを作成するには、次のファクトリメソッドのいずれかを使用します。Aspose.Tasks.ExtendedAttributeDefinition.CreateLookupTaskDefinition(Aspose.Tasks.CustomFieldType,Aspose.Tasks.ExtendedAttributeTask,System.String)またはAspose.Tasks.ExtendedAttributeDefinition.CreateLookupResourceDefinition(Aspose.Tasks.CustomFieldType,Aspose.Tasks.ExtendedAttributeResource,System.String)。
MaxMultiValues
ピックリストに設定できる最大値の数を取得または設定します。
public int MaxMultiValues { get; set; }
プロパティ値
備考
現在、Xml形式のみでサポートされています。
ParentProject
Aspose.Tasks.ExtendedAttributeDefinitionインスタンスの親プロジェクトを取得します。
public Project ParentProject { get; }
プロパティ値
PhoneticsAlias
カスタムフィールドのエイリアスの音声発音を取得または設定します。
public string PhoneticsAlias { get; set; }
プロパティ値
備考
現在、Xml形式のみでサポートされています。
RestrictValues
カスタムフィールドの値がAspose.Tasks.ExtendedAttributeDefinition.ValueListの値に制限されるかどうかを示す値を取得または設定します。
public bool RestrictValues { get; set; }
プロパティ値
RollupType
ロールアップが計算される方法を取得または設定します。
public RollupType RollupType { get; set; }
プロパティ値
備考
書き込みは現在、Xml形式のみでサポートされています。
SecondaryGuid
拡張属性のセカンダリGuidを取得または設定します。
public string SecondaryGuid { get; set; }
プロパティ値
備考
これはMS Project 2010の新しいプロパティです。
SecondaryPid
カスタムフィールドのセカンダリPIDを取得または設定します。
public string SecondaryPid { get; set; }
プロパティ値
SummaryRowsCalculationType
サマリー行のカスタム属性値の計算タイプを取得または設定します。
public SummaryRowsCalculationType SummaryRowsCalculationType { get; set; }
プロパティ値
UserDef
カスタムフィールドがユーザー定義であるかどうかを示す値を取得または設定します。
public bool UserDef { get; set; }
プロパティ値
備考
現在、Xml形式のみでサポートされています。
ValueList
List<Value> ValueListを取得します。
public List<value> ValueList { get; }
プロパティ値
備考
拡張属性の値がスキーマ内の要素のプロパティとして指定される場合、これらは値として指定するか、またはこのリストに含まれる値への参照として指定することができます。 アプリケーションは、ここで指定された順序によってリストの順序を仮定することができます。 現在、MSP 2003/2007 XmlおよびMSP 2003 mpp形式でサポートされています。 このリストを直接変更しないでください。代わりにExtendedAttributeDefinition.AddLookupValue/RemoveLookupValueメソッドを使用してください。
ValuelistSortOrder
値リストがソートされる方法を取得または設定します。値は: 0=降順, 1=昇順。
public int ValuelistSortOrder { get; set; }
プロパティ値
備考
現在、MSP 2003/2007 XmlおよびMSP 2003 mpp形式でサポートされています。
メソッド
AddLookupValue(Value)
内部ルックアップリストに値を追加します。これはAspose.Tasks.ExtendedAttributeDefinition.ValueListの操作に推奨される方法です。
public void AddLookupValue(Value value)
パラメータ
value
Value
ルックアップに追加する値。
例
新しい値をルックアップリストに追加するためのコードを使用します:
taskTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
備考
このメソッドは、Aspose.Tasks.ExtendedAttributeDefinitionインスタンスに対してのみ機能します。 Aspose.Tasks.ExtendedAttributeDefinition.CalculationTypeがAspose.Tasks.CalculationType.Lookupに等しい場合。
CreateExtendedAttribute()
このオブジェクトのフィールドID値と等しいフィールドIDを持つ新しい拡張属性を作成します。
public ExtendedAttribute CreateExtendedAttribute()
戻り値
このオブジェクトのフィールドID値と等しいフィールドIDを持つAspose.Tasks.ExtendedAttributeクラスのインスタンスを返します。
CreateExtendedAttribute(string)
このオブジェクトのフィールドID値と等しいフィールドIDを持つ新しい拡張属性を作成し、指定されたテキスト値を持ちます。
public ExtendedAttribute CreateExtendedAttribute(string textValue)
パラメータ
textValue
string
指定されたテキスト値。
戻り値
このオブジェクトのフィールドID値と等しいフィールドIDを持つAspose.Tasks.ExtendedAttributeクラスのインスタンスを返します。
例外
現在のAspose.Tasks.ExtendedAttributeDefinition.CfTypeが’Text’でない場合。
CreateExtendedAttribute(decimal)
このオブジェクトのフィールドID値と等しいフィールドIDを持つ新しい拡張属性を作成し、指定された数値値を持ちます。
public ExtendedAttribute CreateExtendedAttribute(decimal numericValue)
パラメータ
numericValue
decimal
指定された数値値。
戻り値
このオブジェクトのフィールドID値と等しいフィールドIDを持つAspose.Tasks.ExtendedAttributeクラスのインスタンスを返します。
例外
現在のAspose.Tasks.ExtendedAttributeDefinition.CfTypeが’Number’または’Cost’でない場合。
CreateExtendedAttribute(DateTime)
このオブジェクトのフィールドID値と等しいフィールドIDを持つ新しい拡張属性を作成し、指定された日付値を持ちます。
public ExtendedAttribute CreateExtendedAttribute(DateTime dateTimeValue)
パラメータ
dateTimeValue
DateTime
指定された日付時刻値。
戻り値
このオブジェクトのフィールドID値と等しいフィールドIDを持つAspose.Tasks.ExtendedAttributeクラスのインスタンスを返します。
例外
現在のAspose.Tasks.ExtendedAttributeDefinition.CfTypeが’Date’、‘Start’、または’Finish’でない場合。
CreateExtendedAttribute(Duration)
このオブジェクトのフィールドID値と等しいフィールドIDを持つ新しい拡張属性を作成し、指定された期間値を持ちます。
public ExtendedAttribute CreateExtendedAttribute(Duration durationValue)
パラメータ
durationValue
Duration
指定された期間値。
戻り値
このオブジェクトのフィールドID値と等しいフィールドIDを持つAspose.Tasks.ExtendedAttributeクラスのインスタンスを返します。
例外
現在のAspose.Tasks.ExtendedAttributeDefinition.CfTypeが’Duration’でない場合。
CreateExtendedAttribute(bool)
このオブジェクトのフィールドID値と等しいフィールドIDを持つ新しい拡張属性を作成し、指定されたフラグ値を持ちます。
public ExtendedAttribute CreateExtendedAttribute(bool flagValue)
パラメータ
flagValue
bool
指定されたフラグ値。
戻り値
このオブジェクトのフィールドID値と等しいフィールドIDを持つAspose.Tasks.ExtendedAttributeクラスのインスタンスを返します。
例外
現在のAspose.Tasks.ExtendedAttributeDefinition.CfTypeが’Flag’でない場合。
CreateExtendedAttribute(Value)
指定されたAspose.Tasks.Valueアイテムにリンクされた新しい拡張属性を作成します。
public ExtendedAttribute CreateExtendedAttribute(Value lookupValue)
パラメータ
lookupValue
Value
指定されたAspose.Tasks.Valueアイテム。
戻り値
指定されたAspose.Tasks.ValueアイテムにリンクされたAspose.Tasks.ExtendedAttributeクラスのインスタンスを返します。
例
特定の値を使用して新しいAspose.Tasks.ExtendedAttributeを作成するためのコードを使用します:
taskTextAttr.AddLookupValue(value1);
taskTextAttr.AddLookupValue(value2);
var extendedAttribute = taskTextAttr.CreateExtendedAttribute(value2);
備考
lookupValue
は、Aspose.Tasks.ExtendedAttributeDefinitionにAspose.Tasks.ExtendedAttributeDefinition.AddLookupValue(Aspose.Tasks.Value)メソッドを使用して事前に追加されている必要があります。
CreateLookupResourceDefinition(ExtendedAttributeResource, string)
ルックアップ付きの拡張属性定義を作成するファクトリメソッドです。
Aspose.Tasks.ExtendedAttributeDefinition.CalculationTypeがAspose.Tasks.CalculationType.Lookupに等しく、リソースのみで使用できます。
このメソッドを呼び出すときにfieldId
とalias
を指定する必要があります。
フィールドタイプはフィールドIDから推測されます。
public static ExtendedAttributeDefinition CreateLookupResourceDefinition(ExtendedAttributeResource fieldId, string alias)
パラメータ
fieldId
ExtendedAttributeResource
指定されたAspose.Tasks.ExtendedAttributeResourceフィールドID。
alias
string
指定されたSystem.Stringエイリアス。
戻り値
指定されたfieldId
とalias
を持つAspose.Tasks.ExtendedAttributeDefinitionクラスのインスタンスを作成します。
例
ルックアップ付きのリソースのカスタムフィールド定義を作成し、それをテキスト値で埋めるための例を使用します:
var resourceTextAttr = ExtendedAttributeDefinition.CreateLookupResourceDefinition(ExtendedAttributeResource.Text27, "My custom field");
resourceTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
resourceTextAttr.AddLookupValue(new Value { Id = 2, Val = "Text value 2", Description = "Text value description 2" });
project.ExtendedAttributes.Add(resourceTextAttr);
CreateLookupResourceDefinition(CustomFieldType, ExtendedAttributeResource, string)
ルックアップ付きの拡張属性定義を作成するファクトリメソッドです。
Aspose.Tasks.ExtendedAttributeDefinition.CalculationTypeがAspose.Tasks.CalculationType.Lookupに等しく、リソースのみで使用できます。
このメソッドを呼び出すときにcustomFieldType
、fieldId
、およびalias
を指定する必要があります。
public static ExtendedAttributeDefinition CreateLookupResourceDefinition(CustomFieldType customFieldType, ExtendedAttributeResource fieldId, string alias)
パラメータ
customFieldType
CustomFieldType
指定されたAspose.Tasks.CustomFieldTypeタイプ。
fieldId
ExtendedAttributeResource
指定されたAspose.Tasks.ExtendedAttributeResourceフィールドID。
alias
string
指定されたSystem.Stringエイリアス。
戻り値
指定されたcustomFieldType
、fieldId
、およびalias
を持つAspose.Tasks.ExtendedAttributeDefinitionクラスのインスタンスを作成します。
例
ルックアップ付きのリソースのカスタムフィールド定義を作成し、それをテキスト値で埋めるための例を使用します:
var resourceTextAttr = ExtendedAttributeDefinition.CreateLookupResourceDefinition(CustomFieldType.Text, ExtendedAttributeResource.Text27, "My custom field");
resourceTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
resourceTextAttr.AddLookupValue(new Value { Id = 2, Val = "Text value 2", Description = "Text value description 2" });
project.ExtendedAttributes.Add(resourceTextAttr);
CreateLookupTaskDefinition(ExtendedAttributeTask, string)
ルックアップ付きの拡張属性定義を作成するファクトリメソッドです。
Aspose.Tasks.ExtendedAttributeDefinition.CalculationTypeがAspose.Tasks.CalculationType.Lookupに等しく、タスクのみで使用できます。
このメソッドを呼び出すときにfieldId
とalias
を指定する必要があります。
フィールドタイプはフィールドIDから推測されます。
public static ExtendedAttributeDefinition CreateLookupTaskDefinition(ExtendedAttributeTask fieldId, string alias)
パラメータ
fieldId
ExtendedAttributeTask
指定されたAspose.Tasks.ExtendedAttributeTaskフィールドID。
alias
string
指定されたSystem.Stringエイリアス。
戻り値
指定されたfieldId
とalias
を持つAspose.Tasks.ExtendedAttributeDefinitionクラスのインスタンスを作成します。
例
ルックアップ付きのタスクのカスタムフィールド定義を作成し、それをテキスト値で埋めるための例を使用します:
var taskTextAttr = ExtendedAttributeDefinition.CreateLookupTaskDefinition(ExtendedAttributeTask.Text27, "My custom field");
taskTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
taskTextAttr.AddLookupValue(new Value { Id = 2, Val = "Text value 2", Description = "Text value description 2" });
project.ExtendedAttributes.Add(taskTextAttr);
CreateLookupTaskDefinition(CustomFieldType, ExtendedAttributeTask, string)
ルックアップ付きの拡張属性定義を作成するファクトリメソッドです。
Aspose.Tasks.ExtendedAttributeDefinition.CalculationTypeがAspose.Tasks.CalculationType.Lookupに等しく、タスクのみで使用できます。
このメソッドを呼び出すときにcustomFieldType
、fieldId
、およびalias
を指定する必要があります。
public static ExtendedAttributeDefinition CreateLookupTaskDefinition(CustomFieldType customFieldType, ExtendedAttributeTask fieldId, string alias)
パラメータ
customFieldType
CustomFieldType
指定されたAspose.Tasks.CustomFieldTypeタイプ。
fieldId
ExtendedAttributeTask
指定されたAspose.Tasks.ExtendedAttributeTaskフィールドID。
alias
string
指定されたSystem.Stringエイリアス。
戻り値
指定されたcustomFieldType
、fieldId
、およびalias
を持つAspose.Tasks.ExtendedAttributeDefinitionクラスのインスタンスを作成します。
例
ルックアップ付きのタスクのカスタムフィールド定義を作成し、それをテキスト値で埋めるための例を使用します:
var taskTextAttr = ExtendedAttributeDefinition.CreateLookupTaskDefinition(CustomFieldType.Text, ExtendedAttributeTask.Text27, "My custom field");
taskTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
taskTextAttr.AddLookupValue(new Value { Id = 2, Val = "Text value 2", Description = "Text value description 2" });
project.ExtendedAttributes.Add(taskTextAttr);
CreateResourceDefinition(CustomFieldType, ExtendedAttributeResource, string)
Microsoft Projectが「None」と表示するシンプルな拡張属性定義を作成するファクトリメソッドです。
Aspose.Tasks.ExtendedAttributeDefinition.CalculationTypeがAspose.Tasks.CalculationType.Noneに等しく、リソースのみで使用できます。
このメソッドを呼び出すときにcustomFieldType
、fieldId
、およびalias
を指定する必要があります。
public static ExtendedAttributeDefinition CreateResourceDefinition(CustomFieldType customFieldType, ExtendedAttributeResource fieldId, string alias)
パラメータ
customFieldType
CustomFieldType
指定されたAspose.Tasks.CustomFieldTypeタイプ。
fieldId
ExtendedAttributeResource
指定されたAspose.Tasks.ExtendedAttributeResourceフィールドID。
alias
string
指定されたSystem.Stringエイリアス。
戻り値
指定されたcustomFieldType
、fieldId
、およびalias
を持つAspose.Tasks.ExtendedAttributeDefinitionクラスのインスタンスを作成します。
例
カスタムテキストフィールド定義を作成するための例を使用します:
var resourceTextAttr = ExtendedAttributeDefinition.CreateResourceDefinition(CustomFieldType.Text, ExtendedAttributeResource.Text27, "My custom field");
project.ExtendedAttributes.Add(resourceTextAttr);
CreateResourceDefinition(ExtendedAttributeResource, string)
Microsoft Projectが「None」と表示するシンプルな拡張属性定義を作成するファクトリメソッドです。
Aspose.Tasks.ExtendedAttributeDefinition.CalculationTypeがAspose.Tasks.CalculationType.Noneに等しく、リソースのみで使用できます。
このメソッドを呼び出すときにfieldId
とalias
を指定する必要があります。
フィールドタイプはフィールドIDから推測されます。
public static ExtendedAttributeDefinition CreateResourceDefinition(ExtendedAttributeResource fieldId, string alias)
パラメータ
fieldId
ExtendedAttributeResource
指定されたAspose.Tasks.ExtendedAttributeResourceフィールドID。
alias
string
指定されたSystem.Stringエイリアス。
戻り値
指定されたfieldId
とalias
を持つAspose.Tasks.ExtendedAttributeDefinitionクラスのインスタンスを作成します。
例
カスタムテキストフィールド定義を作成するための例を使用します:
var resourceTextAttr = ExtendedAttributeDefinition.CreateResourceDefinition(ExtendedAttributeResource.Text27, "My custom field");
project.ExtendedAttributes.Add(resourceTextAttr);
CreateTaskDefinition(CustomFieldType, ExtendedAttributeTask, string)
Microsoft Projectが「None」と表示するシンプルな拡張属性定義を作成するファクトリメソッドです。
Aspose.Tasks.ExtendedAttributeDefinition.CalculationTypeがAspose.Tasks.CalculationType.Noneに等しく、タスクのみで使用できます。
このメソッドを呼び出すときにcustomFieldType
、fieldId
、およびalias
を指定する必要があります。
public static ExtendedAttributeDefinition CreateTaskDefinition(CustomFieldType customFieldType, ExtendedAttributeTask fieldId, string alias)
パラメータ
customFieldType
CustomFieldType
指定されたAspose.Tasks.CustomFieldTypeタイプ。
fieldId
ExtendedAttributeTask
指定されたAspose.Tasks.ExtendedAttributeTaskフィールドID。
alias
string
指定されたSystem.Stringエイリアス。
戻り値
指定されたcustomFieldType
、fieldId
、およびalias
を持つAspose.Tasks.ExtendedAttributeDefinitionクラスのインスタンスを作成します。
例
カスタムテキストフィールド定義を作成するための例を使用します:
var taskTextAttr = ExtendedAttributeDefinition.CreateTaskDefinition(CustomFieldType.Text, ExtendedAttributeTask.Text27, "My custom field");
project.ExtendedAttributes.Add(taskTextAttr);
CreateTaskDefinition(ExtendedAttributeTask, string)
Microsoft Projectが「None」と表示するシンプルな拡張属性定義を作成するファクトリメソッドです。
Aspose.Tasks.ExtendedAttributeDefinition.CalculationTypeがAspose.Tasks.CalculationType.Noneに等しく、タスクのみで使用できます。
このメソッドを呼び出すときにfieldId
とalias
を指定する必要があります。
フィールドタイプはフィールドIDから推測されます。
public static ExtendedAttributeDefinition CreateTaskDefinition(ExtendedAttributeTask fieldId, string alias)
パラメータ
fieldId
ExtendedAttributeTask
指定されたAspose.Tasks.ExtendedAttributeTaskフィールドID。
alias
string
指定されたSystem.Stringエイリアス。
戻り値
指定されたfieldId
とalias
を持つAspose.Tasks.ExtendedAttributeDefinitionクラスのインスタンスを作成します。
例
カスタムテキストフィールド定義を作成するための例を使用します:
var taskTextAttr = ExtendedAttributeDefinition.CreateTaskDefinition(ExtendedAttributeTask.Text27, "My custom field");
project.ExtendedAttributes.Add(taskTextAttr);
Equals(object)
このインスタンスが指定されたオブジェクトと等しいかどうかを示すフラグを返します。
public override bool Equals(object obj)
パラメータ
obj
object
このインスタンスと比較する指定されたオブジェクト。
戻り値
このインスタンスが指定されたオブジェクトと等しいかどうかを示すフラグ。
GetHashCode()
Aspose.Tasks.ExtendedAttributeDefinitionクラスのインスタンスのハッシュコードを返します。
public override int GetHashCode()
戻り値
このオブジェクトのハッシュコード。
RemoveLookupValue(Value)
内部ルックアップリストから値を削除します。これはAspose.Tasks.ExtendedAttributeDefinition.ValueListの操作に推奨される方法です。
public void RemoveLookupValue(Value value)
パラメータ
value
Value
ルックアップから削除する値。
備考
このメソッドは、Aspose.Tasks.ExtendedAttributeDefinitionインスタンスに対してのみ機能します。 Aspose.Tasks.ExtendedAttributeDefinition.CalculationTypeがAspose.Tasks.CalculationType.Lookupに等しい場合。