예제 #1
0
                public void VisitProperty <TDestinationElementProperty, TDestinationElement>(TDestinationElementProperty dstElementProperty, ref TDestinationContainer dstContainer)
                    where TDestinationElementProperty : ICollectionElementProperty <TDestinationContainer, TDestinationElement>
                {
                    if (TypeConversion.TryConvert <TSourceElement, TDestinationElement>(SrcElementValue, out var dstElementValue))
                    {
                        if (CustomEquality.Equals(dstElementValue, dstElementProperty.GetValue(ref dstContainer)))
                        {
                            return;
                        }

                        dstElementProperty.SetValue(ref dstContainer, dstElementValue);

                        /*
                         * propertyChangeTracker.IncrementVersion<TDestinationProperty, TDestinationContainer, TDestinationValue>(DstProperty, ref DstContainer);
                         */

                        return;
                    }

                    if (dstElementProperty.IsContainer)
                    {
                        var changeTracker = new ChangeTracker(/*propertyChangeTracker.VersionStorage*/);

                        dstElementValue = dstElementProperty.GetValue(ref dstContainer);

                        PropertyContainer.Transfer(ref dstElementValue, ref SrcElementValue, ref changeTracker);

                        dstElementProperty.SetValue(ref dstContainer, dstElementValue);

                        /*
                         * if (changeTracker.IsChanged())
                         * {
                         *  propertyChangeTracker.IncrementVersion<TDestinationProperty, TDestinationContainer, TDestinationValue>(DstProperty, ref DstContainer);
                         * }
                         */
                    }
                }
예제 #2
0
 public void VisitCollectionProperty <TElementProperty, TElement>(TElementProperty property, ref TDestinationContainer container)
     where TElementProperty : ICollectionProperty <TDestinationContainer, TElement>, ICollectionElementProperty <TDestinationContainer, TElement>
 {
     throw new NotSupportedException();
 }