/// <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") }, } }, }; }
/// <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 }, }; }