Commit Graph

167 Commits

Author SHA1 Message Date
f310982890 More things that cant be serdeser 2025-10-16 22:51:30 +00:00
7abfe28e9b Dont serialize delegates 2025-10-16 15:13:02 -07:00
d6135116f1 Little godot hack in config 2025-10-16 02:31:11 -07:00
e7332ff3d4 Fixed 2025-10-15 23:20:29 -07:00
6c6fb158c2 Update 2025-10-15 23:07:26 -07:00
da399343e2 Lotsa fun 2025-10-15 21:50:37 -07:00
5a0adfc2b3 property for log info 2025-09-24 21:57:49 -07:00
4b53686b92 BIG fix to logging
Started using Blocking datastructures making things a lot better.  Thanks Gemini!
2025-09-24 20:56:02 -07:00
83ef5dad91 Only use 1 ItemGroup 2025-09-18 00:04:54 -07:00
681afafe05 Project updates 2025-09-16 02:39:27 -07:00
7b28ec1503 ***** Switch to ser.XmlSer 2025-09-15 20:49:54 -07:00
403d106ae0 Bring some versions up 2025-09-11 16:35:17 -07:00
5e8bb3acfc Refactor unnamed tuple into a struct 2025-09-02 11:09:21 -07:00
ce75909b8b Bitwise Guid helpers 2025-08-25 17:00:36 -07:00
7f3a497eb0 Log Fixes 2025-08-24 16:31:08 -07:00
1c8893c197 Fix configs after the big refactor 2025-08-19 21:57:20 -07:00
bba0e96007 Cleanup log system 2025-08-18 20:06:59 -07:00
4563db15a6 Ser updates 2025-08-17 10:57:44 -07:00
3f850cc9b0 Implement Xml Serialization Framework with Type Handling and Metadata Caching
- Introduced XmlSer class for XML serialization and deserialization.
- Added TypeMetaCache for caching type metadata and reflection information.
- Implemented various ITypeHandler implementations for handling different types (Primitive, Proxy, ISerializable, Collection, Object).
- Enhanced type resolution with TypeResolver to manage type lookups and conversions.
- Established a configuration class (XmlCfg) to manage serialization settings.
- Integrated support for handling graphs and references in serialized objects.
- Added extensive member processing and filtering based on attributes.
- Ensured compatibility with immutable collections and various data structures.
- Implemented detailed error handling and logging for serialization processes.
2025-05-28 10:46:00 -07:00
f873c42cbf fix(logging): Account for nullable value types
This commit updates logging to handle nullable value types and parameters.

The following changes were made:
- Updated the Value record to use '!' instead of '?' for nullability.
- Added '!' to the default Value.
- Added '!= null' checks to conditional assignment.
- Removed unnecessary nullable-disable compiler directives.
2024-08-15 22:26:47 -07:00
b59baf0239 Title: Refactored variable names and removed unused imports
x) In `Imm.cs`, renamed the delegate parameter from `ZZOld` to `old` for clarity.
x) Also in `Imm.cs`, changed the property name from `ZZOld` to `Old_backing`. This change was made across multiple classes within the file, improving code readability by using a more descriptive name.
x) In `Log.cs`, removed unused imports (`System.Security.Cryptography.X509Certificates`, `System.Dynamic`, `System.Xml.Schema`, and `Microsoft.CodeAnalysis.CSharp.Syntax`) to clean up the codebase.
2024-08-06 12:17:24 -07:00
9aeac39704 Title: Refactored logging system and updated Config.cs
x) Updated `Config.cs` to include a new instance of `XmlFormatter2Cfg` with specified data structure and POD.
x) Renamed the `destroy()` method in `Log.cs` to `shutdown()`.
x) Modified the startup process in `Log.cs` to check if it's already running, providing an info log if true.
x) Changed the encoding for StreamWriter in `startup()` method to UTF8 and added buffer size.
x) Commented out error stream related lines in Log.cs as they are not being used currently.
x) Added exception handling when processing message headers in log events.
x) Added checks for null or whitespace strings before writing them into files or console. Trimmed any null characters from lines before writing them into files.
x) Removed unnecessary white spaces and commented code blocks.
2024-08-04 01:30:23 -07:00
738fd19cf3 Title: Commented out deferredLoader related code in Resource.cs
x) The changes involve commenting out the `deferredLoader` related code in the `Resource.cs` file.
x) Specifically, the instantiation of `ImmDefLoad s_deferredLoad`, the creation and start of a new thread for `m_deferredLoader`, and the entire method `deferredLoader()` have been commented out.
x) This might be due to debugging or refactoring efforts where these parts are temporarily disabled. Further context is needed to understand why these specific lines were commented out.
2024-08-02 20:34:26 -07:00
09bcc5ee37 Add the ability for records to be config classes 2024-08-02 13:47:20 -07:00
d58fb58b3a Title: Refactored condition checks in XmlFormatter2.cs
x) This change also includes a check on the writer's state before deciding whether to write elements, improving robustness of the serialization process.
2024-07-30 00:47:19 -07:00
b66bc4e5ed Title: Added support for 'Do' attribute in XML Formatter
x) Introduced the 'Do' attribute to the XML formatter.
x) The 'Do' attribute is now fetched and checked before filtering fields and properties.
x) This change allows more granular control over serialization, as items marked with the 'Do' attribute will not be filtered out.
x) Adjusted formatting in some areas for consistency.
2024-07-29 20:25:22 -07:00
b0b9496c4a x) Updated argument expressions and method overrides in multiple classes
In this commit, several changes were made across different files:

