Beispiel #1
0
 public CachingPhotoHandler(IFileSystemPhotoWriter writer, PhotosConfiguration configuration, ITracer upstreamTracer)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     if (configuration == null)
     {
         throw new ArgumentNullException("configuration");
     }
     if (upstreamTracer == null)
     {
         throw new ArgumentNullException("upstreamTracer");
     }
     this.tracer = ExTraceGlobals.UserPhotosTracer.Compose(upstreamTracer);
     this.writer = writer;
     this.sizesToCacheOnFileSystem    = configuration.SizesToCacheOnFileSystem;
     this.photosRootDirectoryFullPath = configuration.PhotosRootDirectoryFullPath;
 }
Beispiel #2
0
 public FileSystemPhotoUploadHandler(PhotosConfiguration configuration, IFileSystemPhotoWriter writer, ITracer upstreamTracer)
 {
     if (configuration == null)
     {
         throw new ArgumentNullException("configuration");
     }
     if (!new DirectoryInfo(configuration.ExchangeInstallPath).Exists)
     {
         throw new ArgumentException("configuration.ExchangeInstallPath");
     }
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     if (upstreamTracer == null)
     {
         throw new ArgumentNullException("upstreamTracer");
     }
     this.tracer         = ExTraceGlobals.UserPhotosTracer.Compose(upstreamTracer);
     this.upstreamTracer = upstreamTracer;
     this.writer         = writer;
     this.photosRootDirectoryFullPath = configuration.PhotosRootDirectoryFullPath;
     this.sizesToCacheOnFileSystem    = configuration.SizesToCacheOnFileSystem;
 }