/PetaPoco.Tests/Utils.cs
http://github.com/toptensoftware/PetaPoco · C# · 22 lines · 18 code · 3 blank · 1 comment · 0 complexity · dc7f77194c1bbd71dd781e9ecec7a413 MD5 · raw file
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace PetaPoco.Tests
- {
- class Utils
- {
- public static string LoadTextResource(string name)
- {
- // get a reference to the current assembly
- var a = System.Reflection.Assembly.GetExecutingAssembly();
- System.IO.StreamReader r = new System.IO.StreamReader(a.GetManifestResourceStream(name));
- string str = r.ReadToEnd();
- r.Close();
- return str;
- }
- }
- }