-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildSystemsGHInfo.cs
51 lines (42 loc) · 1.9 KB
/
BuildSystemsGHInfo.cs
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
47
48
49
50
51
using Grasshopper;
using Grasshopper.Kernel;
using System;
using System.Drawing;
using System.Reflection;
namespace BuildSystemsGH
{
public class BuildSystemsGHInfo : GH_AssemblyInfo
{
static BuildSystemsGHInfo()
{
AppDomain.CurrentDomain.AssemblyResolve += HandleAssemblyResolve;
}
private static Assembly HandleAssemblyResolve(object sender, ResolveEventArgs args)
{
if (args.Name.StartsWith("Newtonsoft.Json,"))
{
string resourceName = "BuildSystemsGH.Resources.Newtonsoft.Json.dll";
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
{
if (stream == null) return null;
byte[] assemblyData = new byte[stream.Length];
stream.Read(assemblyData, 0, assemblyData.Length);
return Assembly.Load(assemblyData);
}
}
return null;
}
public override string Name => "Build Systems";
//Return a 24x24 pixel bitmap to represent this GHA library.
public override Bitmap Icon => null;
//Return a short string describing the purpose of this GHA library.
public override string Description => "BuildSystem toolbox developed to speed-up our sustainable consulting services.";
public override Guid Id => new Guid("36538369-6017-4b4c-9973-aee8f072399a");
//Return a string identifying you or your company.
public override string AuthorName => "Daniel Locatelli";
//Return a string representing your preferred contact details.
public override string AuthorContact => "[email protected]";
//Following Semantic Versioning (SemVer), initial was 0.1.0-alpha currently on 0.3.0-alpha (22/08/2023)
public override string Version => "0.3.0";
}
}