This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BinaryMediaTypeFormatter : MediaTypeFormatter | |
{ | |
private static Type _supportedType = typeof (byte[]); | |
private bool _isAsync = false; | |
public BinaryMediaTypeFormatter() : this(false) | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Diagnostics; | |
namespace System.Threading | |
{ | |
public static class ThreadNameTracingExtensions | |
{ | |
/// <summary> | |
/// if thread has a name, it leaves the name as it is. If it does not have a name, | |
/// it sets the thread's name to the module.method | |
/// It outputs as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"total":26,"movies":[{"id":"12897","title":"The Matrix","year":1999,"mpaa_rating":"R","runtime":136,"critics_consensus":"An ingenious combination of Hong Kong action, ground-breaking Hollywood FX, and an imaginative vision.","release_dates":{"theater":"1999-03-31","dvd":"1999-09-21"},"ratings":{"critics_rating":"Certified Fresh","critics_score":87,"audience_rating":"Upright","audience_score":81},"synopsis":"","posters":{"thumbnail":"http://content7.flixster.com/movie/16/90/52/1690525_mob.jpg","profile":"http://content7.flixster.com/movie/16/90/52/1690525_pro.jpg","detailed":"http://content7.flixster.com/movie/16/90/52/1690525_det.jpg","original":"http://content7.flixster.com/movie/16/90/52/1690525_ori.jpg"},"abridged_cast":[{"name":"Keanu Reeves","id":"162654049","characters":["Neo"]},{"name":"Laurence Fishburne","id":"162669090","characters":["Morpheus"]},{"name":"Carrie-Anne Moss","id":"162669130","characters":["Trinity"]},{"name":"Hugo Weaving","id":"162709905","characters":["Agent Smith"]},{"name":"Glori |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace System.Collections.Generics | |
{ | |
public static class IEnumerableExtensions | |
{ | |
public static IEnumerable<T> ForEachOne<T>(this IEnumerable<T> enumerable, Action<T> action) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
namespace System.Threading | |
{ | |
public class PollingWorker : IPollingWorker,IDisposable | |
{ | |
private class TickAction | |
{ | |
public string Name { get; set; } | |
public Action Work { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IHttpMessageSerializer | |
{ | |
void Serialize(HttpResponseMessage response, Stream stream); | |
void Serialize(HttpRequestMessage request, Stream stream); | |
HttpResponseMessage DeserializeToResponse(Stream stream); | |
HttpRequestMessage DeserializeToRequest(Stream stream); | |
} | |
public class MessageContentHttpMessageSerializer : IHttpMessageSerializer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using CacheCow.Client; | |
using CacheCow.Client.Headers; | |
namespace ConsoleApplication1 | |
{ | |
class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using CacheCow.Client; | |
using CacheCow.Client.Headers; | |
namespace ConsoleApplication1 | |
{ | |
class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Parses commandline parameters that are in format of | |
/// -name:value | |
/// /name=value | |
/// -name="value 1" | |
/// </summary> | |
public static class CommandLineParser | |
{ | |
private const string CommandLinePattern = | |
"\\s+[-/](?<name>\\w+)[=:](?:(?<value>[^\\s\\:\"]+)|(?:\"(?<value>.*)\"))"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<configSections> | |
<sectionGroup name="simpleData"> | |
<section name="simpleDataConfiguration" type="Simple.Data.SimpleDataConfigurationSection, Simple.Data"/> | |
</sectionGroup> | |
</configSections> | |
<simpleData> | |
<simpleDataConfiguration traceLevel="Error"/> | |
</simpleData> |
OlderNewer