mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
add DebuggerProxy for TypeMeta
This commit is contained in:
parent
f93696494e
commit
614e2faeae
@ -1,6 +1,7 @@
|
|||||||
using DCFApixels.DragonECS.Internal;
|
using DCFApixels.DragonECS.Internal;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
@ -315,6 +316,8 @@ namespace DCFApixels.DragonECS
|
|||||||
MetaGroup Group { get; }
|
MetaGroup Group { get; }
|
||||||
IReadOnlyCollection<string> Tags { get; }
|
IReadOnlyCollection<string> Tags { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DebuggerTypeProxy(typeof(DebuggerProxy))]
|
||||||
public sealed class TypeMeta : ITypeMeta
|
public sealed class TypeMeta : ITypeMeta
|
||||||
{
|
{
|
||||||
internal readonly Type _type;
|
internal readonly Type _type;
|
||||||
@ -510,6 +513,34 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
return Name;
|
return Name;
|
||||||
}
|
}
|
||||||
|
private class DebuggerProxy : ITypeMeta
|
||||||
|
{
|
||||||
|
private readonly TypeMeta _meta;
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get { return _meta.Name; }
|
||||||
|
}
|
||||||
|
public MetaColor Color
|
||||||
|
{
|
||||||
|
get { return _meta.Color; }
|
||||||
|
}
|
||||||
|
public string Description
|
||||||
|
{
|
||||||
|
get { return _meta.Description; }
|
||||||
|
}
|
||||||
|
public MetaGroup Group
|
||||||
|
{
|
||||||
|
get { return _meta.Group; }
|
||||||
|
}
|
||||||
|
public IReadOnlyCollection<string> Tags
|
||||||
|
{
|
||||||
|
get { return _meta.Tags; }
|
||||||
|
}
|
||||||
|
public DebuggerProxy(TypeMeta meta)
|
||||||
|
{
|
||||||
|
_meta = meta;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user