Skip to content
Easy cross-platform storage of settings as JSON in C#
C# Batchfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
RedCorners.Components.ObjectStorage
RedCorners.Demo.ObjectStorage
.gitattributes
.gitignore
LICENSE
LICENSE.txt
RedCorners.Components.ObjectStorage.nuspec
pack.cmd
readme.md
redcorners_components_objectstorage_logo_2.png

readme.md

RedCorners.Components.ObjectStorage enables easy cross-platform storage of settings as JSON in C#.

NuGet: https://www.nuget.org/packages/RedCorners.Components.ObjectStorage GitHub: https://github.com/saeedafshari/RedCorners.Components.ObjectStorage

Dependencies

RedCorners depends on Newtonsoft.Json for JSON serialization and deserialization.

Example

using System;
using System.Collections.Generic;
using RedCorners.Components;

class Program
{
	public class Settings
	{
		public int Count { get; set; }
	}

	static void Main(string[] args)
	{
		var settings = new ObjectStorage<Settings>();
		
		// First time it's 0, and every time you run the app it gets increased by 1.
		Console.WriteLine($"Default Count: {settings.Data.Count}");

		settings.Data.Count++;
		settings.Save();

		Console.WriteLine($"New Count: {settings.Data.Count}");
	}
}
You can’t perform that action at this time.