Ejemplo n.º 1
0
        public IEnumerable <uSyncAction> Import(uSyncOptions options)
        {
            var hubClient     = new HubClientService(options.ClientId);
            var summaryClient = new SummaryHandler(hubClient);

            return(uSyncService.Import(settings.RootFolder, options.Force, summaryClient.PostSummary, summaryClient.PostUdate));
        }
        protected async Task CreateGroupAndSendAsync(string message)
        {
            await GroupService.PostAsync(Group);

            await HubClientService.SendAsync(Models.Constants.MessagesModule, Group.Id, message);

            NavigationManager.NavigateTo($"messages/{Group.Id}");
        }
        public SyncActionResult ImportPost(SyncActionOptions options)
        {
            var hubClient = new HubClientService(options.ClientId);
            var actions   = uSyncService.PerformPostImport(
                settings.RootFolder, settings.DefaultSet, options.Actions);

            return(new SyncActionResult(actions));
        }
Ejemplo n.º 4
0
        public IEnumerable <uSyncAction> Report(uSyncOptions options)
        {
            var hubClient = new HubClientService(options.ClientId);

            return(uSyncService.Report(settings.RootFolder, new SyncHandlerOptions()
            {
                Group = options.Group
            },
                                       hubClient.Callbacks()));
        }
Ejemplo n.º 5
0
        public IEnumerable <uSyncAction> Import(uSyncOptions options)
        {
            var hubClient = new HubClientService(hubContext, options.ClientId);

            return(uSyncService.Import(uSyncConfig.GetRootFolder(), options.Force, new SyncHandlerOptions()
            {
                Group = options.Group
            },
                                       callbacks: hubClient.Callbacks()));
        }
Ejemplo n.º 6
0
 private async Task SendAsync()
 {
     if (!string.IsNullOrEmpty(GroupId))
     {
         await HubClientService.SendAsync(Models.Constants.MessagesModule, GroupId, message);
     }
     else
     {
         await CreateGroupAndSend.InvokeAsync(message);
     }
 }
        public SyncActionResult ExportHandler(SyncActionOptions options)
        {
            var hubClient = new HubClientService(options.ClientId);

            var actions = uSyncService.ExportHandler(options.Handler, new uSyncImportOptions
            {
                Callbacks  = hubClient.Callbacks(),
                HandlerSet = settings.DefaultSet,
                RootFolder = settings.RootFolder
            });

            return(new SyncActionResult(actions));
        }
        public SyncActionResult ImportPost(SyncActionOptions options)
        {
            var hubClient = new HubClientService(hubContext, options.ClientId);

            var handlerSet = !string.IsNullOrWhiteSpace(options.Set)
                ? options.Set : uSyncConfig.Settings.DefaultSet;

            var actions = uSyncService.PerformPostImport(
                uSyncConfig.GetRootFolder(),
                handlerSet,
                options.Actions);

            return(new SyncActionResult(actions));
        }
        public SyncActionResult ImportHandler(SyncActionOptions options)
        {
            var hubClient = new HubClientService(options.ClientId);

            var actions = uSyncService.ImportHandler(options.Handler, new uSyncImportOptions
            {
                Callbacks  = hubClient.Callbacks(),
                HandlerSet = settings.DefaultSet,
                RootFolder = settings.RootFolder,
                Flags      = options.Force ? Core.Serialization.SerializerFlags.Force : Core.Serialization.SerializerFlags.None
            });

            return(new SyncActionResult(actions));
        }
Ejemplo n.º 10
0
        public IEnumerable <uSyncAction> Export(uSyncOptions options)
        {
            var hubClient = new HubClientService(hubContext, options.ClientId);

            if (options.Clean)
            {
                uSyncService.CleanExportFolder(uSyncConfig.GetRootFolder());
            }

            return(uSyncService.Export(uSyncConfig.GetRootFolder(), new SyncHandlerOptions()
            {
                Group = options.Group
            },
                                       hubClient.Callbacks()));
        }
        public SyncActionResult ImportHandler(SyncActionOptions options)
        {
            var hubClient = new HubClientService(hubContext, options.ClientId);

            var handlerSet = !string.IsNullOrWhiteSpace(options.Set)
                ? options.Set : uSyncConfig.Settings.DefaultSet;

            var actions = uSyncService.ImportHandler(options.Handler, new uSyncImportOptions
            {
                Callbacks  = hubClient.Callbacks(),
                HandlerSet = handlerSet,
                RootFolder = uSyncConfig.GetRootFolder(),
                Flags      = options.Force ? Core.Serialization.SerializerFlags.Force : Core.Serialization.SerializerFlags.None
            });

            return(new SyncActionResult(actions));
        }
Ejemplo n.º 12
0
 public SummaryHandler(HubClientService hubClient)
 {
     this.hubClient = hubClient;
 }