次の方法で共有


EntityCollection クラス

割り当て、カレンダー、制約、アウトライン コード、プロジェクト、リソース、およびタスクのエンティティのエンティティ メタデータのコレクションです。

継承階層

System.Object
  System.Collections.CollectionBase
    Microsoft.Office.Project.Server.Library.EntityCollection

名前空間:  Microsoft.Office.Project.Server.Library
アセンブリ:  Microsoft.Office.Project.Server.Library (Microsoft.Office.Project.Server.Library.dll 内)

構文

'宣言
Public NotInheritable Class EntityCollection _
    Inherits CollectionBase
'使用
Dim instance As EntityCollection
public sealed class EntityCollection : CollectionBase

注釈

PSI メソッドで使用するエンティティの種類の GUID を取得するには、 EntityCollectionを使用します。

次のコードは、 ReadCustomFieldsByEntityメソッドを使用して、リソースのユーザー設定フィールドのすべてを取得するためにリソース エンティティの GUID を使用します。WebSvcCustomFieldsは、CustomFields.asmx の Web サービスへの参照の任意の名前です。

using PSLibrary = Microsoft.Office.Project.Server.Library;
. . .
public static WebSvcCustomFields.CustomFields customFields =
    new WebSvcCustomFields.CustomFields();
. . .
string resourceEntity = PSLibrary.EntityCollection.Entities.ResourceEntity.UniqueId;

WebSvcCustomFields.CustomFieldDataSet cfDs = customFields.ReadCustomFieldsByEntity(
    new Guid(resourceEntity));
. . .

スレッド セーフ

この型のパブリック static (Visual Basic のShared ) メンバーはいずれもスレッド セーフです。インスタンス メンバーはスレッド セーフになるという保証はありません。

関連項目

参照先

EntityCollection メンバー

Microsoft.Office.Project.Server.Library 名前空間