{"id":19310533,"url":"https://github.com/sepppenner/protobufnetprimitives","last_synced_at":"2025-08-17T03:34:14.907Z","repository":{"id":82869398,"uuid":"461966827","full_name":"SeppPenner/ProtobufNetPrimitives","owner":"SeppPenner","description":"ProtobufNetPrimitives is a library to transfer basic data types with protobuf-net.Grpc.","archived":false,"fork":false,"pushed_at":"2025-01-05T21:55:03.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-22T05:59:51.825Z","etag":null,"topics":["basic","datatype","datatypes","primitives","protobuf","protobufnet"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SeppPenner.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-21T17:35:06.000Z","updated_at":"2025-01-05T21:55:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c5c1c2e-0392-4f3d-af70-4cd7092029a2","html_url":"https://github.com/SeppPenner/ProtobufNetPrimitives","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/SeppPenner/ProtobufNetPrimitives","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeppPenner%2FProtobufNetPrimitives","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeppPenner%2FProtobufNetPrimitives/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeppPenner%2FProtobufNetPrimitives/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeppPenner%2FProtobufNetPrimitives/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SeppPenner","download_url":"https://codeload.github.com/SeppPenner/ProtobufNetPrimitives/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeppPenner%2FProtobufNetPrimitives/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270803296,"owners_count":24648684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["basic","datatype","datatypes","primitives","protobuf","protobufnet"],"created_at":"2024-11-10T00:24:39.870Z","updated_at":"2025-08-17T03:34:14.882Z","avatar_url":"https://github.com/SeppPenner.png","language":"C#","funding_links":["https://patreon.com/SeppPennerOpenSourceDevelopment","https://paypal.me/th070795"],"categories":[],"sub_categories":[],"readme":"ProtobufNetPrimitives\n====================================\n\nProtobufNetPrimitives is a library to transfer basic data types with [protobuf-net.Grpc](https://github.com/protobuf-net/protobuf-net.Grpc).\n\n[![Build status](https://ci.appveyor.com/api/projects/status/q89qcgvtb45fcri0?svg=true)](https://ci.appveyor.com/project/SeppPenner/protobufnetprimitives)\n[![GitHub issues](https://img.shields.io/github/issues/SeppPenner/ProtobufNetPrimitives.svg)](https://github.com/SeppPenner/ProtobufNetPrimitives/issues)\n[![GitHub forks](https://img.shields.io/github/forks/SeppPenner/ProtobufNetPrimitives.svg)](https://github.com/SeppPenner/ProtobufNetPrimitives/network)\n[![GitHub stars](https://img.shields.io/github/stars/SeppPenner/ProtobufNetPrimitives.svg)](https://github.com/SeppPenner/ProtobufNetPrimitives/stargazers)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://raw.githubusercontent.com/SeppPenner/ProtobufNetPrimitives/master/License.txt)\n[![Nuget](https://img.shields.io/badge/ProtobufNetPrimitives-Nuget-brightgreen.svg)](https://www.nuget.org/packages/HaemmerElectronics.SeppPenner.ProtobufNetPrimitives/)\n[![NuGet Downloads](https://img.shields.io/nuget/dt/HaemmerElectronics.SeppPenner.ProtobufNetPrimitives.svg)](https://www.nuget.org/packages/HaemmerElectronics.SeppPenner.ProtobufNetPrimitives/)\n[![Known Vulnerabilities](https://snyk.io/test/github/SeppPenner/ProtobufNetPrimitives/badge.svg)](https://snyk.io/test/github/SeppPenner/ProtobufNetPrimitives)\n[![Gitter](https://img.shields.io/matrix/ProtobufNetPrimitives_community%3Agitter.im?server_fqdn=matrix.org)](https://matrix.to/#/#ProtobufNetPrimitives_community:gitter.im)\n[![Blogger](https://img.shields.io/badge/Follow_me_on-blogger-orange)](https://franzhuber23.blogspot.de/)\n[![Patreon](https://img.shields.io/badge/Patreon-F96854?logo=patreon\u0026logoColor=white)](https://patreon.com/SeppPennerOpenSourceDevelopment)\n[![PayPal](https://img.shields.io/badge/PayPal-00457C?logo=paypal\u0026logoColor=white)](https://paypal.me/th070795)\n\n## Available for\n* Net 8.0\n* Net 9.0\n\n## Net Core and Net Framework latest and LTS versions\n* https://dotnet.microsoft.com/download/dotnet\n\n## Available data types\n\n|Net type|GRPC type|Remark|\n|-|-|-|\n|`bool`|`DtoBool`|-|\n|`byte`|`DtoByte`|-|\n|`char`|`DtoChar`|-|\n|`DateTime`|`DtoDateTime`|The value is internally stored as long, use the property `DateTime` to get the correct value.|\n|`DateTimeOffset`|`DtoDateTimeOffset`|The value is internally stored as long, use the property `DateTimeOffset` to get the correct value.|\n|`decimal`|`DtoDecimal`|-|\n|`double`|`DtoDouble`|-|\n|`float`|`DtoFloat`|-|\n|`Guid`|`DtoGuid`|The value is internally stored as string, use the property `Uuid` to get the correct value.|\n|`int`|`DtoInt`|-|\n|`long`|`DtoLong`|-|\n|`nint`|`DtoNint`|-|\n|`nuint`|`DtoNuint`|-|\n|`sbyte`|`DtoSbyte`|-|\n|`short`|`DtoShort`|-|\n|`string`|`DtoString`|-|\n|`TimeSpan`|`DtoTimeSpan`|The value is internally stored as long, use the property `TimeSpan` to get the correct value.|\n|`uint`|`DtoUint`|-|\n|`ulong`|`DtoUlong`|-|\n|`ushort`|`DtoUshort`|-|\n\nNon-Nullable and Nullable types are supported (Different sub-namespaces).\n\n# Why you can't use generics here\n\n```csharp\n/// \u003csummary\u003e\n/// The base DTO class.\n/// \u003c/summary\u003e\n[ProtoContract]\n[ProtoInclude(1, typeof(DtoBool))]\npublic class DtoBase\u003cT\u003e where T : new()\n{\n    /// \u003csummary\u003e\n    /// Initializes a new instance of the \u003csee cref=\"DtoBase{T}\"/\u003e class.\n    /// \u003c/summary\u003e\n    public DtoBase()\n    {\n    }\n\n    /// \u003csummary\u003e\n    /// Initializes a new instance of the \u003csee cref=\"DtoBase{T}\"/\u003e class.\n    /// \u003c/summary\u003e\n    /// \u003cparam name=\"value\"\u003eThe value.\u003c/param\u003e\n    public DtoBase(T value)\n    {\n        this.Data = value;\n    }\n\n    /// \u003csummary\u003e\n    /// Gets or sets the data.\n    /// \u003c/summary\u003e\n    [ProtoMember(2)]\n    public T Data { get; set; } = new();\n}\n\n/// \u003csummary\u003e\n/// The DTO class to transfer bool data.\n/// \u003c/summary\u003e\n[ProtoContract]\npublic class DtoBool : DtoBase\u003cbool\u003e\n{\n    /// \u003csummary\u003e\n    /// Initializes a new instance of the \u003csee cref=\"DtoBool\"/\u003e class.\n    /// \u003c/summary\u003e\n    public DtoBool()\n    {\n    }\n\n    /// \u003csummary\u003e\n    /// Initializes a new instance of the \u003csee cref=\"DtoBool\"/\u003e class.\n    /// \u003c/summary\u003e\n    /// \u003cparam name=\"value\"\u003eThe value.\u003c/param\u003e\n    public DtoBool(bool value)\n    {\n        this.Data = value;\n    }\n}\n```\n\nthrows the error subscribed under https://github.com/protobuf-net/protobuf-net/issues/829 (Not resolved yet).\n\n## Install\n\n```bash\ndotnet add package HaemmerElectronics.SeppPenner.ProtobufNetPrimitives\n```\n\nChange history\n--------------\n\nSee the [Changelog](https://github.com/SeppPenner/ProtobufNetPrimitives/blob/master/Changelog.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsepppenner%2Fprotobufnetprimitives","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsepppenner%2Fprotobufnetprimitives","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsepppenner%2Fprotobufnetprimitives/lists"}