samedi 4 mars 2017

Replacing AppDomain in Net Core

So, I am new in C# and Net Core, and someone passed me code to an evaluate command. However, it wasn't made in Net Core, so, the AppDomain doesn't exist in Net Core,what should I do?

ScriptOptions so = ScriptOptions.Default;

            so = so.WithImports(new string[] { "System.Math", "System.Diagnostics", "System.Runtime.InteropServices",
            "Discord.WebSocket", "Discord.Commands", "Discord", "System.Threading.Tasks", "System.Linq", "System", "System.Collections.Generic", "System.Convert", "System.Reflection"});
            so = so.WithReferences(AppDomain.CurrentDomain.GetAssemblies().Where(xa => !xa.IsDynamic && !string.IsNullOrWhiteSpace(xa.Location)));





Aucun commentaire:

Enregistrer un commentaire