Exemplo n.º 1
0
        /// <summary>
        /// Applies updated values from <paramref name="update"/> to this instance
        /// </summary>
        /// <remarks>Used to apply data updates to the current instance. This WILL overwrite existing values.</remarks>
        /// <param name="update">The next data update for this instance</param>
        public void UpdateValues(MultiPeriodField update)
        {
            if (update == null)
            {
                return;
            }

            foreach (var kvp in update.Store)
            {
                SetPeriodValue(kvp.Period, kvp.Value);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Sets period values for non existing periods from a previous instance
        /// </summary>
        /// <remarks>Used to fill-forward values from previous dates</remarks>
        /// <param name="previous">The previous instance</param>
        public void UpdateValues(MultiPeriodField previous)
        {
            if (previous == null)
            {
                return;
            }

            foreach (var kvp in previous.Store.Where(kvp => !Store.ContainsKey(kvp.Key)))
            {
                SetPeriodValue(kvp.Key, kvp.Value);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Sets period values for non existing periods from a previous instance
        /// </summary>
        /// <remarks>Used to fill-forward values from previous dates</remarks>
		/// <param name="previous">The previous instance</param>
        public void UpdateValues(MultiPeriodField previous)
        {
            if (previous == null)
                return;

            foreach (var kvp in previous.Store.Where(kvp => !Store.ContainsKey(kvp.Key)))
            {
                SetPeriodValue(kvp.Key, kvp.Value);
            }
        }