Mappa v1.1.0
From the portfolio: Mappa
A new version of Mappa (v1.1.0) has been released.
⚙️ What’s new?
-
#11 Generated method can be surrounded by
#praga warning disablewhen the user setup propertyPragmaWarninginMappaSettingsattribute; -
#126 Add
DebuggerNonUserCodeAttributeto generated methods; -
#137 Removed usage of
SymbolEqualityComparer.IncludeNullabilityas it does not work very well with code with mixed nullability; - #122 Improved check if a property/method can be accessed in a class;
-
#93 Add
MappaStaticDependencyattribute; -
#118 Add support for concurrent collections (
BlockingCollection<T>,ConcurrentBag<T>,ConcurrentStack<T>,ConcurrentQueue<T>,ConcurrentDictionary<TKey, TValue>,IProducerConsumerCollection); - #127 Add warning when a property cannot be mapped.
🐞 Bug fixes
- #128 In some instances Mappa emits a CS8600 warning;
-
#121 Fail to map
System.DateTimeto protobufTimestamp.
🔜 What’s next for v1.2.0?
More features are going to be added in future releases:
- #129 Add ability to assign constant values;
- #53 Better detection of implemented interfaces in case multiple interfaces of the same type are implemented by the class;
-
#24 Add support for faster loop iteration using
Span<T>when possible; -
#34 User should be able to select if they want to use the
Addmethod or the indexer when mapping to dictionaries; -
#54 When mapping from string support static
Parsemethods on the target type; -
#70 Allow
MappaInvokeMethodAttributeto support methods withMappaMethodContext; -
#47 Add default support for mapping from
Guidtobyte[]and vice-versa; -
#118 When targeting read-only properties of type collection Mappa should support more types (e.g.
Stack<T>,Queue<T>, …);
📦 NuGet packages
Mappa provides 6 NuGet packages:
- Mappa: source generator that allows you to automatically generate mappings between classes and value types;
- Mappa source generator: source generator that allows you to automatically generate mappings between classes and value types;
-
Mappa Protobuf: methods to map
Google.Protobuf.WellKnownTypesobjects from Google.Protobuf package into common objects. - Mappa Protobuf dependency: utility methods to register the Protobuf mapper.
-
Mappa Bson: methods to map
MongoDB.Bsonobjects from MongoDB.Bson package into common objects. - Mappa Bson dependency: utility methods to register the Bson mapper.