src/packages/EmbedIO.Testing/MockFileProvider.cs
/// <summary>
/// <para>Creates and returns a new set of random data bytes.</para>
/// <para>After this method returns, requests for the random data file
/// should return the same bytes returned by this method.</para>
/// </summary>
/// <param name="newLength">The length of the new random data.</param>
/// <returns>An array of bytes containing the new random data.</returns>
/// <seealso cref="RandomDataUrlPath"/>
/// <seealso cref="RandomDataLength"/>
/// <seealso cref="GetRandomData"/>
Creates and returns a new set of random data bytes.After this method returns, requests for the random data file
should return the same bytes returned by this method.
Creates and returns a new set of random data bytes . After this method returns requests for the random data file should return the same bytes returned by this method .
public byte[] ChangeRandomData(int newLength)
        {
            var data = CreateRandomData(newLength);
            _randomDataFile.SetData(data);
            ResourceChanged?.Invoke(RandomDataPath);
            return data;
        }
public byte [ ] ChangeRandomData ( int newLength ) { var data = CreateRandomData ( newLength ) ; _randomDataFile . SetData ( data ) ; ResourceChanged ? . Invoke ( RandomDataPath ) ; return data ; }
Creates and returns a new set of random data bytes.After this method returns, requests for the random data file
should return the same bytes returned by this method.
Creates and returns a new set of random data bytes . After this method returns requests for the random data file should return the same bytes returned by this method .
An array of bytes containing the new random data.
An array of bytes containing the new random data .
newLength
int
The length of the new random data.
The length of the new random data .
seealso
None
seealso
None
seealso
None