{"id":24557632,"url":"https://github.com/yortw/maybe.sharp","last_synced_at":"2026-05-18T22:04:01.436Z","repository":{"id":70831097,"uuid":"97416179","full_name":"Yortw/Maybe.Sharp","owner":"Yortw","description":"A generic 'option' type for .Net, explicitly representing a value that is either 'something' or 'nothing'.","archived":false,"fork":false,"pushed_at":"2017-10-12T04:10:08.000Z","size":1419,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T05:20:11.830Z","etag":null,"topics":["dotnet","maybe","net40","netstandard","option"],"latest_commit_sha":null,"homepage":"https://yortw.github.io/Maybe.Sharp/","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/Yortw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2017-07-16T22:59:27.000Z","updated_at":"2018-05-21T00:15:36.000Z","dependencies_parsed_at":"2023-06-09T00:45:10.384Z","dependency_job_id":null,"html_url":"https://github.com/Yortw/Maybe.Sharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yortw%2FMaybe.Sharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yortw%2FMaybe.Sharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yortw%2FMaybe.Sharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yortw%2FMaybe.Sharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yortw","download_url":"https://codeload.github.com/Yortw/Maybe.Sharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910766,"owners_count":20367546,"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","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":["dotnet","maybe","net40","netstandard","option"],"created_at":"2025-01-23T05:18:28.749Z","updated_at":"2026-05-18T22:03:56.382Z","avatar_url":"https://github.com/Yortw.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maybe.Sharp\nA generic 'option' type for .Net, explicitly representing a value that is either 'something' or 'nothing'.\n\n[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/Yortw/Maybe.Sharp/blob/master/LICENSE) [![Coverage Status](https://coveralls.io/repos/github/Yortw/Maybe.Sharp/badge.svg?branch=master)](https://coveralls.io/github/Yortw/Maybe.Sharp?branch=master) [![Build status](https://ci.appveyor.com/api/projects/status/yxjln5gns7qcbt9v?svg=true)](https://ci.appveyor.com/project/Yortw/maybe-sharp) [![NuGet Badge](https://buildstats.info/nuget/Maybe.Sharp)](https://www.nuget.org/packages/Maybe.Sharp/)\n\n```powershell\n    PM\u003e Install-Package Maybe.Sharp\n```\n\n# Why ?\nYes there are plenty of maybe/option types for .Net, but I couldn't find one that met all my requirements, hence Maybe.Sharp exists.\n\n# Features\nSee the [API Documentation](api/MaybeSharp.Maybe-1.html) for contents/help.\n\n* Struct/Value type \n    * Instances of Maybe\u003cT\u003e  cannot be null\n\n* (In)Equality \u0026 GetHashCode overrides/implementation\n* \\\u003e \\\u003c \u003e= \u003c= operators for Maybe\u003cT\u003e and T values.\n* Implements IComparable\u003cT\u003e, IComparable\u003cMaybe\u003cT\u003e\u003e, IComparable, IEquatable\u003cMaybe\u003cT\u003e\u003e, IEquatable\u003cT\u003e, IFormattable\n* Implict cast from T to Maybe\u003cT\u003e\n* Explicit cast from Maybe\u003cT\u003e to T (exception when 'nothing')\n* Bind method for piping Maybe\u003cT\u003e through functions\n* Chainable WhenSomething/WhenNothing for control flow\n* Static Nothing value for each Maybe\u003cT\u003e type.\n* Maybe\u003cT\u003e of other value types (not just reference types), i.e Maybe\u003cT\u003e of System.Guid is 'empty'/'nothing when the inner value is System.Guid.Empty. Same for DateTime when the value is DateTime.MinValue etc.\n* Cast/As methods for converting Maybe\u003cT\u003e to Maybe\u003cX\u003e\n* ToString override\n* TryGetValue extension for IDictionary\u003cK, V\u003e\n* Or method to Coalesce Maybe\u003cT\u003e\n* ValueOr method for retrieving wrapped value or default value when empty\n* ToNullable to convert Maybe\u003cT\u003e to a Nullable\u003cT\u003e equivalent\n* ToMaybe extension for Nullable\u003cT\u003e values.\n* LINQ support via where and select extensions\n* TryParse extensions for System.String\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyortw%2Fmaybe.sharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyortw%2Fmaybe.sharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyortw%2Fmaybe.sharp/lists"}