public bool Apply(Guid id, IEnumerable <INChange> changes, IEnumerable <Guid> newFileBodies, ChangesetDataSource source = ChangesetDataSource.Native) { var changesetData = new DChangesetData { Identity = Guid.NewGuid() }; try { var bodies = newFileBodies.ToList(); { changesetData.Changes.AddRange(changes.Select(x => x.Dto)); changesetData.NewFileBodies.AddRange(bodies); } if (bodies.Any()) { _changesetUploader.Upload(changesetData); } } catch { } _serverApi.Change(changesetData); return(true); }
public Guid Apply(IEnumerable <INChange> changes, IEnumerable <Guid> newFileBodies, ChangesetDataSource source = ChangesetDataSource.Native, MergeChangePolicy mergePolicy = MergeChangePolicy.Deny) { var bodies = newFileBodies.ToList(); var changesetData = new DChangesetData { Identity = Guid.NewGuid() }; { changesetData.Changes.AddRange(changes.Select(x => x.Dto)); changesetData.NewFileBodies.AddRange(bodies); } if (bodies.Any()) { _changesetUploader.Upload(changesetData); } _serverApi.Change(changesetData); return(changesetData.Identity); }