Esempio n. 1
0
 public CommitMessageHandler(string twitterHandle, IDictionary<string,string> aliases)
 {
     if( !string.IsNullOrEmpty(twitterHandle) ) {
         _tweeter = new Tweeter(twitterHandle);
     }
     _aliases = aliases;
 }
Esempio n. 2
0
        public UploadedFileHandler(string feedName, string localfeedLocation, string canonicalFeedUrl, string packageStoragePath, string packagePrefixUrl, string twitterHandle, CloudFileSystem cloudFileSystem)
        {
            _feedName = feedName;
            _localfeedLocation = localfeedLocation.GetFullPath();
            if( !_localfeedLocation.EndsWith(".xml")) {
                _localfeedLocation +=  ".xml";
            }
            _canonicalFeedUrl = new Uri(canonicalFeedUrl);
            _packageStorageFolder = packageStoragePath;
            _packagePrefixUrl = new Uri(packagePrefixUrl);
            _cloudFileSystem = cloudFileSystem;

            if (!string.IsNullOrEmpty(twitterHandle)) {
                _tweeter = new Tweeter(twitterHandle);
            }

            if( _cloudFileSystem == null ) {
                _packageStorageFolder = _packageStorageFolder.GetFullPath();
                if(!Directory.Exists(_packageStorageFolder)) {
                    Directory.CreateDirectory(_packageStorageFolder);
                }
            }

            CurrentTask.Events += new DownloadProgress((remoteLocation, location, progress) => "Downloading {0}".format(remoteLocation.UrlDecode()).PrintProgressBar(progress));
            CurrentTask.Events += new DownloadCompleted((remoteLocation, locallocation) => Console.WriteLine());

            FeedHandlers.Add(feedName, this);
        }
Esempio n. 3
0
        public UploadedFileHandler(string localfeedLocation, string canonicalFeedUrl, string packageStoragePath, string packagePrefixUrl, string twitterHandle, CloudFileSystem cloudFileSystem)
        {
            _localfeedLocation = localfeedLocation.GetFullPath();
            _canonicalFeedUrl = new Uri(canonicalFeedUrl);
            _packageStorageFolder = packageStoragePath;
            _packagePrefixUrl = new Uri(packagePrefixUrl);
            _cloudFileSystem = cloudFileSystem;

            if (!string.IsNullOrEmpty(twitterHandle)) {
                _tweeter = new Tweeter(twitterHandle);
            }

            if( _cloudFileSystem == null ) {
                _packageStorageFolder = _packageStorageFolder.GetFullPath();
                if(!Directory.Exists(_packageStorageFolder)) {
                    Directory.CreateDirectory(_packageStorageFolder);
                }
            }
        }