Skip to content

Instantly share code, notes, and snippets.

using Newtonsoft.Json;
using System.IO;
namespace SweetShowRenamer.Lib.Service
{
public class FileStorageService<T>
{
/// <summary>
/// Gets the object serialized in a file on the machine
/// </summary>
class Program
{
static void Main(string[] args)
{
ILitmus litmus = new DirectxColorProvider();
// Get the Average Color of the Screen
LitmusColor color = litmus.GetAverageColor();
Console.WriteLine("Red:{0}\nGreen:{1}\nBlue:{2}\n", color.Red, color.Green, color.Blue);
@GrantByrne
GrantByrne / UserValidator.cs
Created April 24, 2014 06:02
Using Fluent Validation with WPF - Dead Simple
using System.Text.RegularExpressions;
using FluentValidation;
using WpfFluentValidationExample.ViewModels;
namespace WpfFluentValidationExample.Lib
{
public class UserValidator : AbstractValidator<UserViewModel>
{
public UserValidator()
{
@GrantByrne
GrantByrne / Program.cs
Created August 18, 2015 23:39
Otter2D Getting Started
using Otter;
namespace TumblrGame
{
class Program
{
static void Main(string[] args)
{
Game game = new Game("Tumblr Game", 1000, 750);
game.Start();