Skip to content

Instantly share code, notes, and snippets.

View valm's full-sized avatar

Val Minaev valm

View GitHub Profile
@valm
valm / ICacheService
Created October 8, 2013 16:25
Caching
public interface ICacheService
{
T Get<T>(string cacheID, Func<T> getItemCallback) where T : class;
}
@valm
valm / WinForms
Created October 9, 2013 14:21
Logging
Action<string> log;
Action clearLog;
log = (x =>
{
x = DateTime.Now.ToString(@"hh\:mm\:ss") + " " + x;
txtLog.AppendText(String.IsNullOrWhiteSpace(txtLog.Text) == false ? Environment.NewLine + x : x);
});
clearLog = (() => txtLog.Text = String.Empty);
@valm
valm / TPL DataFlow and Reactive Extensions Examples
Created November 14, 2013 14:04
TPL DataFlow and Reactive Extensions Example
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Reactive.Linq;
using System.Text;
using System.Threading;