aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/CrowDebugger
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-08-20 20:23:23 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-08-20 20:23:23 +0200
commit5ded9101522573336813c88d49e2ed27d70429fb (patch)
treec1882937d54dab93be02a084b05dfb23cae517a1 /Samples/CrowDebugger
parent36f62cf1ca61cb10c6958787376ae76efb71a1ea (diff)
keep only HelloWorld, ShowCase and PerfTests samplesv0.9.5-beta
Diffstat (limited to 'Samples/CrowDebugger')
-rw-r--r--Samples/CrowDebugger/CrowDebugAssemblyLoadContext.cs15
-rw-r--r--Samples/CrowDebugger/CrowDebugger.csproj8
-rw-r--r--Samples/CrowDebugger/Program.cs58
3 files changed, 0 insertions, 81 deletions
diff --git a/Samples/CrowDebugger/CrowDebugAssemblyLoadContext.cs b/Samples/CrowDebugger/CrowDebugAssemblyLoadContext.cs
deleted file mode 100644
index 0c629fc7..00000000
--- a/Samples/CrowDebugger/CrowDebugAssemblyLoadContext.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Threading;
-using System;
-using System.Runtime.Loader;
-using System.Reflection;
-
-namespace CrowDebugger
-{
- public class CrowDebugAssemblyLoadContext : AssemblyLoadContext
- {
- protected override Assembly Load(AssemblyName assemblyName)
- {
- return base.Load(assemblyName);
- }
- }
-} \ No newline at end of file
diff --git a/Samples/CrowDebugger/CrowDebugger.csproj b/Samples/CrowDebugger/CrowDebugger.csproj
deleted file mode 100644
index c73e0d16..00000000
--- a/Samples/CrowDebugger/CrowDebugger.csproj
+++ /dev/null
@@ -1,8 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp3.1</TargetFramework>
- </PropertyGroup>
-
-</Project>
diff --git a/Samples/CrowDebugger/Program.cs b/Samples/CrowDebugger/Program.cs
deleted file mode 100644
index b15e3b17..00000000
--- a/Samples/CrowDebugger/Program.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System.Threading;
-using System;
-using System.IO;
-using System.Reflection;
-using System.Runtime.Loader;
-
-namespace CrowDebugger
-{
- class Program
- {
- const int BUFF_MAX = 1024;
- static void Main(string[] args)
- {
- AssemblyLoadContext crowLoadCtx = new AssemblyLoadContext("CrowDebuggerLoadContext");
- Console.WriteLine("Crow Debugger started.");
- char[] buffer = new char[1024];
- int buffPtr = 0;
- while (true)
- {
- if (Console.KeyAvailable)
- {
- ConsoleKeyInfo key = Console.ReadKey(true);
- if (key.Key == ConsoleKey.Enter) {
- Span<char> cmd = buffer.AsSpan(0, buffPtr);
- Console.WriteLine($"=> {cmd.ToString()}");
- if (cmd[0] == 'q' || cmd.SequenceEqual ("quit"))
- break;
-
- if (cmd.StartsWith("load")) {
- using(crowLoadCtx.EnterContextualReflection()) {
- string str = cmd.Slice(5).ToString();
- Console.WriteLine($"[msg]:Trying to load crow dll from: '{str}'");
- if (!File.Exists (str)) {
- Console.WriteLine ($"[error]:File not found: {str}");
- } else {
- Assembly crowAssembly = crowLoadCtx.LoadFromAssemblyPath (str);
- if (crowAssembly == null) {
- Console.WriteLine($"[error]:Failed to load crow dll from: {str}");
- } else {
- Console.WriteLine($"[ok]:Crow Assembly loaded:{crowAssembly.FullName}");
-
- }
- }
- }
- } else
- Console.WriteLine($"=> {cmd.ToString()}");
- buffPtr = 0;
- continue;
- }
-
- buffer[buffPtr++] = key.KeyChar;
- }
- }
-
- Console.WriteLine("exited");
- }
- }
-}