Browse Source

Update notebook for 7.2-preview2

pull/2542/head
Christoph Wille 4 years ago
parent
commit
8a664913fa
  1. 6
      ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj
  2. 153
      decompiler-nuget-demos.ipynb

6
ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj

@ -10,9 +10,9 @@ @@ -10,9 +10,9 @@
<InvariantGlobalization>true</InvariantGlobalization>
<AssemblyName>ilspycmd</AssemblyName>
<ToolCommandName>ilspycmd</ToolCommandName>
<Version>7.1.0.6488-preview1</Version>
<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.1.0.0</FileVersion>
<Version>7.2.0.6702-preview2</Version>
<AssemblyVersion>7.2.0.0</AssemblyVersion>
<FileVersion>7.2.0.0</FileVersion>
<Description>Command-line decompiler using the ILSpy decompilation engine</Description>
<Copyright>Copyright 2011-2021 AlphaSierraPapa</Copyright>
<PackageProjectUrl>https://github.com/icsharpcode/ILSpy/</PackageProjectUrl>

153
decompiler-nuget-demos.ipynb

@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You must install **.NET Interactive Notebooks** extension in VS Code to run this notebook!\n",
"\n",
"Load the NuGet package and print out the version to make sure we are using the latest and greatest"
]
},
@ -18,19 +20,23 @@ @@ -18,19 +20,23 @@
"outputs": [
{
"data": {
"text/plain": "Installed package ICSharpCode.Decompiler version 7.0.0.6488"
"text/html": [
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>ICSharpCode.Decompiler, 7.2.0.6702-preview2</span></li></ul></div></div>"
]
},
"output_type": "unknown"
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": "ICSharpCode.Decompiler, Version=7.0.0.6488, Culture=neutral, PublicKeyToken=d4bfe873e7598c49\r\n"
},
"output_type": "unknown"
"name": "stdout",
"output_type": "stream",
"text": [
"ICSharpCode.Decompiler, Version=7.2.0.6702, Culture=neutral, PublicKeyToken=d4bfe873e7598c49\r\n"
]
}
],
"source": [
"#r \"nuget: ICSharpCode.Decompiler, 7.0.0.6488\"\n",
"#r \"nuget: ICSharpCode.Decompiler, 7.2.0.6702-preview2\"\n",
"\n",
"using System.Reflection.Metadata;\n",
"using ICSharpCode.Decompiler;\n",
@ -45,7 +51,7 @@ @@ -45,7 +51,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You must have compiled **frontends.sln** first (run “dotnet build” in ICSharpCode.Decompiler.PowerShell folder). Make sure to modify **basePath** to your repository path."
"You must have compiled **ILSpy.XPlat.slnf** first (run “dotnet build” in ICSharpCode.Decompiler.PowerShell folder). Make sure to modify **basePath** to your repository path."
]
},
{
@ -81,10 +87,11 @@ @@ -81,10 +87,11 @@
},
"outputs": [
{
"data": {
"text/plain": "1461\r\n"
},
"output_type": "unknown"
"name": "stdout",
"output_type": "stream",
"text": [
"1478\r\n"
]
}
],
"source": [
@ -109,10 +116,20 @@ @@ -109,10 +116,20 @@
},
"outputs": [
{
"data": {
"text/plain": "using System;\r\n\r\nnamespace ICSharpCode.Decompiler.Util\r\n{\r\n\tpublic static class Empty<T>\r\n\t{\r\n\t\tpublic static readonly T[] Array = System.Array.Empty<T>();\r\n\t}\r\n}\r\n\r\n"
},
"output_type": "unknown"
"name": "stdout",
"output_type": "stream",
"text": [
"using System;\r\n",
"\r\n",
"namespace ICSharpCode.Decompiler.Util\r\n",
"{\r\n",
"\tpublic static class Empty<T>\r\n",
"\t{\r\n",
"\t\tpublic static readonly T[] Array = System.Array.Empty<T>();\r\n",
"\t}\r\n",
"}\r\n",
"\r\n"
]
}
],
"source": [
@ -138,10 +155,30 @@ @@ -138,10 +155,30 @@
},
"outputs": [
{
"data": {
"text/plain": "using System;\r\n\r\nstatic UniversalAssemblyResolver()\r\n{\r\n\tgac_paths = GetGacPaths();\r\n\tZeroVersion = new Version(0, 0, 0, 0);\r\n\tif (Type.GetType(\"Mono.Runtime\") != null)\r\n\t{\r\n\t\tdecompilerRuntime = DecompilerRuntime.Mono;\r\n\t}\r\n\telse if (typeof(object).Assembly.GetName().Name == \"System.Private.CoreLib\")\r\n\t{\r\n\t\tdecompilerRuntime = DecompilerRuntime.NETCoreApp;\r\n\t}\r\n\telse if (Environment.OSVersion.Platform == PlatformID.Unix)\r\n\t{\r\n\t\tdecompilerRuntime = DecompilerRuntime.Mono;\r\n\t}\r\n}\r\n\r\n"
},
"output_type": "unknown"
"name": "stdout",
"output_type": "stream",
"text": [
"using System;\r\n",
"\r\n",
"static UniversalAssemblyResolver()\r\n",
"{\r\n",
"\tgac_paths = GetGacPaths();\r\n",
"\tZeroVersion = new Version(0, 0, 0, 0);\r\n",
"\tif (Type.GetType(\"Mono.Runtime\") != null)\r\n",
"\t{\r\n",
"\t\tdecompilerRuntime = DecompilerRuntime.Mono;\r\n",
"\t}\r\n",
"\telse if (typeof(object).Assembly.GetName().Name == \"System.Private.CoreLib\")\r\n",
"\t{\r\n",
"\t\tdecompilerRuntime = DecompilerRuntime.NETCoreApp;\r\n",
"\t}\r\n",
"\telse if (Environment.OSVersion.Platform == PlatformID.Unix)\r\n",
"\t{\r\n",
"\t\tdecompilerRuntime = DecompilerRuntime.Mono;\r\n",
"\t}\r\n",
"}\r\n",
"\r\n"
]
}
],
"source": [
@ -189,58 +226,19 @@ @@ -189,58 +226,19 @@
},
"outputs": [
{
"data": {
"text/plain": "Microsoft\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "System\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "LightJson\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "Humanizer\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "ICSharpCode\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "FxResources\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "Internal\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "Windows\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "MS\r\n"
},
"output_type": "unknown"
"name": "stdout",
"output_type": "stream",
"text": [
"Microsoft\r\n",
"System\r\n",
"LightJson\r\n",
"Humanizer\r\n",
"ICSharpCode\r\n",
"FxResources\r\n",
"Internal\r\n",
"MS\r\n",
"Windows\r\n"
]
}
],
"source": [
@ -265,10 +263,11 @@ @@ -265,10 +263,11 @@
},
"outputs": [
{
"data": {
"text/plain": "LightJson.JsonArray\r\n"
},
"output_type": "unknown"
"name": "stdout",
"output_type": "stream",
"text": [
"LightJson.JsonArray\r\n"
]
}
],
"source": [
@ -304,4 +303,4 @@ @@ -304,4 +303,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}

Loading…
Cancel
Save