mirror of
https://github.com/ZuneDev/MicrosoftIris.git
synced 2026-07-27 13:13:29 -07:00
Added Microsoft.Iris.Debug.DataMappingModel
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
#if NET40_OR_GREATER || NET6_0_OR_GREATER
|
||||||
|
using DataMappingModelsList = System.Collections.ObjectModel.ObservableCollection<Microsoft.Iris.Debug.DataMappingModel>;
|
||||||
|
#else
|
||||||
|
using DataMappingModelsList = System.Collections.Generic.List<Microsoft.Iris.Debug.DataMappingModel>;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Microsoft.Iris.Debug
|
namespace Microsoft.Iris.Debug
|
||||||
{
|
{
|
||||||
public class DebugSettings
|
public class DebugSettings
|
||||||
@@ -10,8 +16,7 @@ namespace Microsoft.Iris.Debug
|
|||||||
public TraceSettings TraceSettings { get; } = TraceSettings.Current;
|
public TraceSettings TraceSettings { get; } = TraceSettings.Current;
|
||||||
|
|
||||||
public bool GenerateDataMappingModels { get; set; } = true;
|
public bool GenerateDataMappingModels { get; set; } = true;
|
||||||
public List<(string Provider, string Type, string Code)> DataMappingModels { get; }
|
public DataMappingModelsList DataMappingModels { get; } = new DataMappingModelsList();
|
||||||
= new List<(string Provider, string Type, string Code)>();
|
|
||||||
|
|
||||||
public Bridge Bridge { get; } =
|
public Bridge Bridge { get; } =
|
||||||
#if OPENZUNE
|
#if OPENZUNE
|
||||||
@@ -20,4 +25,18 @@ namespace Microsoft.Iris.Debug
|
|||||||
new();
|
new();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class DataMappingModel
|
||||||
|
{
|
||||||
|
internal DataMappingModel(string provider, string type, string generatedCode)
|
||||||
|
{
|
||||||
|
Provider = provider;
|
||||||
|
Type = type;
|
||||||
|
GeneratedCode = generatedCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Provider { get; internal set; }
|
||||||
|
public string Type { get; internal set; }
|
||||||
|
public string GeneratedCode { get; internal set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -498,7 +498,7 @@ namespace Microsoft.Iris.Markup
|
|||||||
|
|
||||||
if (Application.DebugSettings.GenerateDataMappingModels)
|
if (Application.DebugSettings.GenerateDataMappingModels)
|
||||||
Application.DebugSettings.DataMappingModels.Add(
|
Application.DebugSettings.DataMappingModels.Add(
|
||||||
(markupDataMapping.Provider, markupDataMapping.TargetType.Name, markupDataMapping.GenerateModelCode())
|
new Debug.DataMappingModel(markupDataMapping.Provider, markupDataMapping.TargetType.Name, markupDataMapping.GenerateModelCode())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
_loadResultTarget.SetDataMappingsTable(dataMappingsTable);
|
_loadResultTarget.SetDataMappingsTable(dataMappingsTable);
|
||||||
|
|||||||
Reference in New Issue
Block a user