/PetaPoco.Tests/Utils.cs
C# | 22 lines | 18 code | 3 blank | 1 comment | 0 complexity | dc7f77194c1bbd71dd781e9ecec7a413 MD5 | raw file
1using System; 2using System.Collections.Generic; 3using System.Linq; 4using System.Text; 5 6namespace PetaPoco.Tests 7{ 8 class Utils 9 { 10 public static string LoadTextResource(string name) 11 { 12 // get a reference to the current assembly 13 var a = System.Reflection.Assembly.GetExecutingAssembly(); 14 System.IO.StreamReader r = new System.IO.StreamReader(a.GetManifestResourceStream(name)); 15 string str = r.ReadToEnd(); 16 r.Close(); 17 18 return str; 19 } 20 21 } 22}