Saving reflection plugin stuff but i hate so delete time

This commit is contained in:
2026-03-02 17:22:07 -05:00
parent 227e70219a
commit 21747aa062
30 changed files with 348 additions and 239 deletions

View File

@@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
namespace AwperativeKernel; namespace AwperativeKernel;
@@ -181,39 +182,39 @@ public static class DebugAttributes
} }
} }
#endregion /// <summary> Requires that a given Scene is not null</summary>
#region Null/Collection
/// <summary> Requires all elements in a Collection are not null </summary>
[AttributeUsage(AttributeTargets.All)] [AttributeUsage(AttributeTargets.All)]
public class CollectionNotNull : Attribute public class SceneDoesNotExist : Attribute
{ {
/// <inheritdoc cref="DockerOwns.VerifyOrThrow"/> /// <inheritdoc cref="DockerOwns.VerifyOrThrow"/>
public static bool VerifyOrThrow(ICollection<object> __collection) { [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
foreach (object obj in __collection) { public static bool VerifyOrThrow(Scene __scene) {
if (obj == null) { if (Awperative._scenes.Contains(__scene)) return true;
Awperative.Debug.LogError("A given enumerator has null members!", ["Type"], [__collection.GetType().Name]);
Awperative.Debug.LogError("Scene already exists!");
return Awperative.Debug.IgnoreErrors; return Awperative.Debug.IgnoreErrors;
} }
} }
return true; #endregion
}
} #region Null/Collection
/// <summary> Requires all elements in an Enumerator are not null</summary> /// <summary> Requires all elements in an Enumerator are not null</summary>
[AttributeUsage(AttributeTargets.All)] [AttributeUsage(AttributeTargets.All)]
public class EnumeratorNotNull : Attribute public class EnumerableNotNull : Attribute
{ {
/// <inheritdoc cref="DockerOwns.VerifyOrThrow"/> /// <inheritdoc cref="DockerOwns.VerifyOrThrow"/>
public static bool VerifyOrThrow(IEnumerable<object> __enumerator) { public static bool VerifyOrThrow(IEnumerable<object> __enumerator) {
if (__enumerator == null) { Awperative.Debug.LogError("A given enumerator is null!"); return Awperative.Debug.IgnoreErrors; }
foreach (object obj in __enumerator) { foreach (object obj in __enumerator) {
if (obj == null) { if (obj == null) {
Awperative.Debug.LogError("A given enumerator has null members!", ["Type"], [__enumerator.GetType().Name]); Awperative.Debug.LogError("A given enumerator has null members!", ["Type"], [__enumerator.GetType().Name]);
@@ -227,6 +228,42 @@ public static class DebugAttributes
/// <summary> Requires that the enumerator contains a certain element.</summary>
[AttributeUsage(AttributeTargets.All)]
public class EnumerableContains : Attribute
{
/// <inheritdoc cref="DockerOwns.VerifyOrThrow"/>
public static bool VerifyOrThrow(IEnumerable<object> __enumerator, object __object) {
if (__enumerator.Contains(__object)) return true;
Awperative.Debug.LogError("A given enumerator does not contains an object!", ["EnumeratorType", "ObjectType", "Value"], [__enumerator.GetType().Name, __object.GetType().Name, __object.ToString()]);
return Awperative.Debug.IgnoreErrors;
}
}
/// <summary> Requires that the enumerator does not contain a certain element.</summary>
[AttributeUsage(AttributeTargets.All)]
public class EnumerableDoesntContain : Attribute
{
/// <inheritdoc cref="DockerOwns.VerifyOrThrow"/>
public static bool VerifyOrThrow(IEnumerable<object> __enumerator, object __object) {
if (!__enumerator.Contains(__object)) return true;
Awperative.Debug.LogError("A given enumerator already contains the object object!", ["EnumeratorType", "ObjectType", "Value"], [__enumerator.GetType().Name, __object.GetType().Name, __object.ToString()]);
return Awperative.Debug.IgnoreErrors;
}
}
/// <summary> Requires a given object is not null </summary> /// <summary> Requires a given object is not null </summary>
[AttributeUsage(AttributeTargets.All)] [AttributeUsage(AttributeTargets.All)]
public class NotNull : Attribute public class NotNull : Attribute
@@ -261,41 +298,5 @@ public static class DebugAttributes
} }
} }
/// <summary> Requires that a collection contains the given item</summary>
[AttributeUsage(AttributeTargets.All)]
public class CollectionContains : Attribute
{
/// <inheritdoc cref="DockerOwns.VerifyOrThrow"/>
public static bool VerifyOrThrow<__Type>(__Type __object, ICollection<__Type> __collection) {
if (__collection.Contains(__object)) return true;
Awperative.Debug.LogError("Collection does not contain object!", ["ObjectType"], [__object.GetType().Name]);
return Awperative.Debug.IgnoreErrors;
}
}
/// <summary> Requires that a collection does not contain the given item</summary>
[AttributeUsage(AttributeTargets.All)]
public class CollectionDoesntContain : Attribute
{
/// <inheritdoc cref="DockerOwns.VerifyOrThrow"/>
public static bool VerifyOrThrow<__Type>(__Type __object, ICollection<__Type> __collection) {
if (!__collection.Contains(__object)) return true;
Awperative.Debug.LogError("Collection already contains object!", ["ObjectType"], [__object.GetType().Name]);
return Awperative.Debug.IgnoreErrors;
}
}
#endregion #endregion
} }

View File

@@ -0,0 +1,28 @@
using System;
namespace AwperativeKernel;
internal static class DependencyAttributes
{
/// <summary> Shows the source for a given module interface </summary>
[AttributeUsage(AttributeTargets.Interface | AttributeTargets.Property)]
public class RequiredModule : Attribute
{
/// <summary> Where to assign in the Awperative class.</summary>
public string Source { get; set; }
public RequiredModule() {}
public RequiredModule(string Source) {
this.Source = Source;
}
}
}

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using Awperative.Kernel.Overhead.Reflection;
namespace AwperativeKernel; namespace AwperativeKernel;
@@ -59,16 +60,16 @@ public abstract partial class Component : ComponentDocker
/// <summary> Attempts to send an event to the component, and quietly exits if not.</summary> /// <summary> Attempts to send an event to the component, and quietly exits if not.</summary>
[MarkerAttributes.UnsafeInternal] [MarkerAttributes.UnsafeInternal]
internal void TryEvent(int __timeEvent) { internal void TryEvent(int __timeEvent) {
Awperative._TypeAssociatedTimeEvents[GetType()][__timeEvent]?.Invoke(this); EventManager._TypeAssociatedTimeEvents[GetType()][__timeEvent]?.Invoke(this);
} }
/// <summary> Adds a new tag to the component</summary> /// <summary> Adds a new tag to the component</summary>
[MarkerAttributes.CalculatedProperty, MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Low), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.CalculatedProperty, MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Low), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public void AddTag([DebugAttributes.NotNull, DebugAttributes.CollectionDoesntContain] string __tag) { public void AddTag([DebugAttributes.NotNull, DebugAttributes.EnumerableDoesntContain] string __tag) {
if(!DebugAttributes.NotNull.VerifyOrThrow(__tag)) return; if(!DebugAttributes.NotNull.VerifyOrThrow(__tag)) return;
if(!DebugAttributes.CollectionDoesntContain.VerifyOrThrow(__tag, _tags)) return; if(!DebugAttributes.EnumerableDoesntContain.VerifyOrThrow(_tags, __tag)) return;
_tags.Add(__tag); _tags.Add(__tag);
ComponentDocker.HashTaggedComponent(__tag, this); ComponentDocker.HashTaggedComponent(__tag, this);
@@ -80,9 +81,9 @@ public abstract partial class Component : ComponentDocker
/// <summary> Removes a tag from the component.</summary> /// <summary> Removes a tag from the component.</summary>
[MarkerAttributes.CalculatedProperty, MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Low), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.CalculatedProperty, MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Low), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public void RemoveTag([DebugAttributes.NotNull,DebugAttributes.CollectionContains] string __tag) { public void RemoveTag([DebugAttributes.NotNull,DebugAttributes.EnumerableContains] string __tag) {
if (!DebugAttributes.NotNull.VerifyOrThrow(__tag)) return; if (!DebugAttributes.NotNull.VerifyOrThrow(__tag)) return;
if(!DebugAttributes.CollectionContains.VerifyOrThrow(__tag, _tags)) return; if(!DebugAttributes.EnumerableContains.VerifyOrThrow(_tags, __tag)) return;
_tags.Remove(__tag); _tags.Remove(__tag);
ComponentDocker.UnhashTaggedComponent(__tag, this); ComponentDocker.UnhashTaggedComponent(__tag, this);

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
@@ -24,19 +25,25 @@ public abstract partial class ComponentDocker
/// <summary> Tells you whether the docker contains a component with all the given tags </summary> /// <summary> Tells you whether the docker contains a component with all the given tags </summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public bool Contains(IEnumerable<string> __tags) => GetAll(__tags).Any(); public bool Contains([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags) => GetAll(__tags).Any();
/// <summary> Tells you whether the docker contains a component with all the given tags and the type</summary> /// <summary> Tells you whether the docker contains a component with all the given tags and the type</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public bool Contains<__Type>(IEnumerable<string> __tags) where __Type : Component => GetAll<__Type>(__tags).Any(); public bool Contains<__Type>([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags) where __Type : Component => GetAll<__Type>(__tags).Any();
/// <summary> Tells you whether the docker contains the given component.</summary> /// <summary> Tells you whether the docker contains the given component.</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public bool Contains([DebugAttributes.ComponentNotNull] Component __component) => DebugAttributes.NotNull.VerifyOrThrow(__component) && _componentTypeDictionary.TryGetValue(__component.GetType(), out var components) && components.Contains(__component); public bool Contains([DebugAttributes.ComponentNotNull] Component __component) => DebugAttributes.NotNull.VerifyOrThrow(__component) && _componentTypeDictionary.TryGetValue(__component.GetType(), out var components) && components.Contains(__component);
/// <summary> Tells you whether the docker contains the all the given components.</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Medium), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public bool ContainsAll([DebugAttributes.EnumerableNotNull] IEnumerable<Component> __components) => __components.All(x => _components.Contains(x));
/// <summary> Gets all components of a given type</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public IEnumerable<Component> GetAll() => _components;
/// <summary> Finds the first component with a given Type</summary> /// <summary> Finds the first component with a given Type</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
@@ -50,7 +57,7 @@ public abstract partial class ComponentDocker
/// <summary> Gets all components of a given type</summary> /// <summary> Gets all components of a given type</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public IEnumerable<__Type> GetAll<__Type>() where __Type : Component => _componentTypeDictionary.TryGetValue(typeof(__Type), out var components) ? components.OfType<__Type>().ToList() : []; public IEnumerable<__Type> GetAll<__Type>() where __Type : Component => _componentTypeDictionary.TryGetValue(typeof(__Type), out HashSet<Component> components) ? components.OfType<__Type>().ToList() : [];
/// <summary> Tries to get all components of a given type and returns false if there are none</summary> /// <summary> Tries to get all components of a given type and returns false if there are none</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
@@ -60,10 +67,10 @@ public abstract partial class ComponentDocker
/// <summary> Finds all components that have all the given tags</summary> /// <summary> Finds all components that have all the given tags</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public IEnumerable<Component> GetAll(IEnumerable<string> __tags) { public IEnumerable<Component> GetAll([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags) {
if (!DebugAttributes.EnumerableNotNull.VerifyOrThrow(__tags)) return [];
HashSet<Component> components; HashSet<Component> components;
if (_componentTagDictionary.TryGetValue(__tags.First(), out var firstComponents)) components = firstComponents; else return []; if (_componentTagDictionary.TryGetValue(__tags.First(), out var firstComponents)) components = firstComponents; else return [];
foreach(var tag in __tags) foreach(var tag in __tags)
@@ -75,7 +82,7 @@ public abstract partial class ComponentDocker
/// <summary> Tries to find all components that have all the given tags, returns false if there are none</summary> /// <summary> Tries to find all components that have all the given tags, returns false if there are none</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public bool TryGetAll(IEnumerable<string> __tags, out IEnumerable<Component> __components) public bool TryGetAll([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags, out IEnumerable<Component> __components)
{ __components = GetAll(__tags); return __components.Any(); } { __components = GetAll(__tags); return __components.Any(); }
@@ -84,7 +91,7 @@ public abstract partial class ComponentDocker
/// <summary> Finds all Components that have the given type, and all the given tags</summary> /// <summary> Finds all Components that have the given type, and all the given tags</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public IEnumerable<__Type> GetAll<__Type>(IEnumerable<string> __tags) where __Type : Component { public IEnumerable<__Type> GetAll<__Type>([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags) where __Type : Component {
if (!__tags.Any()) if (!__tags.Any())
return []; return [];
@@ -103,9 +110,8 @@ public abstract partial class ComponentDocker
/// <summary> Tries to find all the components that have the given tags and type, returns false if there are none</summary> /// <summary> Tries to find all the components that have the given tags and type, returns false if there are none</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public bool TryGetAll<__Type>(IEnumerable<string> __tags, out IEnumerable<__Type> __components) where __Type : Component { public bool TryGetAll<__Type>([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags, out IEnumerable<__Type> __components) where __Type : Component
__components = GetAll<__Type>(__tags); return __components.Any(); { __components = GetAll<__Type>(__tags); return __components.Any(); }
}
@@ -117,47 +123,47 @@ public abstract partial class ComponentDocker
/// <summary> Tries to get all the components with the given tag, returns false if there are none</summary> /// <summary> Tries to get all the components with the given tag, returns false if there are none</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public bool TryGetAll(string __tag, out IEnumerable<Component> __components) { __components = GetAll(__tag); return __components.Any(); } public bool TryGetAll([DebugAttributes.NotNull] string __tag, out IEnumerable<Component> __components) { __components = GetAll(__tag); return __components.Any(); }
/// <summary> Gets all the components that have a certain type, and a certain tag</summary> /// <summary> Gets all the components that have a certain type, and a certain tag</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public IEnumerable<__Type> GetAll<__Type>(string __tag) where __Type : Component => GetAll<__Type>([__tag]); public IEnumerable<__Type> GetAll<__Type>([DebugAttributes.NotNull] string __tag) where __Type : Component => GetAll<__Type>([__tag]);
/// <summary> Tries to get all the components with a certain tag, and a type. Returns false if there are none</summary> /// <summary> Tries to get all the components with a certain tag, and a type. Returns false if there are none</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public bool TryGetAll<__Type>(string __tag, out IEnumerable<__Type> __components) where __Type : Component { __components = GetAll<__Type>(__tag); return __components.Any(); } public bool TryGetAll<__Type>([DebugAttributes.NotNull] string __tag, out IEnumerable<__Type> __components) where __Type : Component { __components = GetAll<__Type>(__tag); return __components.Any(); }
/// <summary> Gets the first component with all the given tags</summary> /// <summary> Gets the first component with all the given tags</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public Component Get(IEnumerable<string> __tags) => GetAll(__tags).FirstOrDefault(); public Component Get([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags) => GetAll(__tags).FirstOrDefault();
/// <summary> Tries to get the first component with all the given tags. Returns false if there are none</summary> /// <summary> Tries to get the first component with all the given tags. Returns false if there are none</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public bool TryGet(IEnumerable<string> __tags, out Component __component) { __component = Get(__tags); return __component != null; } public bool TryGet([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags, out Component __component) { __component = Get(__tags); return __component != null; }
/// <summary> Finds the first component with the given tag</summary> /// <summary> Finds the first component with the given tag</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public Component Get(string __tag) => GetAll([__tag]).FirstOrDefault(); public Component Get([DebugAttributes.NotNull] string __tag) => GetAll([__tag]).FirstOrDefault();
/// <summary> Tries to find the first component with the given tag, returns false if there is none</summary> /// <summary> Tries to find the first component with the given tag, returns false if there is none</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public bool TryGet(string __tag, out Component __component) { __component = Get(__tag); return __component != null; } public bool TryGet([DebugAttributes.NotNull] string __tag, out Component __component) { __component = Get(__tag); return __component != null; }
/// <summary> Gets the first component with the given type and tag</summary> /// <summary> Gets the first component with the given type and tag</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public __Type Get<__Type>(string __tag) where __Type : Component => GetAll<__Type>(__tag).FirstOrDefault(); public __Type Get<__Type>([DebugAttributes.NotNull] string __tag) where __Type : Component => GetAll<__Type>(__tag).FirstOrDefault();
/// <summary> Tries to get the first component with the given type and tag, returns false if there is none.</summary> /// <summary> Tries to get the first component with the given type and tag, returns false if there is none.</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public bool TryGet<__Type>(string __tag, out __Type __component) where __Type : Component { __component = Get<__Type>(__tag); return __component != null; } public bool TryGet<__Type>([DebugAttributes.NotNull] string __tag, out __Type __component) where __Type : Component { __component = Get<__Type>(__tag); return __component != null; }

View File

@@ -25,8 +25,8 @@ public abstract partial class ComponentDocker
/// <summary> Moves all components in a list to another docker</summary> /// <summary> Moves all components in a list to another docker</summary>
public void MoveAll([DebugAttributes.EnumeratorNotNull, DebugAttributes.DockerOwns] IEnumerable<Component> __Components, [DebugAttributes.DockerNotNull, DebugAttributes.DifferentDocker] ComponentDocker __componentDocker) { public void MoveAll([DebugAttributes.EnumerableNotNull, DebugAttributes.DockerOwns] IEnumerable<Component> __Components, [DebugAttributes.DockerNotNull, DebugAttributes.DifferentDocker] ComponentDocker __componentDocker) {
if(!DebugAttributes.EnumeratorNotNull.VerifyOrThrow(__Components)) return; if(!DebugAttributes.EnumerableNotNull.VerifyOrThrow(__Components)) return;
if(!DebugAttributes.DockerNotNull.VerifyOrThrow(__componentDocker)) return; if(!DebugAttributes.DockerNotNull.VerifyOrThrow(__componentDocker)) return;
if(!DebugAttributes.DifferentDocker.VerifyOrThrow(this, __componentDocker)) return; if(!DebugAttributes.DifferentDocker.VerifyOrThrow(this, __componentDocker)) return;
@@ -36,6 +36,10 @@ public abstract partial class ComponentDocker
} }
} }
/// <summary> Gets all components of a given type</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public void MoveAll([DebugAttributes.DockerNotNull, DebugAttributes.DifferentDocker] ComponentDocker __componentDocker) => MoveAll(GetAll(), __componentDocker);
/// <summary> Moves the first component with a given Type</summary> /// <summary> Moves the first component with a given Type</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public void Move<__Type>([DebugAttributes.DockerNotNull, DebugAttributes.DifferentDocker] ComponentDocker __componentDocker) where __Type : Component => Move(Get<__Type>(), __componentDocker); public void Move<__Type>([DebugAttributes.DockerNotNull, DebugAttributes.DifferentDocker] ComponentDocker __componentDocker) where __Type : Component => Move(Get<__Type>(), __componentDocker);
@@ -50,14 +54,14 @@ public abstract partial class ComponentDocker
/// <summary> Moves all components that have all the given tags</summary> /// <summary> Moves all components that have all the given tags</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public void MoveAll([DebugAttributes.EnumeratorNotNull] IEnumerable<string> __tags, [DebugAttributes.DockerNotNull, DebugAttributes.DifferentDocker] ComponentDocker __componentDocker) => MoveAll(GetAll(__tags), __componentDocker); public void MoveAll([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags, [DebugAttributes.DockerNotNull, DebugAttributes.DifferentDocker] ComponentDocker __componentDocker) => MoveAll(GetAll(__tags), __componentDocker);
/// <summary> Moves all Components that have the given type, and all the given tags</summary> /// <summary> Moves all Components that have the given type, and all the given tags</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.VeryLow), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public void MoveAll<__Type>([DebugAttributes.EnumeratorNotNull] IEnumerable<string> __tags, [DebugAttributes.DockerNotNull, DebugAttributes.DifferentDocker] ComponentDocker __componentDocker) where __Type : Component => MoveAll(GetAll<__Type>(__tags), __componentDocker); public void MoveAll<__Type>([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags, [DebugAttributes.DockerNotNull, DebugAttributes.DifferentDocker] ComponentDocker __componentDocker) where __Type : Component => MoveAll(GetAll<__Type>(__tags), __componentDocker);

View File

@@ -77,7 +77,13 @@ public abstract partial class ComponentDocker
/// <summary> Destroys all the components in a given list </summary> /// <summary> Destroys all the components in a given list </summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Medium), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Medium), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public void DestroyAll([DebugAttributes.EnumeratorNotNull, DebugAttributes.DockerOwns] IEnumerable<Component> __Components) { foreach (Component component in __Components) Destroy(component); } public void DestroyAll() => DestroyAll(GetAll());
/// <summary> Destroys all the components in a given list </summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Medium), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public void DestroyAll([DebugAttributes.EnumerableNotNull, DebugAttributes.DockerOwns] IEnumerable<Component> __Components) { foreach (Component component in __Components.ToArray()) Destroy(component); }
@@ -95,14 +101,14 @@ public abstract partial class ComponentDocker
/// <summary> Destroys all components that have all the given tags</summary> /// <summary> Destroys all components that have all the given tags</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Medium), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Medium), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public void DestroyAll([DebugAttributes.EnumeratorNotNull] IEnumerable<string> __tags) => DestroyAll(GetAll(__tags)); public void DestroyAll([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags) => DestroyAll(GetAll(__tags));
/// <summary> Destroys all Components that have the given type, and all the given tags</summary> /// <summary> Destroys all Components that have the given type, and all the given tags</summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Medium), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Medium), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public void DestroyAll<__Type>([DebugAttributes.EnumeratorNotNull] IEnumerable<string> __tags) where __Type : Component => DestroyAll(GetAll<__Type>(__tags)); public void DestroyAll<__Type>([DebugAttributes.EnumerableNotNull] IEnumerable<string> __tags) where __Type : Component => DestroyAll(GetAll<__Type>(__tags));

View File

@@ -5,6 +5,7 @@ using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Reflection; using System.Reflection;
using Awperative.Kernel.Overhead.Reflection;
namespace AwperativeKernel; namespace AwperativeKernel;
@@ -42,38 +43,37 @@ public static partial class Awperative
/// <summary> Awperative's debugger of choice, found from the module manager.</summary> /// <summary> Awperative's debugger of choice, found from the module manager.</summary>
[MarkerAttributes.UnsafeInternal] [MarkerAttributes.UnsafeInternal, DependencyAttributes.RequiredModule]
public static IDebugger Debug { get; set; } public static IDebugger Debug { get; internal set; }
/// <summary> Awperative's module manager of choice, sent in through the Start() function</summary>
[MarkerAttributes.UnsafeInternal]
public static IModuleManager ModuleManager { get; private set; }
/// <summary> Creates a new Scene with the given name </summary> /// <summary> Creates a new Scene with the given name </summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Low), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Low), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public static Scene CreateScene(string __name) { public static Scene CreateScene([DebugAttributes.NotNull, DebugAttributes.SceneDoesNotExist] string __name) {
if (!ContainsScene(__name)) { if (!DebugAttributes.NotNull.VerifyOrThrow(__name)) return null;
if (!DebugAttributes.SceneDoesNotExist.VerifyOrThrow(GetScene(__name))) return null;
Scene newScene = new Scene(__name); Scene newScene = new Scene(__name);
_scenes.Add(newScene); _scenes.Add(newScene);
return newScene; return newScene;
} else Debug.LogError("Awperative already has a Scene with that name!", ["Scene", "Name"], [GetScene(__name).GetHashCode().ToString(), __name]); return null;
} }
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Low), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Low), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.O1)]
public static void AddScene(Scene __scene) { public static void AddScene([DebugAttributes.SceneNotNull, DebugAttributes.SceneDoesNotExist] Scene __scene) {
if (!ContainsScene(__scene.Name)) { if (!DebugAttributes.SceneNotNull.VerifyOrThrow(__scene)) return;
if (!DebugAttributes.SceneDoesNotExist.VerifyOrThrow(__scene)) return;
_scenes.Add(__scene); _scenes.Add(__scene);
} else Debug.LogError("Awperative already has a Scene with that name!", ["Scene", "Name"], [GetScene(__scene.Name).GetHashCode().ToString(), __scene.Name]); return;
} }
/// <summary> Finds a Scene from a given name </summary> /// <summary> Finds a Scene from a given name </summary>
[MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Medium), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)] [MarkerAttributes.Expense(MarkerAttributes.Expense.ExpenseLevel.Medium), MarkerAttributes.Complexity(MarkerAttributes.Complexity.TimeComplexity.ON)]
public static Scene GetScene(string __name) => _scenes.FirstOrDefault(scene => scene.Name == __name, null); public static Scene GetScene([DebugAttributes.NotNull] string __name) => !DebugAttributes.NotNull.VerifyOrThrow(__name) ? null : _scenes.FirstOrDefault(scene => scene.Name == __name, null);
@@ -102,64 +102,7 @@ public static partial class Awperative
if (IsStarted) return; if (IsStarted) return;
IsStarted = true; IsStarted = true;
//SPAGHETTI CODE FIX LATER! maybe move to static method in IModuleManager ReflectionManager.ResolveModules(AppDomain.CurrentDomain.GetAssemblies());
foreach (Type type in Assembly.LoadFrom(moduleManagerPath).GetTypes()) {
Console.WriteLine(type.Name);
if (type.GetInterfaces().Contains(typeof(IModuleManager))) {
ModuleManager = (IModuleManager)Activator.CreateInstance(type);
}
}
List<Assembly> targets = [Assembly.GetCallingAssembly()];
foreach (Assembly module in ModuleManager.GetDependencies()) {
targets.Add(module);
}
//Load in all Components nd find the associated types.
foreach (var t in targets) {
Console.WriteLine(t.FullName);
foreach (Type type in t.GetTypes()) {
if (type.IsSubclassOf(typeof(Component))) {
Action<Component>[] timeEvents = new Action<Component>[ComponentEvents.Count];
byte eventProfile = 0;
List<string> debugProfile = [];
for (int i = 0; i < ComponentEvents.Count; i++) {
MethodInfo eventMethod = type.GetMethod(ComponentEvents[i]);
if (eventMethod != null) {
var ComponentInstanceParameter = Expression.Parameter(typeof(Component), "__component");
var Casting = Expression.Convert(ComponentInstanceParameter, type);
var Call = Expression.Call(Casting, eventMethod);
var Lambda = Expression.Lambda<Action<Component>>(Call, ComponentInstanceParameter);
timeEvents[i] = Lambda.Compile();
} else timeEvents[i] = null;
}
_TypeAssociatedTimeEvents.Add(type, timeEvents);
}
if (type.GetInterfaces().Contains(typeof(IDebugger))) {
if (Debug == null) {
if (type.GetConstructor(Type.EmptyTypes) != null)
Debug = (IDebugger)Activator.CreateInstance(type);
else throw new Exception("Awperative doesn't support IDebugger constructor!");
} else {
throw new Exception("Awperative found multiple debuggers! There can only be one.");
}
}
}
}
if (Debug == null)
throw new Exception("Awperative doesn't have a Debugger!");
Debug.Start();
Debug.LogAction("Successfully Compiled Classes!"); Debug.LogAction("Successfully Compiled Classes!");
} }
@@ -204,15 +147,11 @@ public static partial class Awperative
} }
internal static ReadOnlyCollection<string> ComponentEvents = new(["Load", "Unload", "Update", "Draw", "Create", "Remove"]);
/// <summary> /// <summary>
/// List of all type of components and the associated time events /// List of all type of components and the associated time events
/// Each event is a 0 or 1 based on true or false, stored at their index in the byte /// Each event is a 0 or 1 based on true or false, stored at their index in the byte
/// </summary> /// </summary>
internal static Dictionary<Type, Action<Component>[]> _TypeAssociatedTimeEvents = [];
//What to do if there is an error, keep in mind low and none still can have errors, because you are turning off validation checking //What to do if there is an error, keep in mind low and none still can have errors, because you are turning off validation checking

