{"id":14968325,"url":"https://github.com/parse-community/parse-sdk-dotnet","last_synced_at":"2025-04-04T07:08:14.379Z","repository":{"id":45580710,"uuid":"42895198","full_name":"parse-community/Parse-SDK-dotNET","owner":"parse-community","description":"Parse SDK for .NET, Xamarin, Unity.","archived":false,"fork":false,"pushed_at":"2024-07-16T00:56:49.000Z","size":6922,"stargazers_count":323,"open_issues_count":19,"forks_count":261,"subscribers_count":64,"default_branch":"master","last_synced_at":"2024-10-30T03:22:27.480Z","etag":null,"topics":["dotnet","parse-platform","parse-server","sdk","unity","xamarin"],"latest_commit_sha":null,"homepage":"http://parseplatform.org","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parse-community.png","metadata":{"funding":{"github":"parse-community","patreon":null,"open_collective":"parse-server","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null},"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2015-09-21T21:41:25.000Z","updated_at":"2024-09-02T19:53:07.000Z","dependencies_parsed_at":"2024-11-06T08:38:33.544Z","dependency_job_id":null,"html_url":"https://github.com/parse-community/Parse-SDK-dotNET","commit_stats":{"total_commits":125,"total_committers":28,"mean_commits":4.464285714285714,"dds":0.632,"last_synced_commit":"10dac7aa25a9eb8fec37dc98b9aaaaa02e207410"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parse-community%2FParse-SDK-dotNET","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parse-community%2FParse-SDK-dotNET/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parse-community%2FParse-SDK-dotNET/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parse-community%2FParse-SDK-dotNET/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parse-community","download_url":"https://codeload.github.com/parse-community/Parse-SDK-dotNET/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135144,"owners_count":20889421,"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","parse-platform","parse-server","sdk","unity","xamarin"],"created_at":"2024-09-24T13:39:42.874Z","updated_at":"2025-04-04T07:08:14.355Z","avatar_url":"https://github.com/parse-community.png","language":"C#","readme":"![parse-repository-header-sdk-dotnet](https://github.com/user-attachments/assets/f4672e91-2b80-45a2-8619-7c9511e93d65)\n\n---\n\n[![Build Status](https://github.com/parse-community/Parse-SDK-dotNET/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/parse-community/Parse-SDK-dotNET/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Amaster)\n[![Coverage](https://img.shields.io/codecov/c/github/parse-community/Parse-SDK-dotNET/master.svg)](https://codecov.io/github/parse-community/Parse-SDK-dotNET?branch=master)\n[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/Parse-SDK-dotNET/releases)\n\n[![.NET Version](https://img.shields.io/badge/.NET-8,_9-5234CE.svg?logo=.net\u0026style=flat)](https://dotnet.microsoft.com)\n[![Nuget](https://img.shields.io/nuget/v/parse.svg)](http://nuget.org/packages/parse)\n\n[![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link]\n[![Sponsors on Open Collective](https://opencollective.com/parse-server/sponsors/badge.svg)][open-collective-link]\n[![Forum](https://img.shields.io/discourse/https/community.parseplatform.org/topics.svg)](https://community.parseplatform.org/c/parse-server)\n[![Twitter](https://img.shields.io/twitter/follow/ParsePlatform.svg?label=Follow\u0026style=social)](https://twitter.com/intent/follow?screen_name=ParsePlatform)\n[![Chat](https://img.shields.io/badge/Chat-Join!-%23fff?style=social\u0026logo=slack)](https://chat.parseplatform.org)\n\n---\n\nThis library gives you access to the powerful Parse Server backend from your .NET app. For more information on Parse Platform and its features, visit [parseplatform.org](https://parseplatform.org).\n\n---\n\n- [Compatibility](#compatibility)\n  - [.NET](#net)\n- [Using the Code](#using-the-code)\n  - [Common Definitions](#common-definitions)\n  - [Client-Side Use](#client-side-use)\n  - [Server-Side Use](#server-side-use)\n  - [Basic Demonstration](#basic-demonstration)\n- [Local Builds](#local-builds)\n- [.NET Core CLI](#net-core-cli)\n\n## Compatibility\n\n### .NET\n\nParse .NET SDK is continuously tested with the most recent releases of .NET to ensure compatibility. We follow the [.NET Long Term Support plan](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core) and only test against versions that are officially supported and have not reached their end-of-life date.\n\n| .NET Version | End-of-Life   | Parse .NET SDK Version |\n|--------------|---------------|------------------------|\n| Standard 2.0 | November 2024 | \u003e=1.0.0 \u003c4.0.0         |\n| 6.0          | November 2024 | \u003e=1.0.0 \u003c5.0.0         |\n| 7.0          | May 2024      | \u003e=1.0.0 \u003c5.0.0         |\n| 8.0          | November 2026 | \u003e=1.0.0                |\n| 9.0          | May 2026      | \u003e=1.0.0                |\n\n\u003e [!NOTE]  \n\u003e We have removed support for [NET Standard 2.0](https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/) with Parse .NET SDK 4.0. Xamarin developers should migrate to .NET MAUI to use the latest version of the Parse .NET SDK. Unity developers should use Parse .NET SDK \u003c4.0 until Unity supports .NET and then migrate to the latest version of the Parse .NET SDK.\n\n## Using the Code\nMake sure you are using the project's root namespace.\n\n```csharp\nusing Parse;\n```\n\nThe `ParseClient` class has three constructors, one allowing you to specify your Application ID, Server URI, and .NET Key as well as some configuration items, one for creating clones of `ParseClient.Instance` if `Publicize` was called on an instance previously, and another, accepting an `IServerConnectionData` implementation instance which exposes the data needed for the SDK to connect to a Parse Server instance, like the first constructor, but with a few extra options. You can create your own `IServerConnectionData` implementation or use the `ServerConnectionData` struct. `IServerConnectionData` allows you to expose a value the SDK should use as the master key, as well as some extra request headers if needed.\n\n```csharp\nParseClient client = new ParseClient(\"Your Application ID\", \"The Parse Server Instance Host URI\", \"Your .NET Key\");\n```\n\n```csharp\nParseClient client = new ParseClient(new ServerConnectionData\n{\n    ApplicationID = \"Your Application ID\",\n    ServerURI = \"The Parse Server Instance Host URI\",\n    Key = \"Your .NET Key\", // This is unnecessary if a value for MasterKey is specified.\n    MasterKey = \"Your Master Key\",\n    Headers = new Dictionary\u003cstring, string\u003e\n    {\n        [\"X-Extra-Header\"] = \"Some Value\"\n    }\n});\n```\n\n`ServerConnectionData` is available in the `Parse.Infrastructure` namespace.\n\nThe two non-cloning `ParseClient` constructors contain optional parameters for an `IServiceHub` implementation instance and an array of `IServiceHubMutator`s. These should only be used when the behavior of the SDK needs to be changed.\n\nTo find full usage instructions for the latest stable release, please visit the [Parse docs website][parse-docs-link]. Please note that the latest stable release is quite old and does not reflect the work being done at the moment.\n\n### Common Definitions\n\n- `Application ID`:\nYour app's `ApplicationId` field from your Parse Server.\n- `Key`:\nYour app's `.NET Key` field from your Parse Server.\n- `Master Key`:\nYour app's `Master Key` field from your Parse Server. Using this key with the SDK will allow it to bypass any CLPs and object permissions that are set. This also should be compatible with read-only master keys as well.\n- `Server URI`:\nThe full URL to your web-hosted Parse Server.\n\n### Client-Side Use\n\nIn your program's entry point, instantiate a `ParseClient` with all the parameters needed to connect to your target Parse Server instance, then call `Publicize` on it. This will light up the static `ParseClient.Instance` property with the newly-instantiated `ParseClient`, so you can perform operations with the SDK.\n\n```csharp\nnew ParseClient(/* Parameters */).Publicize();\n```\n\n### Server-Side Use\n\nThe SDK can be set up in a way such that every new `ParseClient` instance can authenticate a different user concurrently. This is enabled by an `IServiceHubMutator` implementation which adds itself as an `IServiceHubCloner` implementation to the service hub which, making it so that consecutive calls to the cloning `ParseClient` constructor (the one without parameters) will clone the publicized `ParseClient` instance, exposed by `ParseClient.Instance`, replacing the `IParseCurrentUserController` implementation instance with a fresh one with no caching every time. This allows you to configure the original instance, and have the clones retain the general behaviour, while also allowing the differnt users to be signed into the their respective clones and execute requests concurrently, without causing race conditions. To use this feature of the SDK, the first `ParseClient` instance must be constructued and publicized as follows once, before any other `ParseClient` instantiations. Any classes that need to be registered must be done so with the original instance.\n\n```csharp\nnew ParseClient(/* Parameters */, default, new ConcurrentUserServiceHubCloner { }).Publicize();\n```\n\nConsecutive instantiations can be done via the cloning constructor for simplicity's sake.\n\n```csharp\nParseClient client = new ParseClient { };\n```\n\n### Basic Demonstration\n\nThe following code shows how to use the Parse .NET SDK to create a new user, save and authenticate the user, deauthenticate the user, re-authenticate the user, create an object with permissions that allow only the user to modify it, save the object, update the object, delete the object, and deauthenticate the user once more.\n\n```csharp\n// Instantiate a ParseClient.\nParseClient client = new ParseClient(/* Parameters */);\n\n// Create a user, save it, and authenticate with it.\nawait client.SignUpAsync(username: \"Test\", password: \"Test\");\n\n// Get the authenticated user. This is can also be done with a variable that stores the ParseUser instance before the SignUp overload that accepts a ParseUser is called.\nConsole.WriteLine(client.GetCurrentUser().SessionToken);\n\n// Deauthenticate the user.\nawait client.LogOutAsync();\n\n// Authenticate the user.\nParseUser user = await client.LogInAsync(username: \"Test\", password: \"Test\");\n\n// Create a new object with permessions that allow only the user to modify it.\nParseObject testObject = new ParseObject(\"TestClass\") { ACL = new ParseACL(user) };\n\n// Bind the ParseObject to the target ParseClient instance. This is unnecessary if Publicize is called on the client.\ntestObject.Bind(client);\n\n// Set some value on the object.\ntestObject.Set(\"someValue\", \"This is a value.\");\n\n// See that the ObjectId of an unsaved object is null;\nConsole.WriteLine(testObject.ObjectId);\n\n// Save the object to the target Parse Server instance.\nawait testObject.SaveAsync();\n\n// See that the ObjectId of a saved object is non-null;\nConsole.WriteLine(testObject.ObjectId);\n\n// Query the object back down from the server to check that it was actually saved.\nConsole.WriteLine((await client.GetQuery(\"TestClass\").WhereEqualTo(\"objectId\", testObject.ObjectId).FirstAsync()).Get\u003cstring\u003e(\"someValue\"));\n\n// Mutate some value on the object.\ntestObject.Set(\"someValue\", \"This is another value.\");\n\n// Save the object again.\nawait testObject.SaveAsync();\n\n// Query the object again to see that the change was made.\nConsole.WriteLine((await client.GetQuery(\"TestClass\").WhereEqualTo(\"objectId\", testObject.ObjectId).FirstAsync()).Get\u003cstring\u003e(\"someValue\"));\n\n// Store the object's objectId so it can be verified that it was deleted later.\nvar testObjectId = testObject.ObjectId;\n\n// Delete the object.\nawait testObject.DeleteAsync();\n\n// Check that the object was deleted from the server.\nConsole.WriteLine(await client.GetQuery(\"TestClass\").WhereEqualTo(\"objectId\", testObjectId).FirstOrDefaultAsync() == null);\n\n// Deauthenticate the user again.\nawait client.LogOutAsync();\n```\n\n## Local Builds\nYou can build the SDK on any system with the MSBuild or .NET Core CLI installed. Results can be found under either the `Release/netstandard2.0` or `Debug/netstandard2.0` in the `bin` folder unless a non-standard build configuration is used.\n\n## .NET Core CLI\n\n```batch\ndotnet build Parse.sln\n```\n\n[open-collective-link]: https://opencollective.com/parse-server\n","funding_links":["https://github.com/sponsors/parse-community","https://opencollective.com/parse-server"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparse-community%2Fparse-sdk-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparse-community%2Fparse-sdk-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparse-community%2Fparse-sdk-dotnet/lists"}