Interface IPropertyOwner
Владелец свойств.
Inherited Members
Namespace: Ascon.Polynom.Api
Assembly: Ascon.Polynom.Api.dll
Syntax
public interface IPropertyOwner : IPropertyValueOwner, IAbleToHaveId, IApiObject, IApiEntity, INotifyPropertyChanged
Properties
AllContracts
Возвращает коллекцию всех контрактов.
Declaration
IApiReadOnlyCollection<IContract> AllContracts { get; }
Property Value
| Type | Description |
|---|---|
| IApiReadOnlyCollection<IContract> |
AutoAppointedConcepts
Возвращает коллекцию понятий, назначаемых на владельца свойств.
Declaration
IApiReadOnlyCollection<IConcept> AutoAppointedConcepts { get; }
Property Value
| Type | Description |
|---|---|
| IApiReadOnlyCollection<IConcept> |
InheritedConcepts
Возвращает коллекцию понятий-потомков, для которых есть понятия-предки.
Declaration
IApiReadOnlyCollection<IConcept> InheritedConcepts { get; }
Property Value
| Type | Description |
|---|---|
| IApiReadOnlyCollection<IConcept> |
Properties
Возвращает коллекцию свойств.
Declaration
IApiReadOnlyCollection<IProperty> Properties { get; }
Property Value
| Type | Description |
|---|---|
| IApiReadOnlyCollection<IProperty> |
RealizedContracts
Возвращает коллекцию реализованных контрактов.
Declaration
IApiReadOnlyCollection<IContract> RealizedContracts { get; }
Property Value
| Type | Description |
|---|---|
| IApiReadOnlyCollection<IContract> |
Scopes
Возвращает коллекцию хранимых областей, в которые входит владелец свойств.
Declaration
IApiReadOnlyCollection<IPropertyOwnerScope> Scopes { get; }
Property Value
| Type | Description |
|---|---|
| IApiReadOnlyCollection<IPropertyOwnerScope> |
TileImage
Возвращает изображение предпросмотра.
Declaration
IImagePropertyValue TileImage { get; }
Property Value
| Type | Description |
|---|---|
| IImagePropertyValue |
Methods
AddDynamicProperty(IContractPropertySource)
Добавляет дополнительное свойство (назначает ему отличное от null значение).
Declaration
void AddDynamicProperty(IContractPropertySource contractPropertySource)
Parameters
| Type | Name | Description |
|---|---|---|
| IContractPropertySource | contractPropertySource | Источник свойства в понятии. |
AssignPropertyValue(IPropertyDefinition, IContract, IPropertyValueData)
Присваивает значение свойства.
Declaration
IPropertyValue AssignPropertyValue(IPropertyDefinition definition, IContract contract, IPropertyValueData data)
Parameters
| Type | Name | Description |
|---|---|---|
| IPropertyDefinition | definition | Определение свойства. |
| IContract | contract | Понятие. |
| IPropertyValueData | data | Значение свойства. |
Returns
| Type | Description |
|---|---|
| IPropertyValue | Значение свойства (или null). |
Remarks
Если понятие не задано, то значение будет присвоено в понятие "Собственные свойства."
CanDerealizeContract(IContract)
Определяет, можно ли убрать назначенный контракт с владельца свойств.
Declaration
bool CanDerealizeContract(IContract contract)
Parameters
| Type | Name | Description |
|---|---|---|
| IContract | contract | Контракт. |
Returns
| Type | Description |
|---|---|
| bool |
|
CanRealizeContract(IContract)
Определяет, можно ли реализовать контракт во владельце свойств.
Declaration
bool CanRealizeContract(IContract contract)
Parameters
| Type | Name | Description |
|---|---|---|
| IContract | contract | Контракт. |
Returns
| Type | Description |
|---|---|
| bool |
|
CreateOwnProperties(IEnumerable<IPropertyDefinition>)
Создает собственные свойства по заданным определениям свойств.
Declaration
void CreateOwnProperties(IEnumerable<IPropertyDefinition> propertyDefinitions)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IPropertyDefinition> | propertyDefinitions | Определения свойств. |
CreateOwnProperty(IPropertyDefinition)
Создает собственное свойство по заданному определению свойства.
Declaration
void CreateOwnProperty(IPropertyDefinition propertyDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| IPropertyDefinition | propertyDefinition | Определение свойства. |
DeleteOwnProperty(IPropertyDefinition)
Удаляет собственное свойство с заданным определением свойства.
Declaration
bool DeleteOwnProperty(IPropertyDefinition propertyDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| IPropertyDefinition | propertyDefinition | Определение свойства. |
Returns
| Type | Description |
|---|---|
| bool |
|
DerealizeContract(IContract)
Убирает реализованный контракт у владельца свойств.
Declaration
bool DerealizeContract(IContract contract)
Parameters
| Type | Name | Description |
|---|---|---|
| IContract | contract | Контракт. |
Returns
| Type | Description |
|---|---|
| bool |
|
Evaluate()
Вычисляет все свойства по формулам (если формулы есть).
Declaration
void Evaluate()
GetContractRealization(IContract)
Возвращает реализацию контракта.
Declaration
IContractRealization GetContractRealization(IContract contract)
Parameters
| Type | Name | Description |
|---|---|---|
| IContract | contract | Контракт. |
Returns
| Type | Description |
|---|---|
| IContractRealization | Назначенный контракт (или null). |
GetProperties(IBaseGroup, PropertyCollectionOptions)
Возвращает все свойства объекта в контексте группы.
Declaration
IApiReadOnlyCollection<IProperty> GetProperties(IBaseGroup contextGroup, PropertyCollectionOptions options = PropertyCollectionOptions.Default)
Parameters
| Type | Name | Description |
|---|---|---|
| IBaseGroup | contextGroup | Группа, в контексте которой свойства должны быть упорядочены. |
| PropertyCollectionOptions | options | Опции коллекции свойств. |
Returns
| Type | Description |
|---|---|
| IApiReadOnlyCollection<IProperty> | Коллекция свойств объекта, упорядоченная в контексте группы. |
GetProperties(PropertyCollectionOptions)
Возвращает все свойства объекта.
Declaration
IApiReadOnlyCollection<IProperty> GetProperties(PropertyCollectionOptions options = PropertyCollectionOptions.Default)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyCollectionOptions | options | Опции коллекции свойств. |
Returns
| Type | Description |
|---|---|
| IApiReadOnlyCollection<IProperty> | Коллекция свойств объекта. |
GetPropertiesOnlyFromContextGroup(IBaseGroup, PropertyCollectionOptions)
Возвращает только свойства объекта по назначенным на контекстную группу понятиям.
Declaration
IApiReadOnlyCollection<IProperty> GetPropertiesOnlyFromContextGroup(IBaseGroup contextGroup, PropertyCollectionOptions options = PropertyCollectionOptions.Default)
Parameters
| Type | Name | Description |
|---|---|---|
| IBaseGroup | contextGroup | Контекстная группа. |
| PropertyCollectionOptions | options | Опции коллекции свойств. |
Returns
| Type | Description |
|---|---|
| IApiReadOnlyCollection<IProperty> | Коллекция свойств объекта, упорядоченная в контексте группы. |
GetProperty(IPropertyQualifier, bool)
Возвращает свойство по квалификатору свойства.
Declaration
IProperty GetProperty(IPropertyQualifier propertyQualifier, bool ignoreEvents = false)
Parameters
| Type | Name | Description |
|---|---|---|
| IPropertyQualifier | propertyQualifier | Квалификатор свойства. |
| bool | ignoreEvents | Если |
Returns
| Type | Description |
|---|---|
| IProperty | Свойство (или null, если свойство не найдено). |
GetProperty(string, IContract, bool)
Возвращает свойство по коду определения свойства.
Declaration
IProperty GetProperty(string propDefCode, IContract contract = null, bool ignoreEvents = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propDefCode | Код определения свойства (простой или полный) или полный код источника свойства. |
| IContract | contract | Контракт, в котором находится свойство (опционально для простого кода). |
| bool | ignoreEvents | Если |
Returns
| Type | Description |
|---|---|
| IProperty | Свойство (или null, если свойство не найдено). |
Remarks
По полному коду определения свойства будет искать в собственных свойствах.
GetPropertyValue(string)
Возвращает значение свойства по коду определения свойства.
Declaration
IPropertyValue GetPropertyValue(string propDefCode)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propDefCode | Код определения свойства (простой или полный) или полный код источника свойства. |
Returns
| Type | Description |
|---|---|
| IPropertyValue | Значение свойства (или null). |
GetProtection()
Возвращает маркер защиты объекта.
Declaration
Protection GetProtection()
Returns
| Type | Description |
|---|---|
| Protection | Маркер защиты. |
IsValueValidByUniqueness(IPropertyDefinition, IContract, IPropertyValueData)
Возвращает признак, является ли данное значение свойства валидным для данного контрактного источника свойства и для данного владельца свойств валидным с точки зрения системы контроля уникальности значений.
Declaration
bool IsValueValidByUniqueness(IPropertyDefinition definition, IContract contract, IPropertyValueData valueData)
Parameters
| Type | Name | Description |
|---|---|---|
| IPropertyDefinition | definition | Определение свойства. |
| IContract | contract | Контракт. |
| IPropertyValueData | valueData | Значение свойства. |
Returns
| Type | Description |
|---|---|
| bool | Признак, является ли значение свойства валидным. |
RealizeContract(IContract)
Реализует контракт владельцу свойств.
Declaration
IContractRealization RealizeContract(IContract contract)
Parameters
| Type | Name | Description |
|---|---|---|
| IContract | contract | Контракт. |
Returns
| Type | Description |
|---|---|
| IContractRealization | Назначенный контракт (или null). |
Realizes(IContract)
Проверяет, реализует ли объект заданный контракт.
Declaration
bool Realizes(IContract contract)
Parameters
| Type | Name | Description |
|---|---|---|
| IContract | contract | Контракт для проверки. |
Returns
| Type | Description |
|---|---|
| bool |
|