Example #1
0
 public RelatedDataSaver(IEntryBaseHelper eph, ILJClient ljc,
                         IUserpicStorageFactory ups, IFileStorageFactory fsf,
                         ISuitableCommentsPicker scp)
 {
     _eph = eph;
     _ljc = ljc;
     _ups = ups;
     _fsf = fsf;
     _scp = scp;
 }
 public RelatedDataSaver(IEntryBaseHelper eph, ILJClient ljc,
     IUserpicStorageFactory ups, IFileStorageFactory fsf,
     ISuitableCommentsPicker scp)
 {
     _eph = eph;
     _ljc = ljc;
     _ups = ups;
     _fsf = fsf;
     _scp = scp;
 }
 /// <summary>
 /// 构造函数。
 /// </summary>
 private FileStorageFactoryInstance(string fileStorageFactoryAssembly)
 {
     if (string.IsNullOrEmpty(fileStorageFactoryAssembly))
         throw new ArgumentNullException("未配置文件存储的实现工厂程序集");
     this.factory = Cache[fileStorageFactoryAssembly] as IFileStorageFactory;
     if (this.factory == null)
     {
         this.factory = TypeHelper.Create(fileStorageFactoryAssembly) as IFileStorageFactory;
         if (this.factory != null)
             Cache[fileStorageFactoryAssembly] = this.factory;
     }
 }
Example #4
0
        public bool Registry(string serverName, IFileStorageFactory factory)
        {
            bool isContains;

            Lock();
            isContains = _ragistries.ContainsKey(serverName);
            if (!isContains)
            {
                _ragistries.Add(serverName, factory);
            }
            UnLock();
            return(!isContains);
        }
 /// <summary>
 /// 构造函数。
 /// </summary>
 public DefaultWebDAVDocumentHandler()
 {
     this.storageFactory = FileStorageFactoryInstance.Instance;
 }