Exemple #1
0
 public UserImageGenerator(
     ServiceLocation serviceLocation,
     UserManager <T> userManager)
 {
     _serviceLocation = serviceLocation;
     _userManager     = userManager;
 }
Exemple #2
0
 public UrlConverter(
     ServiceLocation serviceLocation,
     AppsContainer appsContainer)
 {
     _serviceLocation = serviceLocation;
     _appsContainer   = appsContainer;
 }
Exemple #3
0
        public static string GetProbeDownloadAddress(ServiceLocation serviceLocation, string fullpath)
        {
            var(siteName, folders, fileName) = SplitToPath(fullpath);
            var domain = string.Format(serviceLocation.ProbeIO, siteName);
            var path   = (string.Join('/', folders).EncodePath() + "/").TrimStart('/');

            return($"{domain}/{path}{fileName.ToUrlEncoded()}");
        }
Exemple #4
0
 public StorageService(
     OSSApiService ossApiService,
     AppsContainer appsContainer,
     FilesService filesService,
     ServiceLocation serviceLocation)
 {
     _ossApiService   = ossApiService;
     _appsContainer   = appsContainer;
     _filesService    = filesService;
     _serviceLocation = serviceLocation;
 }
Exemple #5
0
        public static string GetProbeDownloadAddress(this ServiceLocation serviceLocation, string siteName, string path, string fileName)
        {
            var fullPath = GetProbeFullPath(siteName, path, fileName);

            return(GetProbeDownloadAddress(serviceLocation, fullPath));
        }
Exemple #6
0
 /// <summary>
 /// Get downloadable file address for probe content.
 /// </summary>
 /// <param name="serviceLocation"></param>
 /// <param name="fullpath">sitename/filepath/filename.extension</param>
 /// <returns></returns>
 public static string GetProbeDownloadAddress(ServiceLocation serviceLocation, string fullpath)
 {
     return($"{serviceLocation.Probe}/Download/Open/{fullpath.EncodePath()}");
 }
Exemple #7
0
        public static string GetProbeDownloadAddress(ServiceLocation serviceLocation, string siteName, string path, string fileName)
        {
            var filePath = $"{path}/{fileName}".TrimStart('/');

            return($"{serviceLocation.Probe}/Download/Open/{siteName.ToUrlEncoded()}/{filePath.EncodePath()}");
        }
Exemple #8
0
 public UrlConverter(ServiceLocation serviceLocation)
 {
     _serviceLocation = serviceLocation;
 }
Exemple #9
0
        public static string GetProbeDownloadAddress(ServiceLocation serviceLocation, string siteName, string path, string fileName)
        {
            var filePath = $"{path}/{fileName}".TrimStart('/');

            return($"{serviceLocation.Probe}/Download/InSites/{siteName}/{filePath}");
        }
Exemple #10
0
 public static string GetProbeDownloadAddress(ServiceLocation serviceLocation, string fullpath)
 {
     return($"{serviceLocation.Probe}/Download/InSites/{fullpath}");
 }