Skip to content

Instantly share code, notes, and snippets.

Jimmy Chandra jchandra74

  • Sydney, NSW, Australia
Block or report user

Report or block jchandra74

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ObjectSerializer.cs
namespace __NAMESPACE__
{
using System;
using System.IO;
using System.Xml;
using System.Text;
using System.Runtime.Serialization.Formatters.Binary;
using Newtonsoft.Json;
using JsonSerializer = ServiceStack.Text.JsonSerializer;
using XmlSerializer = System.Xml.Serialization.XmlSerializer;
View StreamExtension.cs
namespace __NAMESPACE__
{
using System.IO;
public static class StreamExtension
{
public static byte[] ToByteArray(this Stream input)
{
using (var memStream = new MemoryStream())
{
View GenericCollectionExtensions.cs
namespace __NAMESPACE__
{
using System.Linq;
using System.Collections.Generic;
/// <summary>
/// Check if expected list items are all in master list
/// </summary>
/// <typeparam name="T">Generic Type</typeparam>
@jchandra74
jchandra74 / ObjectCopier.cs
Created Apr 13, 2015
Object Deep Copy via Serialization
View ObjectCopier.cs
namespace __NAMESPACE__
{
using System;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
public static class ObjectCopier
{
/// <summary>
@jchandra74
jchandra74 / fingerprint.cs
Last active Aug 29, 2015
asp.net good config and practices
View fingerprint.cs
//Stolen from @mkristensen
//Use to bust static content like .js and .css when they changed.
using System.IO;
using System.Web;
using System.Web.Caching;
using System.Web.Hosting;
namespace CHANGE_YOUR_NAMESPACE_HERE
{
public class Fingerprint
You can’t perform that action at this time.