View File

@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using AwperativeKernel;
namespace Awperative.Kernel.Overhead.Reflection;
internal static class DependencyManager
{
/// <summary> Resolves any needed Awperative dependencies! Given the Type, it searches recursively for all interfaces. If any of the interfaces
/// Has the RequiredModule() attribute, or one of the interfaces in required modules. It will assign it to the assosiated field in the Awperative class.</summary>
[MarkerAttributes.UnsafeInternal]
internal static void ResolveDependency(Type __type) {
Console.WriteLine(__type.FullName);
foreach (Type typeInterface in __type.GetInterfaces()) {
//Console.WriteLine(" " + typeInterface.FullName);
object[] dependencyInfo = typeInterface.GetCustomAttributes(typeof(DependencyAttribute), true);
if (dependencyInfo.Length == 0) continue;
foreach (object attribute in dependencyInfo) {
if (attribute is not DependencyAttributes.RequiredModule moduleAttribute) continue;
PropertyInfo data = typeof(AwperativeKernel.Awperative).GetProperty(moduleAttribute.Source, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
if (data != null) data.SetValue(null, Activator.CreateInstance(__type));
}
}
}
/// <summary> Checks all dependency marked variables in Awperative, and ensures that all are present!</summary>
[MarkerAttributes.UnsafeInternal]
internal static void ResolveFulfillment() {
foreach (PropertyInfo propertyInfo in typeof(AwperativeKernel.Awperative).GetProperties(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)) {
object[] attributes = propertyInfo.GetCustomAttributes(typeof(DependencyAttribute), true);
if (attributes.Length == 0) continue;
IModule module = propertyInfo.GetValue(null) as IModule;
if (module == null) throw new Exception("Failed to find dependency! " + propertyInfo.Name);
ReflectionManager._modules.Add(module);
module.Start();
}
}
}

View File

@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using AwperativeKernel;
namespace Awperative.Kernel.Overhead.Reflection;
internal static class EventManager
{
/// <summary> Holds an associated action for each component and a time event. Is built with CompileType() during Start().</summary>
[MarkerAttributes.UnsafeInternal]
internal static Dictionary<Type, Action<Component>[]> _TypeAssociatedTimeEvents = [];
/// <summary> All types of time based events in Awperative.</summary>
internal static readonly ImmutableArray<string> Events = ["Load", "Unload", "Update", "Draw", "Create", "Remove"];
/// <summary> Compiles a single type, and stores its events in the dictionary.</summary>
[MarkerAttributes.UnsafeInternal]
internal static void CompileType(Type __type) {
if (!__type.IsSubclassOf(typeof(Component))) return;
List<Action<Component>> timeEvents = [];
foreach (MethodInfo eventMethod in Events.Select(__type.GetMethod)) {
if (eventMethod == null) { timeEvents.Add(null); continue; }
ParameterExpression ComponentInstanceParameter = Expression.Parameter(typeof(Component), "__component");
UnaryExpression Casting = Expression.Convert(ComponentInstanceParameter, __type);
MethodCallExpression Call = Expression.Call(Casting, eventMethod);
Expression<Action<Component>> Lambda = Expression.Lambda<Action<Component>>(Call, ComponentInstanceParameter);
timeEvents.Add(Lambda.Compile());
}
_TypeAssociatedTimeEvents.Add(__type, timeEvents.ToArray());
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using AwperativeKernel;
namespace Awperative.Kernel.Overhead.Reflection;
internal static class ReflectionManager
{
/// <summary> List of all modules in Awperative</summary>
[MarkerAttributes.UnsafeInternal]
internal static List<IModule> _modules = [];
/// <summary> Resolves all the modules from the calling assembly and module manager</summary>
[MarkerAttributes.UnsafeInternal]
internal static void ResolveModules(Assembly[] __assemblies) {
foreach (Assembly assembly in __assemblies) ResolveAssembly(assembly);
DependencyManager.ResolveFulfillment();
}
/// <summary> Resolves all the types in an assembly.</summary>
[MarkerAttributes.UnsafeInternal]
internal static void ResolveAssembly(Assembly __assembly) {
foreach (Type type in __assembly.GetTypes()) {
DependencyManager.ResolveDependency(type);
EventManager.CompileType(type);
}
}
}

View File

@@ -1,20 +1,14 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
namespace AwperativeKernel; namespace AwperativeKernel;
public interface IDebugger
{
public void Start(); [DependencyAttributes.RequiredModule(Source: "Debug")]
public void Stop(); public interface IDebugger : IModule
{
public void LogAction(string __message); public void LogAction(string __message);
public void LogAction(string __message, IEnumerable<string> __values, IEnumerable<string> __args); public void LogAction(string __message, IEnumerable<string> __values, IEnumerable<string> __args);

View File

@@ -0,0 +1,12 @@
namespace AwperativeKernel;
public interface IModule
{
public void Start();
public void Stop();
}

View File

@@ -1,11 +0,0 @@
using System.Collections.Generic;
using System.Reflection;
namespace AwperativeKernel;
public interface IModuleManager
{
public IEnumerable<Assembly> GetDependencies();
}

View File

@@ -1,20 +1,20 @@
{ {
"format": 1, "format": 1,
"restore": { "restore": {
"/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj": {} "/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj": {}
}, },
"projects": { "projects": {
"/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj": { "/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj", "projectUniqueName": "/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj",
"projectName": "AwperativeKernel", "projectName": "AwperativeKernel",
"projectPath": "/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj", "projectPath": "/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj",
"packagesPath": "/Users/averynorris/.nuget/packages/", "packagesPath": "/home/avery/.nuget/packages/",
"outputPath": "/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/obj/", "outputPath": "/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/obj/",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"configFilePaths": [ "configFilePaths": [
"/Users/averynorris/.nuget/NuGet/NuGet.Config" "/home/avery/.nuget/NuGet/NuGet.Config"
], ],
"originalTargetFrameworks": [ "originalTargetFrameworks": [
"net8.0" "net8.0"
@@ -38,7 +38,7 @@
"auditLevel": "low", "auditLevel": "low",
"auditMode": "direct" "auditMode": "direct"
}, },
"SdkAnalysisLevel": "10.0.100" "SdkAnalysisLevel": "9.0.300"
}, },
"frameworks": { "frameworks": {
"net8.0": { "net8.0": {
@@ -63,11 +63,11 @@
"downloadDependencies": [ "downloadDependencies": [
{ {
"name": "Microsoft.AspNetCore.App.Ref", "name": "Microsoft.AspNetCore.App.Ref",
"version": "[8.0.23, 8.0.23]" "version": "[8.0.24, 8.0.24]"
}, },
{ {
"name": "Microsoft.NETCore.App.Ref", "name": "Microsoft.NETCore.App.Ref",
"version": "[8.0.23, 8.0.23]" "version": "[8.0.24, 8.0.24]"
} }
], ],
"frameworkReferences": { "frameworkReferences": {
@@ -75,7 +75,7 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/10.0.102/PortableRuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/home/avery/.dotnet/sdk/9.0.311/PortableRuntimeIdentifierGraph.json"
} }
} }
} }

View File

@@ -4,12 +4,12 @@
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess> <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/Users/averynorris/.nuget/packages/</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/avery/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/Users/averynorris/.nuget/packages/</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/avery/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">7.0.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.0</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/Users/averynorris/.nuget/packages/" /> <SourceRoot Include="/home/avery/.nuget/packages/" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("AwperativeKernel")] [assembly: System.Reflection.AssemblyCompanyAttribute("AwperativeKernel")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+daff25af555790c4cc665d8158c8ec80cf2d5cf2")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+227e70219acaaa9bbd4981af01eb79aaf1d96e0e")]
[assembly: System.Reflection.AssemblyProductAttribute("AwperativeKernel")] [assembly: System.Reflection.AssemblyProductAttribute("AwperativeKernel")]
[assembly: System.Reflection.AssemblyTitleAttribute("AwperativeKernel")] [assembly: System.Reflection.AssemblyTitleAttribute("AwperativeKernel")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
0205d8c69e5e58efd9ceec6d025aa71702700c3efb6b0341b64d64d2efcda724 5f132d4abe29f474cced3dd72be32c95430c59618df6c594ae25e534fec8180c

View File

@@ -1,7 +1,5 @@
is_global = true is_global = true
build_property.TargetFramework = net8.0 build_property.TargetFramework = net8.0
build_property.TargetFrameworkIdentifier = .NETCoreApp
build_property.TargetFrameworkVersion = v8.0
build_property.TargetPlatformMinVersion = build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb = build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids = build_property.ProjectTypeGuids =
@@ -10,7 +8,7 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules = build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Awperative build_property.RootNamespace = Awperative
build_property.ProjectDir = /Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/ build_property.ProjectDir = /home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/
build_property.EnableComHosting = build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop = build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 8.0 build_property.EffectiveAnalysisLevelStyle = 8.0

View File

@@ -1 +1 @@
5635b864dfc1ecaa0f2c52b65d178dd300857fd622e8afa48acfcadbd77f72d1 33413ce2ba51fbf0a7062dcd01f5b1a867dc2f45dcea968b5bdf25fdfd4515ac

View File

@@ -442,19 +442,19 @@
] ]
}, },
"packageFolders": { "packageFolders": {
"/Users/averynorris/.nuget/packages/": {} "/home/avery/.nuget/packages/": {}
}, },
"project": { "project": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj", "projectUniqueName": "/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj",
"projectName": "AwperativeKernel", "projectName": "AwperativeKernel",
"projectPath": "/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj", "projectPath": "/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj",
"packagesPath": "/Users/averynorris/.nuget/packages/", "packagesPath": "/home/avery/.nuget/packages/",
"outputPath": "/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/obj/", "outputPath": "/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/obj/",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"configFilePaths": [ "configFilePaths": [
"/Users/averynorris/.nuget/NuGet/NuGet.Config" "/home/avery/.nuget/NuGet/NuGet.Config"
], ],
"originalTargetFrameworks": [ "originalTargetFrameworks": [
"net8.0" "net8.0"
@@ -478,7 +478,7 @@
"auditLevel": "low", "auditLevel": "low",
"auditMode": "direct" "auditMode": "direct"
}, },
"SdkAnalysisLevel": "10.0.100" "SdkAnalysisLevel": "9.0.300"
}, },
"frameworks": { "frameworks": {
"net8.0": { "net8.0": {
@@ -503,11 +503,11 @@
"downloadDependencies": [ "downloadDependencies": [
{ {
"name": "Microsoft.AspNetCore.App.Ref", "name": "Microsoft.AspNetCore.App.Ref",
"version": "[8.0.23, 8.0.23]" "version": "[8.0.24, 8.0.24]"
}, },
{ {
"name": "Microsoft.NETCore.App.Ref", "name": "Microsoft.NETCore.App.Ref",
"version": "[8.0.23, 8.0.23]" "version": "[8.0.24, 8.0.24]"
} }
], ],
"frameworkReferences": { "frameworkReferences": {
@@ -515,7 +515,7 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/10.0.102/PortableRuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/home/avery/.dotnet/sdk/9.0.311/PortableRuntimeIdentifierGraph.json"
} }
} }
} }

View File

@@ -1,24 +1,24 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "LpP/nHq7BJc=", "dgSpecHash": "nvLY3cNblzg=",
"success": true, "success": true,
"projectFilePath": "/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj", "projectFilePath": "/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"/Users/averynorris/.nuget/packages/opentk/5.0.0-pre.15/opentk.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk/5.0.0-pre.15/opentk.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.audio/5.0.0-pre.15/opentk.audio.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk.audio/5.0.0-pre.15/opentk.audio.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.compute/5.0.0-pre.15/opentk.compute.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk.compute/5.0.0-pre.15/opentk.compute.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.core/5.0.0-pre.15/opentk.core.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk.core/5.0.0-pre.15/opentk.core.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.graphics/5.0.0-pre.15/opentk.graphics.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk.graphics/5.0.0-pre.15/opentk.graphics.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.input/5.0.0-pre.15/opentk.input.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk.input/5.0.0-pre.15/opentk.input.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.mathematics/5.0.0-pre.15/opentk.mathematics.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk.mathematics/5.0.0-pre.15/opentk.mathematics.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.platform/5.0.0-pre.15/opentk.platform.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk.platform/5.0.0-pre.15/opentk.platform.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.redist.glfw/3.4.0.44/opentk.redist.glfw.3.4.0.44.nupkg.sha512", "/home/avery/.nuget/packages/opentk.redist.glfw/3.4.0.44/opentk.redist.glfw.3.4.0.44.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.windowing.common/5.0.0-pre.15/opentk.windowing.common.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk.windowing.common/5.0.0-pre.15/opentk.windowing.common.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.windowing.desktop/5.0.0-pre.15/opentk.windowing.desktop.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk.windowing.desktop/5.0.0-pre.15/opentk.windowing.desktop.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/opentk.windowing.graphicslibraryframework/5.0.0-pre.15/opentk.windowing.graphicslibraryframework.5.0.0-pre.15.nupkg.sha512", "/home/avery/.nuget/packages/opentk.windowing.graphicslibraryframework/5.0.0-pre.15/opentk.windowing.graphicslibraryframework.5.0.0-pre.15.nupkg.sha512",
"/Users/averynorris/.nuget/packages/system.runtime.compilerservices.unsafe/6.0.0/system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512", "/home/avery/.nuget/packages/system.runtime.compilerservices.unsafe/6.0.0/system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512",
"/Users/averynorris/.nuget/packages/microsoft.netcore.app.ref/8.0.23/microsoft.netcore.app.ref.8.0.23.nupkg.sha512", "/home/avery/.nuget/packages/microsoft.netcore.app.ref/8.0.24/microsoft.netcore.app.ref.8.0.24.nupkg.sha512",
"/Users/averynorris/.nuget/packages/microsoft.aspnetcore.app.ref/8.0.23/microsoft.aspnetcore.app.ref.8.0.23.nupkg.sha512" "/home/avery/.nuget/packages/microsoft.aspnetcore.app.ref/8.0.24/microsoft.aspnetcore.app.ref.8.0.24.nupkg.sha512"
], ],
"logs": [] "logs": []
} }

