Initialize() private method

private Initialize ( ) : void
return void
Example #1
0
    /// <summary>
    /// 创建 DiskCacheProvider 对象
    /// </summary>
    /// <param name="path">磁盘缓存路径</param>
    /// <param name="serializer">二进制序列化器</param>
    public DiskCacheProvider( string path, IFormatter serializer )
    {
      if ( Path.IsPathRooted( path ) == false )
        throw new ArgumentException( "must be a rooted path", path );

      _manager = new DiskCacheManager( path );
      _serializer = serializer;

      _manager.Initialize();
    }
Example #2
0
        /// <summary>
        /// 创建 DiskCacheProvider 对象
        /// </summary>
        /// <param name="path">磁盘缓存路径</param>
        /// <param name="serializer">二进制序列化器</param>
        public DiskCacheProvider(string path, IFormatter serializer)
        {
            if (Path.IsPathRooted(path) == false)
            {
                throw new ArgumentException("must be a rooted path", path);
            }

            _manager    = new DiskCacheManager(path);
            _serializer = serializer;

            _manager.Initialize();
        }