mirror of
https://github.com/Smaug123/unofficial-nunit-runner
synced 2025-10-06 09:48:40 +00:00
21 lines
556 B
Forth
21 lines
556 B
Forth
namespace WoofWare.NUnitTestRunner.Test
|
|
|
|
open System
|
|
open System.IO
|
|
|
|
[<RequireQualifiedAccess>]
|
|
module internal EmbeddedResource =
|
|
type Dummy = class end
|
|
|
|
let read (name : string) : string =
|
|
let assy = typeof<Dummy>.Assembly
|
|
|
|
let manifestName =
|
|
assy.GetManifestResourceNames ()
|
|
|> Seq.filter (fun s -> s.EndsWith (name, StringComparison.Ordinal))
|
|
|> Seq.exactlyOne
|
|
|
|
use s = assy.GetManifestResourceStream manifestName
|
|
use reader = new StreamReader (s)
|
|
reader.ReadToEnd ()
|