Поделиться через


Свойство EntityCollection.AssignmentEntity

Получает метаданные для объекта типа назначения.

Пространство имен:  Microsoft.Office.Project.Server.Library
Сборка:  Microsoft.Office.Project.Server.Library (в Microsoft.Office.Project.Server.Library.dll)

Синтаксис

'Декларация
Public ReadOnly Property AssignmentEntity As Entity
    Get
'Применение
Dim instance As EntityCollection
Dim value As Entity

value = instance.AssignmentEntity
public Entity AssignmentEntity { get; }

Значение свойства

Тип: Microsoft.Office.Project.Server.Library.Entity

Замечания

Используйте EntityCollection.Entities.AssignmentEntity.UniqueId для получения идентификатора GUID объекта назначения для использования в методы PSI.

Примеры

В следующем фрагменте кода используется объект назначения идентификатор GUID для получения всех настраиваемых полей назначения с помощью метода ReadCustomFieldsByEntity . WebSvcCustomFields — произвольных имя ссылку на CustomFields.asmx веб-службы.

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

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

См. также

Справочные материалы

EntityCollection класс

Элементы EntityCollection

Пространство имен Microsoft.Office.Project.Server.Library