View File

@@ -1 +1 @@
"restore":{"projectUniqueName":"/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj","projectName":"AwperativeKernel","projectPath":"/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj","outputPath":"/Users/averynorris/RiderProjects/AwperativeKernel/AwperativeKernel/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"},"SdkAnalysisLevel":"10.0.100"}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"OpenTK":{"target":"Package","version":"[5.0.0-pre.15, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"downloadDependencies":[{"name":"Microsoft.AspNetCore.App.Ref","version":"[8.0.23, 8.0.23]"},{"name":"Microsoft.NETCore.App.Ref","version":"[8.0.23, 8.0.23]"}],"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/local/share/dotnet/sdk/10.0.102/PortableRuntimeIdentifierGraph.json"}} "restore":{"projectUniqueName":"/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj","projectName":"AwperativeKernel","projectPath":"/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/AwperativeKernel.csproj","outputPath":"/home/avery/Projects/Awperative/AwperativeKernel/AwperativeKernel/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"},"SdkAnalysisLevel":"9.0.300"}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"OpenTK":{"target":"Package","version":"[5.0.0-pre.15, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"downloadDependencies":[{"name":"Microsoft.AspNetCore.App.Ref","version":"[8.0.24, 8.0.24]"},{"name":"Microsoft.NETCore.App.Ref","version":"[8.0.24, 8.0.24]"}],"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/home/avery/.dotnet/sdk/9.0.311/PortableRuntimeIdentifierGraph.json"}}

View File

@@ -1 +1 @@
17724711122635060 17724794171898753

View File

@@ -1 +1 @@
17724711517868833 17724794196898973