Skip to content

Update#15

Open
nd1012 wants to merge 17 commits intomainfrom
dev
Open

Update#15
nd1012 wants to merge 17 commits intomainfrom
dev

Conversation

@nd1012
Copy link
Copy Markdown
Owner

@nd1012 nd1012 commented Jun 18, 2023

  • Stream serializer version is now 3
  • Changed write extension methods to be non-generic where possible
  • Added SerializerException.Wrap(Async)
  • Added non-generic read extensions where possible
  • Reduced reflection usage where possible to improve performance
  • Using cached reflection to improve reflection performance
  • Lots of code refactoring
  • Added more fine grained tests
  • Fixed some bugs

@nd1012 nd1012 added bug Something isn't working enhancement New feature or request labels Jun 18, 2023
@nd1012 nd1012 self-assigned this Jun 18, 2023
@nd1012 nd1012 added the documentation Improvements or additions to documentation label Jun 25, 2023
nd1012 added 17 commits July 22, 2023 19:35
* Stream serializer version is now **3**
* Changed write extension methods to be non-generic where possible
+ Added `SerializerException.Wrap(Async)`
+ Added non-generic read extensions where possible
+ Reduced reflection usage where possible to improve performance
+ Using cached reflection to improve reflection performance
+ Lots of code refactoring
+ Added more fine grained tests
- Fixed some bugs
* `Write(Fixed)Array*` methods won't redirect a `byte[]` to `WriteBytes*` anymore - use `WriteBytes*` directly instead
+ Added `SerializerException.From`
+ Added `(ReadOnly)Span` and `(ReadOnly)Memory` type overloads for (fixed) array writing/reading
+ Added `NO_INLINE` pre-compiler constant to disable aggressive method inlining
+ Changed the way allowed typed are determined to support any generic type and inherited types
+ Added `IDictionary`, `IList` and `Stream` to the list of allowed types
- Bugfix: `WriteSerializerVersion*` uses the customizable `StreamSerializer.Version` now
- Bugfix: `ReadSerializerVersion` allows using a customized serializer version now (only the birst 8 bits are used for the serializer version, all other bits can be used for customizing)
+ Added `StreamSerializer.CreateInstance` and `StreamSerializer.InstanceFactories`
+ Added `ConstructorInfo.IsSerializerConstructor` extension method
- Fixed a bug when determining the optimal serialized type for a numeric value
+ `StreamSerializerAttribute` can now be used to mark the preferred serializer constructor
+ Added fluent asynchronous API for `StreamExtensions` writing methods
- Fixed `short` was serialized as `int` when using `WriteNumber`
- Fixed a bug when using the serializer constructor of a `(Disposable)StreamSerializerBase` type
+ Added `StreamExtensions.WrifeIf(Async)` for conditional writing
- Fixed missing `ObjectTypes.Byte` numeric object type determination
* Removed `ArrayPool<byte>` arguments from most of the (reading) methods (`StreamSerializer.BufferPool` will be used everywhere instead)
+ Added `ISerializerOptions.Key/ValueOptions`, `ISerializerOptions.Serializer` and `ISerializerOptions.IsNullable`
+ Added `StreamExtensions.Read/WriteItem(Async)`
+ Added `StreamExtensions.Read/WriteAnyItemHeader(Async)`
+ Added `WriteAny*` method overloads which allow skipping the header writing
+ Added `SerializerTypes`
+ Added `Type` extensions `SerializerHelper.GetItemSerializerInfo` and `SerializerHelper.GetItemDeserializerInfo`
+ Added `Type` extensions `SerializerHelper.FindSerializer` and `SerializerHelper.FindDeserializer`
+ Added `SerializerHelper.RequiresTypeName` for `ObjectType`
+ Added `SerializerHelper.RequiresObjectWriting` for `ObjectType`
+ Added `SerializerHelper.EnsureCorrectObjectType` for `ObjectType`
+ Added `StreamSerializerAttribute.Serializer`
+ Optimized array/list/dictionary/object writing/reading for most of the supported key/value/object types
+ Added support for nullable array/list/dictionary values
+ Added `SerializerOptionsFluentExtensions`
+ Added `SerializerHelper.GetObjectType` extension for `Type`
+ Added `SerializerHelper.IsGeneric` extension for `ObjectTypes`
+ Added `Type` writing/reading methods and `SerializedTypeInfo`
+ Added type cache for `IStreamSerializer` types for writing only a minimum of type informations
- Fixed a bug in `SerializerHelper.IsArray`
- Fixed a bug when serializing array/list/dictionary as "any object"
* Methods use a context now, replacing serializer version and cancellation token arguments
* Contains "unsafe" code now
+ Added `SerializerHelper.IsZero` and `SerializerHelper.IsBreak` extensions for `ObjectTypes`
+ Added `SequenceTypes` for context based cache usage informations
+ Added `SerializerContextBase`, `SerializerContext`, `DeserializerContext`, `ISerializerContext`, `ISerializationContext` and `IDeserializationContext`
+ Added `ItemSerializerContext` and `ItemDeserializerContext`
+ Added `SerializerHelper.GetClrType` extension for `NumberTypes`
+ Added new project `Strem-Serializer-Extensions-Full`, which will contain advanced serialization tools
- Fixed a bug in `StreamSeralizer.IsTypeAllowed`: Types with a `StreamSerializerAttribute` are now allowed per default
+ Added `ContextCached` and `ContextUncached` for temporary enabling/disabling the serializer context cache
+ Added `StreamSerializerValueBase<T>` which extends `ValueObjectBase<T>` from `wan24-Core`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant