Dont pass sys.reflection objects pass the helper...
ADD
WalletWasabi.Gui/Controls/WalletExplorer/AdvancedDetailPair.cs
+namespace WalletWasabi.Gui.Controls.WalletExplorer
+{
+ public struct AdvancedDetailPair
+ {
+ public AdvancedDetailPair(string title, bool isSensitive, string targetProperty)
+ {
+ Title = title;
+ IsSensitive = isSensitive;
+ TargetProperty = targetProperty;
+ }
+
+ public string Title { get; }
+ public bool IsSensitive { get; }
+ public string TargetProperty { get; }
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/AdvancedDetailTabHelper.cs
WalletWasabi.Gui/Controls/WalletExplorer/AdvancedDetailTabHelper.cs
@@ -7,14 +7,14 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
public static class AdvancedDetailTabHelper
{
- private static IEnumerable<(PropertyInfo, AdvancedDetailAttribute)> PropertiesWithAdvancedDetailAttribute(object instance)
+ private static IEnumerable<AdvancedDetailPair> PropertiesWithAdvancedDetailAttribute(object instance)
{
foreach (PropertyInfo pInfo in ReflectionHelper.GetPropertyInfos(instance))
{
var vma = ReflectionHelper.GetAttribute<AdvancedDetailAttribute>(pInfo);
if (vma != null)
{
- yield return (pInfo, vma);
+ yield return new AdvancedDetailPair(vma.DetailTitle, vma.IsSensitive, pInfo.Name);
}
}
}
@@ -22,7 +22,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public static AdvancedDetailTabViewModel GenerateAdvancedDetailTab<T>(string Title, T targetVM) where T : ViewModelBase
{
var getAttr = PropertiesWithAdvancedDetailAttribute(targetVM);
- return new AdvancedDetailTabViewModel(Title, getAttr);
+ return new AdvancedDetailTabViewModel(Title, targetVM, getAttr);
}
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/AdvancedDetailTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/AdvancedDetailTabViewModel.cs
@@ -9,11 +9,15 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
public class AdvancedDetailTabViewModel : WasabiDocumentTabViewModel
{
- public AdvancedDetailTabViewModel(string Title, IEnumerable<(PropertyInfo, AdvancedDetailAttribute)> getAttr) : base(Title)
+ public AdvancedDetailTabViewModel(string title, object targetVM, IEnumerable<AdvancedDetailPair> bindingPairs) : base(title)
{
Global = Locator.Current.GetService<Global>();
+ BindingPairs = bindingPairs;
+ TargetVM = targetVM;
}
+ public object TargetVM { get; }
+ public IEnumerable<AdvancedDetailPair> BindingPairs { get; }
private CompositeDisposable Disposables { get; set; }
private Global Global { get; }

Dont pass sys.reflection objects pass the helper...