- In `FSM.cs` and `Imm.cs`, the `[CallerArgumentExpression]` attribute was updated to reflect the correct argument names.
- The `ProcessWork` method in `Imm.cs` was changed from virtual to override.
- In `Log.cs`, the `[CallerArgumentExpression]` attribute was updated for clarity.
- A new override for the `GetHashCode()` method was added in `AddressStack.cs`.
- The version of "Microsoft.CodeAnalysis.CSharp" package reference was updated from 4.2.0 to 4.3.1 in 'SharpLib.csproj'.

These changes improve code readability and ensure that methods are correctly overridden where necessary. Also, updating the package version ensures compatibility with newer features or bug fixes provided by Microsoft's C# compiler platform.
2024-07-26 20:53:36 -07:00
23017e0852 Title: Removed unnecessary whitespace in Imm.cs
x) Analyzed the file changes and diffs for imm/Imm.cs.
x) The changes involve removing extra lines of whitespace that were present in the code. This was done to improve readability and maintain a clean, consistent coding style.
x) No functional changes were made to the code, so no impact on functionality is expected.
2024-07-23 17:12:48 -07:00
6f63f550fa Title: Added Bitwise.cs for bitwise operations on enums
x) Created a new file, Bitwise.cs, which includes two static methods for performing bitwise operations on enums.
x) The method `ByPointers_DirectInt` directly converts an enum value to its integer representation using unsafe code and pointer manipulation. This is useful when we need the exact binary representation of an enum.
x) The method `On` checks if a specific bit (represented by an enum value) is set in a given bitfield. It uses the `ByPointers_DirectInt` method to convert the enum value to its integer equivalent before performing the bitwise operation.
x) These changes provide more efficient ways of handling bitwise operations with enums in our codebase.
2024-07-22 18:47:54 -07:00
f9907bb4e0 x) Updated Thread.Sleep parameter in Log.cs
In the logging/Log.cs file, the parameter of the Thread.Sleep function has been changed from 0 to 1. This change is likely aimed at adjusting the pause duration for a running thread. The context suggests this is a temporary solution until a semaphore or mutex can be implemented as indicated by the existing TODO comment.
2024-07-20 17:41:50 -07:00
9dbd52e736 Log call renames 2024-07-17 16:35:23 -07:00
a5cd9b3a67 Update XmlFormatter2.cs with setMethod handling and type comparison improvements
x) Added setMethod handling for child elements
x) Improved type comparison using IsAssignableFrom instead of IsSubclassOf
2024-07-03 12:40:47 -07:00
13d86f73eb Add record method for logging
x) Added a new 'record' method to log debug information with name, path, and line number.
2024-07-03 03:08:03 -07:00
be02b6f91f Consolidate imports, wrap metadata in struct, update type constraints
x) Consolidate imports for Immutable collections
x) Wrap metadata into its own struct
x) Update type constraints for generic methods
2024-07-01 14:47:24 -07:00
066d3bc7f9 Add global aliases for Immutable collections
x) Refactor logging endpoints to use more concise method names
x) Implement implicit conversion for Value struct
x) Add direct callback functionality to log events
2024-06-21 23:36:53 -07:00
bf7e47e532 Update Value class method signature
x) Changed generic type parameter from T to U in the Get method.
2024-06-18 15:27:46 -07:00
c98db058be Fix log.info call in Log.cs
x) Corrected log.info call for Tracing.MemoryPipe.
2024-06-11 17:15:26 -07:00
db949e14ab Some fixes 2024-06-10 15:16:16 -07:00
7fbfc446d5 Merge branch 'master' into mh/dev 2024-06-10 15:15:39 -07:00
803f5fcaec Merge remote-tracking branch 'origin/master' into mh/dev
Merge 'origin/master' into mh/dev

