src/packages/EmbedIO.Testing/StockResource.cs
/// <summary>
/// Attempts to load a resource.
/// </summary>
/// <param name="path">The path to the resource.</param>
/// <param name="stream">When this method returns <see langword="true"/>,
/// a <see cref="Stream"/> representing the resource.
/// This parameter is passed uninitialized.</param>
/// <returns><see langword="true"/> if the specified resource
/// has been loaded; otherwise, <see langword="false"/>.</returns>
Attempts to load a resource.
Attempts to load a resource .
public static bool TryOpen(string path, out Stream? stream)
        {
            stream = null;
            if (string.IsNullOrEmpty(path))
                return false;
            try
            {
                stream = Assembly.GetManifestResourceStream(ConvertPath(path));
                return true;
            }
            catch (FileNotFoundException)
            {
                return false;
            }
        }
public static bool TryOpen ( string path , out Stream ? stream ) { stream = null ; if ( string . IsNullOrEmpty ( path ) ) return false ; try { stream = Assembly . GetManifestResourceStream ( ConvertPath ( path ) ) ; return true ; } catch ( FileNotFoundException ) { return false ; } }
Attempts to load a resource.
Attempts to load a resource .
if the specified resource
has been loaded; otherwise, .
if the specified resource has been loaded ; otherwise .
path
string
The path to the resource.
The path to the resource .
Stream?
out
stream
When this method returns ,
a  representing the resource.
This parameter is passed uninitialized.
When this method returns a representing the resource . This parameter is passed uninitialized .