Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MockFileProvider"/> class.
 /// </summary>
 public MockFileProvider()
 {
     _random         = new Random();
     _randomDataFile = new MockFile(CreateRandomData(10000));
     _root           = new MockDirectory {
         { "index.html", StockResource.GetBytes("index.html") },
         { "random.dat", _randomDataFile },
         { "sub", new MockDirectory {
               { "index.html", StockResource.GetBytes("sub.index.html") },
           } },
     };
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MockFileProvider"/> class.
        /// </summary>
        public MockFileProvider()
        {
            _randomNumberGenerator = new RNGCryptoServiceProvider();
            _randomDataFile        = new MockFile(CreateRandomData(10000));

            var sub = new MockDirectory
            {
                { "index.html", StockResource.GetBytes("sub.index.html") },
            };

            _root = new MockDirectory
            {
                { "index.html", StockResource.GetBytes("index.html") },
                { "random.dat", _randomDataFile },
                { "sub", sub },
            };
        }