Refactor application structure and add unit tests
Added: - New `ProgressService` class for managing progress indicators. - New `AssetDatabase`, `AssetOpenHandlerAttribute`, and `AsyncAssetOpenHandlerAttribute` classes for asset handling. - `Ghost.UnitTest` project for unit testing with associated files and configurations. Changed: - `ActivationHandler` class to ensure correct handling of `LaunchActivatedEventArgs`. - `App.xaml.cs` to register `INotificationService` and `IProgressService`, replacing `StackedNotificationService`. - `OnLaunched` method in `App.xaml.cs` to correctly call `ActivationHandler.Handle(args)` and start the host. - `INavigationAware` interface from internal to public for broader access. - `EditorState.cs` to activate `EditorApplication` with the current service provider. - Property names in `AssetItem` and `ExplorerItem` structs to `Name` and `FullName`. - `NotificationService` class to implement `INotificationService` and refactor notification handling. - `AssetPathToGlyphConverter` to handle file extensions consistently. - Bindings in `ProjectPage.xaml` and `ProjectPage.xaml.cs` to use `FullName` instead of `Path`. - `EngineEditorWindow` and `LandingWindow` classes to utilize new notification and progress services. - `Logger` class to include a new method for logging errors with exceptions. Updated: - Manifest files and project files to reflect new structure and dependencies. - Solution file `GhostEngine.sln` to include the new unit test project. - Added several new test classes and methods in `UnitTests.cs`.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@ public readonly struct QueryItem<T0>
|
||||
public void Deconstruct(out Entity entity, out Ref<T0> c0)
|
||||
{
|
||||
entity = _entity;
|
||||
c0 = new (ref _pool0.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,8 @@ public readonly struct QueryItem<T0, T1>
|
||||
public void Deconstruct(out Entity entity, out Ref<T0> c0, out Ref<T1> c1)
|
||||
{
|
||||
entity = _entity;
|
||||
c0 = new (ref _pool0.GetRef(_entity));c1 = new (ref _pool1.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +83,9 @@ public readonly struct QueryItem<T0, T1, T2>
|
||||
public void Deconstruct(out Entity entity, out Ref<T0> c0, out Ref<T1> c1, out Ref<T2> c2)
|
||||
{
|
||||
entity = _entity;
|
||||
c0 = new (ref _pool0.GetRef(_entity));c1 = new (ref _pool1.GetRef(_entity));c2 = new (ref _pool2.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +118,10 @@ public readonly struct QueryItem<T0, T1, T2, T3>
|
||||
public void Deconstruct(out Entity entity, out Ref<T0> c0, out Ref<T1> c1, out Ref<T2> c2, out Ref<T3> c3)
|
||||
{
|
||||
entity = _entity;
|
||||
c0 = new (ref _pool0.GetRef(_entity));c1 = new (ref _pool1.GetRef(_entity));c2 = new (ref _pool2.GetRef(_entity));c3 = new (ref _pool3.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
c3 = new(ref _pool3.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +157,11 @@ public readonly struct QueryItem<T0, T1, T2, T3, T4>
|
||||
public void Deconstruct(out Entity entity, out Ref<T0> c0, out Ref<T1> c1, out Ref<T2> c2, out Ref<T3> c3, out Ref<T4> c4)
|
||||
{
|
||||
entity = _entity;
|
||||
c0 = new (ref _pool0.GetRef(_entity));c1 = new (ref _pool1.GetRef(_entity));c2 = new (ref _pool2.GetRef(_entity));c3 = new (ref _pool3.GetRef(_entity));c4 = new (ref _pool4.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
c3 = new(ref _pool3.GetRef(_entity));
|
||||
c4 = new(ref _pool4.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +200,12 @@ public readonly struct QueryItem<T0, T1, T2, T3, T4, T5>
|
||||
public void Deconstruct(out Entity entity, out Ref<T0> c0, out Ref<T1> c1, out Ref<T2> c2, out Ref<T3> c3, out Ref<T4> c4, out Ref<T5> c5)
|
||||
{
|
||||
entity = _entity;
|
||||
c0 = new (ref _pool0.GetRef(_entity));c1 = new (ref _pool1.GetRef(_entity));c2 = new (ref _pool2.GetRef(_entity));c3 = new (ref _pool3.GetRef(_entity));c4 = new (ref _pool4.GetRef(_entity));c5 = new (ref _pool5.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
c3 = new(ref _pool3.GetRef(_entity));
|
||||
c4 = new(ref _pool4.GetRef(_entity));
|
||||
c5 = new(ref _pool5.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +247,13 @@ public readonly struct QueryItem<T0, T1, T2, T3, T4, T5, T6>
|
||||
public void Deconstruct(out Entity entity, out Ref<T0> c0, out Ref<T1> c1, out Ref<T2> c2, out Ref<T3> c3, out Ref<T4> c4, out Ref<T5> c5, out Ref<T6> c6)
|
||||
{
|
||||
entity = _entity;
|
||||
c0 = new (ref _pool0.GetRef(_entity));c1 = new (ref _pool1.GetRef(_entity));c2 = new (ref _pool2.GetRef(_entity));c3 = new (ref _pool3.GetRef(_entity));c4 = new (ref _pool4.GetRef(_entity));c5 = new (ref _pool5.GetRef(_entity));c6 = new (ref _pool6.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
c3 = new(ref _pool3.GetRef(_entity));
|
||||
c4 = new(ref _pool4.GetRef(_entity));
|
||||
c5 = new(ref _pool5.GetRef(_entity));
|
||||
c6 = new(ref _pool6.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,7 +298,14 @@ public readonly struct QueryItem<T0, T1, T2, T3, T4, T5, T6, T7>
|
||||
public void Deconstruct(out Entity entity, out Ref<T0> c0, out Ref<T1> c1, out Ref<T2> c2, out Ref<T3> c3, out Ref<T4> c4, out Ref<T5> c5, out Ref<T6> c6, out Ref<T7> c7)
|
||||
{
|
||||
entity = _entity;
|
||||
c0 = new (ref _pool0.GetRef(_entity));c1 = new (ref _pool1.GetRef(_entity));c2 = new (ref _pool2.GetRef(_entity));c3 = new (ref _pool3.GetRef(_entity));c4 = new (ref _pool4.GetRef(_entity));c5 = new (ref _pool5.GetRef(_entity));c6 = new (ref _pool6.GetRef(_entity));c7 = new (ref _pool7.GetRef(_entity));
|
||||
c0 = new(ref _pool0.GetRef(_entity));
|
||||
c1 = new(ref _pool1.GetRef(_entity));
|
||||
c2 = new(ref _pool2.GetRef(_entity));
|
||||
c3 = new(ref _pool3.GetRef(_entity));
|
||||
c4 = new(ref _pool4.GetRef(_entity));
|
||||
c5 = new(ref _pool5.GetRef(_entity));
|
||||
c6 = new(ref _pool6.GetRef(_entity));
|
||||
c7 = new(ref _pool7.GetRef(_entity));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,17 +6,17 @@ namespace Ghost.Entities;
|
||||
|
||||
public delegate void QueryRefComponent<T0>(Entity entity, ref T0 t0Component)
|
||||
where T0 : struct, IComponentData;
|
||||
public delegate void QueryRefComponent<T0, T1>(Entity entity, ref T0 t0Component,ref T1 t1Component)
|
||||
public delegate void QueryRefComponent<T0, T1>(Entity entity, ref T0 t0Component, ref T1 t1Component)
|
||||
where T0 : struct, IComponentData where T1 : struct, IComponentData;
|
||||
public delegate void QueryRefComponent<T0, T1, T2>(Entity entity, ref T0 t0Component,ref T1 t1Component,ref T2 t2Component)
|
||||
public delegate void QueryRefComponent<T0, T1, T2>(Entity entity, ref T0 t0Component, ref T1 t1Component, ref T2 t2Component)
|
||||
where T0 : struct, IComponentData where T1 : struct, IComponentData where T2 : struct, IComponentData;
|
||||
public delegate void QueryRefComponent<T0, T1, T2, T3>(Entity entity, ref T0 t0Component,ref T1 t1Component,ref T2 t2Component,ref T3 t3Component)
|
||||
public delegate void QueryRefComponent<T0, T1, T2, T3>(Entity entity, ref T0 t0Component, ref T1 t1Component, ref T2 t2Component, ref T3 t3Component)
|
||||
where T0 : struct, IComponentData where T1 : struct, IComponentData where T2 : struct, IComponentData where T3 : struct, IComponentData;
|
||||
public delegate void QueryRefComponent<T0, T1, T2, T3, T4>(Entity entity, ref T0 t0Component,ref T1 t1Component,ref T2 t2Component,ref T3 t3Component,ref T4 t4Component)
|
||||
public delegate void QueryRefComponent<T0, T1, T2, T3, T4>(Entity entity, ref T0 t0Component, ref T1 t1Component, ref T2 t2Component, ref T3 t3Component, ref T4 t4Component)
|
||||
where T0 : struct, IComponentData where T1 : struct, IComponentData where T2 : struct, IComponentData where T3 : struct, IComponentData where T4 : struct, IComponentData;
|
||||
public delegate void QueryRefComponent<T0, T1, T2, T3, T4, T5>(Entity entity, ref T0 t0Component,ref T1 t1Component,ref T2 t2Component,ref T3 t3Component,ref T4 t4Component,ref T5 t5Component)
|
||||
public delegate void QueryRefComponent<T0, T1, T2, T3, T4, T5>(Entity entity, ref T0 t0Component, ref T1 t1Component, ref T2 t2Component, ref T3 t3Component, ref T4 t4Component, ref T5 t5Component)
|
||||
where T0 : struct, IComponentData where T1 : struct, IComponentData where T2 : struct, IComponentData where T3 : struct, IComponentData where T4 : struct, IComponentData where T5 : struct, IComponentData;
|
||||
public delegate void QueryRefComponent<T0, T1, T2, T3, T4, T5, T6>(Entity entity, ref T0 t0Component,ref T1 t1Component,ref T2 t2Component,ref T3 t3Component,ref T4 t4Component,ref T5 t5Component,ref T6 t6Component)
|
||||
public delegate void QueryRefComponent<T0, T1, T2, T3, T4, T5, T6>(Entity entity, ref T0 t0Component, ref T1 t1Component, ref T2 t2Component, ref T3 t3Component, ref T4 t4Component, ref T5 t5Component, ref T6 t6Component)
|
||||
where T0 : struct, IComponentData where T1 : struct, IComponentData where T2 : struct, IComponentData where T3 : struct, IComponentData where T4 : struct, IComponentData where T5 : struct, IComponentData where T6 : struct, IComponentData;
|
||||
public delegate void QueryRefComponent<T0, T1, T2, T3, T4, T5, T6, T7>(Entity entity, ref T0 t0Component,ref T1 t1Component,ref T2 t2Component,ref T3 t3Component,ref T4 t4Component,ref T5 t5Component,ref T6 t6Component,ref T7 t7Component)
|
||||
public delegate void QueryRefComponent<T0, T1, T2, T3, T4, T5, T6, T7>(Entity entity, ref T0 t0Component, ref T1 t1Component, ref T2 t2Component, ref T3 t3Component, ref T4 t4Component, ref T5 t5Component, ref T6 t6Component, ref T7 t7Component)
|
||||
where T0 : struct, IComponentData where T1 : struct, IComponentData where T2 : struct, IComponentData where T3 : struct, IComponentData where T4 : struct, IComponentData where T5 : struct, IComponentData where T6 : struct, IComponentData where T7 : struct, IComponentData;
|
||||
|
||||
Reference in New Issue
Block a user