-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathFileUtility.cs
More file actions
46 lines (36 loc) · 1.23 KB
/
FileUtility.cs
File metadata and controls
46 lines (36 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
// Reference From SDK Sample : Revit.SDK.Samples.DockableDialogs.CS
namespace RevitTest
{
public class FileUtility
{
public static String GetAssemblyPath()
{
if (string.IsNullOrEmpty(sm_assemblyPath))
sm_assemblyPath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
return sm_assemblyPath;
}
public static String GetAssemblyFullName()
{
if (string.IsNullOrEmpty(sm_assemblyFullName))
sm_assemblyFullName = Assembly.GetExecutingAssembly().Location;
return sm_assemblyFullName;
}
public static string GetApplicationResourcesPath()
{
if (string.IsNullOrEmpty(sm_appResourcePath))
sm_appResourcePath = GetAssemblyPath() + "\\Resources\\";
return sm_appResourcePath;
}
#region Data
private static string sm_assemblyPath = null;
private static string sm_assemblyFullName = null;
private static string sm_appResourcePath = null;
#endregion
}
}