Esempio n. 1
0
        internal override void copyItem(ReplicaItemBase src)
        {
            Book source = (Book)src;

            copyItemBaseValues(source);

            _authors         = null;
            _readOnlyAuthors = null;

            if (source != null)
            {
                this._title = source._title;
                if (source._authors != null)
                {
                    _authors         = new ObservableCollection <IPerson>();
                    _readOnlyAuthors = new ReadOnlyObservableCollection <IPerson>(_authors);

                    foreach (IPerson person in source._authors)
                    {
                        this._authors.Add(person);
                    }

                    _authors.CollectionChanged += aurthors_CollectionChanged;
                }
            }
            else
            {
                this._title = String.Empty;
            }
            OnPropertyChanged(null);
        }
Esempio n. 2
0
 protected void copyItemBaseValues(ReplicaItemBase source)
 {
     if (source != null)
     {
         _id.RowId = source._id.RowId;
         _id.CreationReplicaLocalId     = source._id.CreationReplicaLocalId;
         _id.CreationTickCount          = source._id.CreationTickCount;
         _id.ModificationReplicaLocalId = source._id.ModificationReplicaLocalId;
         _id.ModificationTickCount      = source._id.ModificationTickCount;
         _id.ItemType = source._id.ItemType;
     }
 }
Esempio n. 3
0
        internal override void copyItem(ReplicaItemBase src)
        {
            Person source = (Person)src;

            copyItemBaseValues(source);
            if (source != null)
            {
                this._name = source._name;
            }
            else
            {
                this._name = String.Empty;
            }
            OnPropertyChanged(null);
        }
Esempio n. 4
0
 internal abstract void copyItem(ReplicaItemBase source);