Interface IMeasureEntity
Измеряемая величина.
Inherited Members
Namespace: Ascon.Polynom.Api
Assembly: Ascon.Polynom.Api.dll
Syntax
public interface IMeasureEntity : IDeleteableApiObject, ICodeableApiObject, IAbleToHaveChangeableName, IAbleToHaveName, IAbleToHaveDescription, IAbleToHaveId, IApiObject, IApiEntity, INotifyPropertyChanged
Properties
BasicUnit
Возвращает базовую единицу измерения для данной измеряемой величины.
Declaration
IMeasureUnit BasicUnit { get; set; }
Property Value
| Type | Description |
|---|---|
| IMeasureUnit |
Statistic
Возвращает статистику.
Declaration
IReadOnlyList<IStatisticItem> Statistic { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<IStatisticItem> | Статистика. |
Units
Возвращает коллекцию единиц измерения для данной измеряемой величины.
Declaration
IApiReadOnlyCollection<IMeasureUnit> Units { get; }
Property Value
| Type | Description |
|---|---|
| IApiReadOnlyCollection<IMeasureUnit> |
Methods
Convert(IMeasureUnit, IMeasureUnit, double)
Переводит значение в новые единицы измерения.
Declaration
double Convert(IMeasureUnit srcUnit, IMeasureUnit dstUnit, double value)
Parameters
| Type | Name | Description |
|---|---|---|
| IMeasureUnit | srcUnit | Исходная единица измерения. |
| IMeasureUnit | dstUnit | Новая единица измерения. |
| double | value | Значение в исходных единицах измерения. |
Returns
| Type | Description |
|---|---|
| double | Значение в новой единице измерения. |
CreateMeasureUnit(string, double, double, string, string, Guid?, ObjectStorageType)
Создает единицу измерения.
Declaration
IMeasureUnit CreateMeasureUnit(string name, double fromBasicFactor = 1, double fromBasicOffset = 0, string designation = null, string code = null, Guid? id = null, ObjectStorageType storageType = ObjectStorageType.Persistent)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Имя единицы измерения. |
| double | fromBasicFactor | Множитель для пересчета из базовой единицы. |
| double | fromBasicOffset | Смещение для пересчета из базовой единицы. |
| string | designation | Описание. |
| string | code | Идентификатор ЕдИзм. |
| Guid? | id | Уникальный идентификатор. |
| ObjectStorageType | storageType | Тип хранения. |
Returns
| Type | Description |
|---|---|
| IMeasureUnit | Созданная единица измерения. |