예제 #1
0
    public static string GetAttachmentMoverProgress()
    {
        var messages = string.Join("\n", AttachmentMover.DumpProgress().ToArray().Reverse()) + "\n";

        var progress = new {
            AttachmentMover.Running,
            Messages = string.IsNullOrWhiteSpace(messages) ? string.Empty : messages,
        };

        return(js.Serialize(progress));
    }
예제 #2
0
    public static string StopMovingAttachmentsToFileSystem()
    {
        try
        {
            AttachmentMover.Stop();

            return(js.Serialize(new { Success = true }));
        }
        catch (Exception e)
        {
            return(js.Serialize(new {
                Success = false,
                e.Message,
            }));
        }
    }
예제 #3
0
    public static string StartMovingAttachmentsToFileSystem()
    {
        try {
            //AttachmentMover.Start(runFake: true);
            AttachmentMover.Start();

            return(js.Serialize(new {
                Success = true,
                AttachmentMover.Running,
            }));
        }
        catch (Exception e) {
            return(js.Serialize(new {
                Success = false,
                e.Message,
            }));
        }
    }