Exemple #1
0
        private void CreateAndAddMergeResolution(IEntityInfo entityInfo, OperationTypes operationType, IEntity entity)
        {
            var resolution = MergeResolution.Create(entityInfo, operationType, entity);

            if (resolution == null)
            {
                return;
            }

            MergeResolutionToApplies.Add(resolution);
        }
Exemple #2
0
        public static void InsertInLocal(IDataStore localDataStore, ISyncSessionInfo syncSessionInfo, ISyncable remoteEntity)
        {
            var entityInfo = localDataStore.GetEntityInfo(remoteEntity);

            var mergeResolution = new MergeResolution
            {
                OperationType = OperationTypes.Insert,
                Entity        = EntityChange.Create(entityInfo, remoteEntity)
            };

            mergeResolution.ApplyResolution(localDataStore as ISqlDataStore, syncSessionInfo);
        }