This file contains 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 StickyEnumerable<T> : IEnumerable<T>, IDisposable | |
{ | |
private IEnumerator<T> innerEnumerator; | |
public StickyEnumerable( IEnumerable<T> items ) | |
{ | |
innerEnumerator = items.GetEnumerator(); | |
} | |
public IEnumerator<T> GetEnumerator() |
This file contains 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.Threading; | |
/// <summary> | |
/// Simple ReaderWriterLockShim wrapper that exposes read and write | |
/// guards. | |
/// </summary> | |
public class GuardedReaderWriterLock | |
{ |
This file contains 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; | |
using System.Linq; | |
using System.Reflection; | |
namespace WayCoolThings | |
{ | |
public static class ObjectExtensions | |
{ |
This file contains 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
void Main() | |
{ | |
} | |
// Define other methods and classes here | |
public class SuperQueue<TElement> | |
{ | |
private Queue<TElement> _queue1 = new Queue<TElement>(); | |
private Queue<TElement> _queue2 = new Queue<TElement>(); |
This file contains 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
struct Bar | |
{ | |
public ushort One; | |
public ushort Two; | |
} | |
class Foo | |
{ | |
private Bar _thing; | |
This file contains 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.IO; | |
using System.Net; | |
using System.Reflection; | |
using JetBrains.Annotations; | |
namespace Foo.Utility.Process | |
{ | |
public static class ProcessHelpers | |
{ |
This file contains 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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#core_card { | |
position: absolute; | |
width: 300px; | |
height: 300px; |
This file contains 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.Threading; | |
namespace Models.Common.Internal | |
{ | |
public class ReadOnlyState | |
{ | |
public bool IsReadOnly { get; set; } | |
} | |
This file contains 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.Diagnostics; | |
using Apex.Utility.Internal; | |
namespace Utility | |
{ | |
/// <summary> | |
/// The SystemTime class provides a simple abstraction over DateTime.Now. | |
/// It uses a time provider to generate the current time. The default |
This file contains 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
private static string GetVersionFromAssembly(byte[] fileData, string fileName) | |
{ | |
var reflector = new Universe(); | |
AssemblyName name = null; | |
using (var fileStream = new MemoryStream(fileData)) | |
{ | |
var module = reflector.OpenRawModule(fileStream, fileName); | |
if (module == null) | |
{ |
OlderNewer