Exemplo n.º 1
0
        private static CommandResponse GetResponse(ICommandContext commandContext, IFileSystemContext fileSystemContext, List <Tuple <string, string> > errors)
        {
            var response = new OpenCommand().GetResponse(commandContext, fileSystemContext, true);

            if (errors.Any())
            {
                var errorMessages = errors.Select(e => "[{0}: {1}]".FormatWith(e.Item1, e.Item2));

                response.error = ResourceManager.GetString("Uploading_Files_Error").FormatWith(string.Join(",", errorMessages));
            }

            return(response);
        }
Exemplo n.º 2
0
        private static CommandResponse GetResponse(ICommandContext commandContext, IFileSystemContext fileSystemContext, OpenCommandResponse response, bool forceTree = false)
        {
            response.cwd = fileSystemContext.Current.Info;
            response.cdc = fileSystemContext.Current.Children;

            bool treeRequested;

            if (forceTree || (bool.TryParse(commandContext.Parameters["tree"] ?? string.Empty, out treeRequested) && treeRequested))
            {
                response.tree = fileSystemContext.Tree;
            }

            return(response);
        }
Exemplo n.º 3
0
 internal CommandResponse GetResponse(ICommandContext commandContext, IFileSystemContext fileSystemContext, bool forceTree = false)
 {
     return(GetResponse(commandContext, fileSystemContext, new OpenCommandResponse
     {
         tmb = false,
         disabled = commandContext.DisabledCommands.ToArray(),
         parameters = new InitializationParameters
         {
             dotFiles = false,
             archives = new string[] {},
             extract = new string[] {},
         }
     }, forceTree));
 }
Exemplo n.º 4
0
 public SourceController(IFileSystemContext fileSystem)
 {
     FileSystem = fileSystem;
 }
Exemplo n.º 5
0
 public SymbolController(IFileSystemContext fileSystem)
 {
     FileSystem = fileSystem;
 }
Exemplo n.º 6
0
 public UploadController(IFileSystemContext fileSystem)
 {
     FileSystem = fileSystem;
 }