Initial version of profiler

Moved reflected manager into separate files
Extracted MtObservableEvent
Added a patch to Keencode that lets us call the static cctor of MyEntities in the wrong spot
This commit is contained in:
Westin Miller
2017-10-30 02:50:03 -07:00
parent 11dbf83faf
commit 90c91c3ebc
39 changed files with 1923 additions and 468 deletions

View File

@@ -1,4 +1,8 @@
using VRage.Game.ModAPI;
using System.Windows.Controls;
using Torch.API.Managers;
using Torch.Collections;
using Torch.Managers.Profiler;
using VRage.Game.ModAPI;
using VRage.ModAPI;
using VRageMath;
@@ -9,6 +13,12 @@ namespace Torch.Server.ViewModels.Entities
protected EntityTreeViewModel Tree { get; }
public IMyEntity Entity { get; }
public long Id => Entity.EntityId;
public ProfilerEntryViewModel Profiler
{
get => ProfilerTreeAlias[0];
set => ProfilerTreeAlias[0] = value;
}
public MtObservableList<ProfilerEntryViewModel> ProfilerTreeAlias { get; } = new MtObservableList<ProfilerEntryViewModel>(1){null};
public virtual string Name
{
@@ -46,6 +56,7 @@ namespace Torch.Server.ViewModels.Entities
{
Entity = entity;
Tree = tree;
Profiler = TorchBase.Instance.Managers.GetManager<ProfilerManager>()?.EntityData(entity, Profiler);
}
public EntityViewModel()