Beispiel #1
0
        public void MergeMutableInformation(SpecificationInformation specificationInformation)
        {
            if (LastEditDate == specificationInformation.LastEditDate && FundingPeriodEnd == specificationInformation.FundingPeriodEnd && (FundingStreamIds ?? Enumerable.Empty <string>()).SequenceEqual(specificationInformation.FundingStreamIds ?? Enumerable.Empty <string>()))
            {
                return;
            }

            // set flag to IsDirty so we persist to cosmos
            IsDirty = true;

            LastEditDate     = specificationInformation.LastEditDate;
            FundingPeriodEnd = specificationInformation.FundingPeriodEnd;
            FundingStreamIds = specificationInformation.FundingStreamIds?.ToArray();
        }
Beispiel #2
0
        public void MergeSpecificationInformation(SpecificationInformation specificationInformation)
        {
            Specifications ??= new List <SpecificationInformation>();

            SpecificationInformation existingSpecificationInformation = Specifications.SingleOrDefault(_ => _.Id == specificationInformation.Id);

            if (existingSpecificationInformation == null)
            {
                _isDirty = true;

                Specifications.Add(specificationInformation);
            }
            else
            {
                existingSpecificationInformation.MergeMutableInformation(specificationInformation);
            }
        }