public FilePatcher(string filePath, string diffPath, string outputFilePath)
        {
            Checks.ArgumentFileExists(filePath, "filePath");
            Checks.ArgumentFileExists(diffPath, "diffPath");
            Checks.ArgumentParentDirectoryExists(outputFilePath, "outputFilePath");

            DebugLogger.LogConstructor();
            DebugLogger.LogVariable(filePath, "filePath");
            DebugLogger.LogVariable(diffPath, "diffPath");
            DebugLogger.LogVariable(outputFilePath, "outputFilePath");

            _filePath       = filePath;
            _diffPath       = diffPath;
            _outputFilePath = outputFilePath;
        }
Beispiel #2
0
        public ChunkedHttpDownloader(string destinationFilePath, RemoteResource resource, int timeout)
        {
            Checks.ArgumentParentDirectoryExists(destinationFilePath, "destinationFilePath");
            Checks.ArgumentValidRemoteResource(resource, "resource");
            Checks.ArgumentMoreThanZero(timeout, "timeout");

            DebugLogger.LogConstructor();
            DebugLogger.LogVariable(destinationFilePath, "destinationFilePath");
            DebugLogger.LogVariable(resource, "resource");
            DebugLogger.LogVariable(timeout, "timeout");

            _destinationFilePath = destinationFilePath;
            _resource            = resource;
            _timeout             = timeout;
        }
Beispiel #3
0
        public HttpDownloader(string destinationFilePath, string[] mirrorUrls, long size, int timeout)
        {
            Checks.ArgumentParentDirectoryExists(destinationFilePath, "destinationFilePath");
            Checks.ArgumentMoreThanZero(timeout, "timeout");
            Checks.ArgumentNotNull(mirrorUrls, "mirrorUrls");

            DebugLogger.LogConstructor();
            DebugLogger.LogVariable(destinationFilePath, "destinationFilePath");
            DebugLogger.LogVariable(mirrorUrls, "mirrorUrls");
            DebugLogger.LogVariable(size, "size");
            DebugLogger.LogVariable(timeout, "timeout");

            _destinationFilePath = destinationFilePath;
            _mirrorUrls          = mirrorUrls;
            _size    = size;
            _timeout = timeout;
        }
        public RemoteResourceDownloader(string destinationFilePath, string destinationMetaPath, RemoteResource resource,
                                        bool useTorrents,
                                        CreateNewHttpDownloader createNewHttpDownloader,
                                        CreateNewChunkedHttpDownloader createNewChunkedHttpDownloader,
                                        CreateNewTorrentDownloader createNewTorrentDownloader)
        {
            Checks.ArgumentParentDirectoryExists(destinationFilePath, "destinationFilePath");
            Checks.ArgumentValidRemoteResource(resource, "resource");

            DebugLogger.LogConstructor();
            DebugLogger.LogVariable(destinationFilePath, "destinationFilePath");
            DebugLogger.LogVariable(resource, "resource");
            DebugLogger.LogVariable(useTorrents, "useTorrents");

            _destinationFilePath            = destinationFilePath;
            _destinationMetaPath            = destinationMetaPath;
            _resource                       = resource;
            _useTorrents                    = useTorrents;
            _createNewHttpDownloader        = createNewHttpDownloader;
            _createNewChunkedHttpDownloader = createNewChunkedHttpDownloader;
            _createNewTorrentDownloader     = createNewTorrentDownloader;
        }