Skip to content

Instantly share code, notes, and snippets.

View blitzxion's full-sized avatar
⚔️
Persevering

Richard Shaw blitzxion

⚔️
Persevering
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
namespace LogFileParser.Helpers
{
public static class EntityPerformance
{
@blitzxion
blitzxion / DataTableModels.cs
Last active April 10, 2017 14:48
jQuery DataTable Filtering using Dynamic Linq
// Inherit the base DataTable filter request so we can have extra fields to use.
public class DataTableDateFilteredRequest : DataTableFilterRequest
{
public DateTime? fromDate { get; set; }
public DateTime? toDate { get; set; }
}
// The following are the base classes for sending/receiving jQuery DataTable responses.
// Written for LinqPad, sorry guys
async void Main()
{
var pm = new PollerManager();
// var task1 = pm.Create(() => { @"LOOP 1".Dump(); }, () => { @"DONE 1".Dump(); }, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(5));
// var task2 = pm.Create(() => { @"LOOP 2".Dump(); }, () => { @"DONE 2".Dump(); }, TimeSpan.FromSeconds(2), TimeSpan.FromSeconds(10));
for (int i = 0; i < 10; i++) {