Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 4478e32

Browse files
committed
Allow dynamically loaded assemblies
1 parent d5a95d6 commit 4478e32

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/ServiceStack.Text/LicenseUtils.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ static class _approved
370370
{
371371
"ServiceStack.Client.dll",
372372
"ServiceStack.RabbitMq.dll",
373+
"<Unknown>"
373374
};
374375
}
375376

tests/ServiceStack.Text.Tests/LicensingTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
using System;
55
using System.Collections;
6+
using System.IO;
7+
using System.Reflection;
68
using NUnit.Framework;
79

810
namespace ServiceStack.Text.Tests
@@ -141,5 +143,15 @@ public void Expired_licenses_throws_LicenseException()
141143
Assert.That(ex.Message, Is.StringStarting("This license has expired"));
142144
}
143145
}
146+
147+
[Explicit,Test]
148+
public void Test_dynamically_loaded_assemblies()
149+
{
150+
var dllBytes = File.ReadAllBytes("~/ServiceStack.Client.dll".MapAbsolutePath());
151+
152+
var assembly = Assembly.Load(dllBytes);
153+
154+
Assert.That(assembly.ManifestModule.Name, Is.EqualTo("<Unknown>"));
155+
}
144156
}
145157
}

0 commit comments

Comments
 (0)