x) Update SharpLib.csproj to target .NET 8.0
x) Add new SharpLib solution file for Visual Studio 17.5
x) Define project configurations in the solution file
2024-06-10 15:06:36 -07:00
444d9b77fa
Create LICENSE 2024-06-10 15:05:03 -07:00
404789d87c feat: Add explicit transaction class/ID and split functionality into threaded vs action
x) Added enum for CommitResults
x) Created interface IID<TS>
x) Implemented DB class with lock, objects, committed lists
x) Updated lookup and checkout methods in DB class
x) Added TxStates enum and implemented Tx class with checkout, add, dispose methods
x) Implemented commit method in DB class to handle transactions efficiently
2024-06-05 15:02:21 -07:00
1fd02d1460 Update logging events and improve log details display
x) Add new logging events for GC and ThreadPoolWorkerThread
x) Implement method to extract method information from TraceEvent
x) Enhance log details display for specific event types
x) Improve time header format in log messages
x) Refactor verbose logging messages to include type friendly names
2024-06-02 16:26:11 -07:00
7f9b210bbd Comment out detailed CLR logging 2024-05-27 16:50:45 -07:00
a62724bf67 Update logging and event handling in GC.cs and Log.cs
x) Added new event handling for runtime garbage collection events
x) Implemented logging endpoints for different categories
x) Improved object creation handling based on type constructors
2024-05-27 16:47:39 -07:00
32d6c29443 feat: Add RuntimeGCEventsPrinter class for monitoring GC events
x) Implement PrintRuntimeGCEvents method to monitor GC events in a specified process
x) Refactor logs for structured logging using interpolated strings
x) Introduce TraceLogMonitor class for real-time monitoring of exceptions and module loads
2024-05-27 01:13:43 -07:00
0fce863a81 Refactor logs for structured logging and add new Value struct:
- Refactor various logs to enable automagic structured logging
- Add `Value` struct for creating values with debug expressions
- Update `LogEvent` constructor to include an expression field
- Modify log methods to pass debug expressions for messages
- Implement new methods for logging values and objects with debug expressions
2024-05-26 22:27:45 -07:00
0619812089 x) Refactor Resource.cs: Change class Ref to be abstract, update method signatures, and adjust class inheritance hierarchy.
x) Update LoadHolder to be an abstract class with an overridden load method.
x) Modify Mgr class initialization and loader handling in Resource.mgr.
2024-05-26 20:30:53 -07:00
83e10dd444 Update Conn.cs, Resource.cs, and XmlFormatter2.cs
- Fix typos in method names: recieveObject -> receiveObject
- Initialize object in receiveObject method
- Add nullable enable directive to Resource.cs
- Remove unused exception variable in XmlFormatter2
2024-05-26 20:13:55 -07:00
193067bf5c Fix nullability issues in Log.cs and Imm.cs
- Updated Log.cs to handle nullable object types
  - Modified LogEvent class to accept nullable object types
  - Adjusted methods in log class to use nullable object types where necessary
  - Initialized s_thread variable with Thread.CurrentThread

- Updated MemorySourceText and MemoryRefResolver classes in Script.cs
  - Implemented overrides for SourceText properties and methods in MemorySourceText class
  - Refactored MemoryRefResolver class to handle nullability correctly
2024-05-26 19:49:45 -07:00