getApplicationName() static private method

static private getApplicationName ( ) : string
return string
Esempio n. 1
0
        public UpdateManager(string urlOrPath,
                             string applicationName        = null,
                             string rootDirectory          = null,
                             IFileDownloader urlDownloader = null)
        {
            Contract.Requires(!String.IsNullOrEmpty(urlOrPath));
            Contract.Requires(!String.IsNullOrEmpty(applicationName));

            updateUrlOrPath      = urlOrPath;
            this.applicationName = applicationName ?? UpdateManager.getApplicationName();
            if (urlDownloader != null)
            {
                this.urlDownloader = urlDownloader;
            }
            else
            {
                this.urlDownloader = (Utility.IsFtpUrl(urlOrPath) ? (IFileDownloader) new FtpFileDownloader() : new FileDownloader());
            }

            if (rootDirectory != null)
            {
                this.rootAppDirectory = Path.Combine(rootDirectory, this.applicationName);
                return;
            }

            this.rootAppDirectory = Path.Combine(rootDirectory ?? GetLocalAppDataDirectory(), this.applicationName);
        }
Esempio n. 2
0
        public UpdateManager(string urlOrPath,
                             string applicationName        = null,
                             string rootDirectory          = null,
                             IFileDownloader urlDownloader = null)
        {
            Contract.Requires(!String.IsNullOrEmpty(urlOrPath));
            Contract.Requires(!String.IsNullOrEmpty(applicationName));

            updateUrlOrPath      = urlOrPath;
            this.applicationName = applicationName ?? UpdateManager.getApplicationName();
            this.urlDownloader   = urlDownloader ?? new FileDownloader();

            this.rootAppDirectory = rootDirectory ?? Path.Combine(GetLocalAppDataDirectory(), "Fusetools", this.applicationName, "App");
            this.Log().Info(this.rootAppDirectory);
        }