BExIS.Dlm.Services.Data.DatasetManager.CreateExtendedPropertyValue C# (CSharp) Метод

CreateExtendedPropertyValue() публичный Метод

An extended property is a custom property that is assigned to a dataset version in addition to the predefined properties. Then each dataset version owner/ accessor can provide a value for the attached properties.
public CreateExtendedPropertyValue ( System.Int64 extendedPropertyId, string value, string note, System.DateTime samplingTime, System.DateTime resultTime, ObtainingMethod obtainingMethod, DatasetVersion datasetVersion ) : ExtendedPropertyValue
extendedPropertyId System.Int64 The identifier of the extended property.
value string The value to be assigned to the extended property of the dataset version.
note string
samplingTime System.DateTime
resultTime System.DateTime
obtainingMethod BExIS.Dlm.Entities.DataStructure.ObtainingMethod
datasetVersion BExIS.Dlm.Entities.Data.DatasetVersion The dataset version receiving the property value
Результат BExIS.Dlm.Entities.Data.ExtendedPropertyValue
        public ExtendedPropertyValue CreateExtendedPropertyValue(Int64 extendedPropertyId, string value, string note, DateTime samplingTime, DateTime resultTime, ObtainingMethod obtainingMethod,
            DatasetVersion datasetVersion)
        {
            Contract.Requires(!string.IsNullOrWhiteSpace(value));
            Contract.Requires(extendedPropertyId > 0);
            Contract.Requires(datasetVersion != null);

            Contract.Ensures(Contract.Result<ExtendedPropertyValue>() != null);
            ExtendedPropertyValue e = new ExtendedPropertyValue()
            {
                Value = value,
                Note = note,
                SamplingTime = samplingTime,
                ResultTime = resultTime,
                ObtainingMethod = obtainingMethod,
                ExtendedPropertyId = extendedPropertyId,
                DatasetVersion = datasetVersion, // subject to delete
            };
            e.DatasetVersion.ExtendedPropertyValues.Add(e);

            //using (IUnitOfWork uow = this.GetUnitOfWork())
            //{
            //    IRepository<ExtendedPropertyValue> repo = uow.GetRepository<ExtendedPropertyValue>();
            //    repo.Put(e);
            //    uow.Commit();
            //}
            return (e);
        }