Ejemplo n.º 1
0
        public void SetPropertyDataFromSubTransaction(DataContainer source)
        {
            ArgumentUtility.CheckNotNull("source", source);

            CheckNotDiscarded();
            source.CheckNotDiscarded();
            CheckSourceForSetDataFromSubTransaction(source);

            foreach (var kvp in _propertyValues)
            {
                var sourcePropertyValue = source.GetPropertyValue(kvp.Key);
                kvp.Value.SetDataFromSubTransaction(sourcePropertyValue);
            }

            _hasBeenChanged = null;
            RaiseStateUpdatedNotification(State);
        }
Ejemplo n.º 2
0
        public void SetValueDataFromSubTransaction(PropertyDefinition propertyDefinition, DataContainer sourceContainer)
        {
            ArgumentUtility.CheckNotNull("propertyDefinition", propertyDefinition);
            ArgumentUtility.CheckNotNull("sourceContainer", sourceContainer);

            CheckNotDiscarded();
            sourceContainer.CheckNotDiscarded();
            CheckSourceForSetDataFromSubTransaction(sourceContainer);

            var propertyValue       = GetPropertyValue(propertyDefinition);
            var sourcePropertyValue = sourceContainer.GetPropertyValue(propertyDefinition);

            propertyValue.SetDataFromSubTransaction(sourcePropertyValue);

            // Invalidate state rather than recalculating it - SetValueDataFromSubTransaction might be called multiple times.
            _hasBeenChanged = null;
        }