SkillAgentSearch skills...

BinaryFormatter

No description available

Install / Use

/learn @lukasz-pyrzyk/BinaryFormatter
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

BinaryFormatter NuGet version

BinaryFormatter is a byte serialized/deserializer for .NET Core, created for Distributed Cache Platform - Kronos. After few days of development, Protobuf-Net (contract base serializer, fork of Google Protobuf) has announcement support for .NET Core.

Build status

| Windows | Linux | |:-------:|:------:| | Build status | Build Status |

Supported types

  • char
  • (s)byte
  • (u)short
  • (u)int
  • (u)long
  • float
  • double
  • bool
  • decimal
  • DateTime
  • TimeSpan
  • byte[]
  • classes
  • collections
    • IEnumarable
    • IDictionary
    • LinkedList
  • structures
  • guid
  • uri
  • enum
  • KeyValuePair
  • BigInteger

Not supported types

  • anonymous types
  • HashSet
  • Array[,], Array[,,], Array[,,,] types
  • DateTimeOffset
  • Nullable

Installation

$ Install-Package BinaryFormatter

Serialization

var converter = new BinaryConverter();
byte[] byteArray = converter.Serialize(model);

Deserialization

var converter = new BinaryConverter();
ViewModel obj = converter.Deserialize<ViewModel>(byteArray);

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so we don't break it in a future version unintentionally.
  • Send a pull request. Bonus points for topic branches.

License

MIT

View on GitHub
GitHub Stars12
CategoryDevelopment
Updated1y ago
Forks6

Languages

C#

Security Score

60/100

Audited on Apr 18, 2024

No findings