add more tests on native part
[teamcity/dotNetPackagesSupport.git] / nuget-extensions / nuget-tests / src / AssemblyHelper.cs
1 using System;\r
2 using System.IO;\r
3 using System.Reflection;\r
4 \r
5 namespace JetBrains.TeamCity.NuGet.Tests\r
6 {\r
7   public static class AssemblyHelper\r
8   {\r
9     public static string GetAssemblyDirectory(this Assembly assembly)\r
10     {\r
11       return Path.GetDirectoryName(GetAssemblyPath(assembly));\r
12     }\r
13 \r
14     public static string GetAssemblyPath(this Assembly assembly)\r
15     {\r
16       return new Uri(assembly.CodeBase).LocalPath;\r
17     }\r
18 \r
19     public static string GetAssemblyDirectory(this Type type)\r
20     {\r
21       return GetAssemblyDirectory(type.Assembly);\r
22     }\r
23   }\r
24 }