![]() |
VOOZH | about |
dotnet add package OutWit.Common.MemoryPack --version 1.1.4
NuGet\Install-Package OutWit.Common.MemoryPack -Version 1.1.4
<PackageReference Include="OutWit.Common.MemoryPack" Version="1.1.4" />
<PackageVersion Include="OutWit.Common.MemoryPack" Version="1.1.4" />Directory.Packages.props
<PackageReference Include="OutWit.Common.MemoryPack" />Project file
paket add OutWit.Common.MemoryPack --version 1.1.4
#r "nuget: OutWit.Common.MemoryPack, 1.1.4"
#:package OutWit.Common.MemoryPack@1.1.4
#addin nuget:?package=OutWit.Common.MemoryPack&version=1.1.4Install as a Cake Addin
#tool nuget:?package=OutWit.Common.MemoryPack&version=1.1.4Install as a Cake Tool
OutWit.Common.MemoryPack is a .NET library that provides a collection of helper methods and pre-configured, serializable types to simplify and accelerate development with the MemoryPack serialization library. It offers extension methods for common tasks, custom formatters, and a suite of ready-to-use data structures for various domain needs.
PropertyChangedEventArgs: Includes a built-in formatter for System.ComponentModel.PropertyChangedEventArgs, which is automatically registered and essential for MVVM applications.[MemoryPackable] types designed to be used directly in your data models:
MemoryPackMap<TKey, TValue> and MemoryPackSet<TValue> for serializable, read-only collections.MemoryPackMessage and MemoryPackMessageWith<TData> for creating standardized DTOs.MemoryPackRange<TValue>, MemoryPackRangeSet<TValue>, and MemoryPackValueInSet<TValue> for representing common data constraints.Install the package from NuGet using the .NET CLI:
dotnet add package OutWit.Common.MemoryPack
The MemoryPackUtils class provides convenient extension methods.
using OutWit.Common.MemoryPack;
using MemoryPack;
[MemoryPackable]
public partial class User
{
public string Name { get; set; }
public int Age { get; set; }
}
var user = new User { Name = "John Doe", Age = 30 };
// Serialize the object to bytes
byte[] bytes = user.ToMemoryPackBytes();
// Deserialize the bytes back to an object
User deserializedUser = bytes.FromMemoryPackBytes<User>();
You can easily create a deep clone of any [MemoryPackable] object.
// Clone the user object
[cite_start]User clonedUser = user.MemoryPackClone();
Save a collection to a file and load it back.
using OutWit.Common.MemoryPack.Ranges;
var ranges = new List<MemoryPackRange<int>>
{
new(1, 10),
new(20, 30)
};
// Export the list to a file
await ranges.ExportAsMemoryPackAsync("ranges.bin");
// Load the list from the file
IReadOnlyList<MemoryPackRange<int>> loadedRanges = await MemoryPackUtils.LoadAsMemoryPackAsync<MemoryPackRange<int>>("ranges.bin");
You can register your own custom MemoryPackFormatter during application startup.
// Your custom formatter
public class MyCustomTypeFormatter : MemoryPackFormatter<MyCustomType>
{
// ... implementation
}
// Register it
MemoryPackUtils.Register(options =>
{
options.Register(new MyCustomTypeFormatter());
});
Licensed under the Apache License, Version 2.0. See LICENSE.
If you use OutWit.Common.MemoryPack in a product, a mention is appreciated (but not required), for example: "Powered by OutWit.Common.MemoryPack (https://ratner.io/)"_.
"OutWit" and the OutWit logo are used to identify the official project by Dmitry Ratner.
You may:
You may not:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on OutWit.Common.MemoryPack:
| Package | Downloads |
|---|---|
|
OutWit.Communication
The core communication library of the WitRPC framework, providing base RPC functionality such as messaging, dynamic proxy support, and extensibility for multiple transports, serialization formats, and encryption. |
|
|
OutWit.Engine.Data
Data models, base classes, and utilities for OmnibusCloud controllers and activities. Includes activity adapters, variable implementations, serialization support, and processing status types. |
|
|
OutWit.Common.Settings
A powerful, type-safe settings management library for .NET. Features AOP-powered property interception, multi-scope storage (Default, User, Global), fluent builder API, and pluggable storage providers. |
|
|
OutWit.Controller.Render.Model
Shared render and scene data types used by the OutWit.Controller.Render controller — host-side in adapters, node-side in distributed batch processing. Adds scene-fidelity render options (RenderOptions.ColorMode, FilmTransparent, ColorDepth) appended for wire back-compat (Default reproduces legacy behaviour). |
|
|
OutWit.Identity.Contracts.Shared
Shared data contracts for WitIdentity — Result types, user profiles, and base channel interfaces for building applications compatible with WitIdentity. |
This package is not used by any popular GitHub repositories.