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

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

An amendment is like a variable value that is added to a data tuple. The difference is that the amendment does not need to be defined in the dataset's structure and also not all the data tuples need to have the same amendments. This method creates and amendment object, attaches it to the data tuple but does NOT persist it.
public CreateAmendment ( string value, string note, System.DateTime samplingTime, System.DateTime resultTime, ObtainingMethod obtainingMethod, System.Int64 parameterId, DataTuple tuple ) : Amendment
value string
note string
samplingTime System.DateTime
resultTime System.DateTime
obtainingMethod BExIS.Dlm.Entities.DataStructure.ObtainingMethod
parameterId System.Int64 The identifier of the parameter that the amendment will be linked to. needs more clarification
tuple BExIS.Dlm.Entities.Data.DataTuple The data tuple receiving the amendment.ku
Результат BExIS.Dlm.Entities.Data.Amendment
        public Amendment CreateAmendment(string value, string note, DateTime samplingTime, DateTime resultTime, ObtainingMethod obtainingMethod, Int64 parameterId, DataTuple tuple)
        {
            Contract.Requires(!string.IsNullOrWhiteSpace(value));
            Contract.Requires(parameterId > 0);
            Contract.Requires(tuple != null);
            Contract.Ensures(Contract.Result<Amendment>() != null);

            Amendment e = new Amendment()
            {
                Value = value,
                Note = note,
                SamplingTime = samplingTime,
                ResultTime = resultTime,
                ObtainingMethod = obtainingMethod,
                ParameterId = parameterId,
                Tuple = tuple,
            };

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