1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
6
using System.Reflection;
9
namespace PythonBinding.Tests.Utils
12
/// Utility class that reads the PythonBinding.addin file
13
/// that has been embedded as a resource into the test assembly.
15
public sealed class PythonBindingAddInFile
17
PythonBindingAddInFile()
22
/// Returns the PythonBinding.addin file.
24
public static TextReader ReadAddInFile()
26
Assembly assembly = Assembly.GetAssembly(typeof(PythonBindingAddInFile));
27
string resourceName = String.Concat("PythonBinding.Tests.PythonBinding.addin");
28
Stream resourceStream = assembly.GetManifestResourceStream(resourceName);
29
if (resourceStream != null) {
30
return new StreamReader(resourceStream);