Massive improvements to UIX decompiler

This commit is contained in:
Yoshi Askharoun
2022-06-24 20:41:00 -05:00
parent fcde23d52d
commit 8074aef7b8
3 changed files with 168 additions and 68 deletions
+16 -2
View File
@@ -1,9 +1,11 @@
using System.Collections.Generic;
using System.Xml;
#if NET40_OR_GREATER || NET6_0_OR_GREATER
using DataMappingModelsList = System.Collections.ObjectModel.ObservableCollection<Microsoft.Iris.Debug.DataMappingModel>;
using DecompileResultList = System.Collections.ObjectModel.ObservableCollection<Microsoft.Iris.Debug.DecompilationResult>;
#else
using DataMappingModelsList = System.Collections.Generic.List<Microsoft.Iris.Debug.DataMappingModel>;
using DecompileResultList = System.Collections.Generic.List<Microsoft.Iris.Debug.DecompilationResult>;
#endif
namespace Microsoft.Iris.Debug
@@ -12,7 +14,7 @@ namespace Microsoft.Iris.Debug
{
public bool UseDecompiler { get; set; } = false;
public bool OpenDebugPipe { get; set; } = false;
public List<System.Xml.XmlDocument> DecompileResults { get; } = new List<System.Xml.XmlDocument>();
public DecompileResultList DecompileResults { get; } = new DecompileResultList();
public TraceSettings TraceSettings { get; } = TraceSettings.Current;
public bool GenerateDataMappingModels { get; set; } = false;
@@ -26,6 +28,18 @@ namespace Microsoft.Iris.Debug
#endif
}
public class DecompilationResult
{
internal DecompilationResult(string context, XmlDocument doc)
{
Context = context;
Doc = doc;
}
public string Context { get; private set; }
public XmlDocument Doc { get; private set; }
}
public class DataMappingModel
{
internal DataMappingModel(string provider, string type, string generatedCode)