guidump lists attached properties.

This commit is contained in:
Pieter-Jan Briers
2019-12-05 15:37:11 +01:00
parent ab1f4fb0e7
commit 6cfe6caae2
2 changed files with 11 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
@@ -448,6 +448,12 @@ namespace Robust.Client.Console.Commands
members.Add((propertyInfo.Name, propertyInfo.GetValue(control)?.ToString() ?? "null"));
}
foreach (var (attachedProperty, value) in control.AllAttachedProperties)
{
members.Add(($"{attachedProperty.OwningType.Name}.{attachedProperty.Name}",
value?.ToString() ?? "null"));
}
members.Sort((a, b) => string.Compare(a.Item1, b.Item1, StringComparison.Ordinal));
return members;
}