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 MefControllerFactory : IControllerFactory | |
{ | |
private readonly WebScopedContainerManager _containerManager; | |
public MefControllerFactory(WebScopedContainerManager containerManager) | |
{ | |
_containerManager = containerManager; | |
} | |
#region IControllerFactory Members |
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 interface IObjectContext : IDisposable | |
{ | |
ObjectContextOptions ContextOptions { get; } | |
TEntity CreateObject<TEntity>() where TEntity : class; | |
IObjectSet<TEntity> CreateObjectSet<TEntity>() where TEntity : class; | |
int SaveChanges(); | |
} |
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
@TextSearchField("test", "test", true) | |
@helper TextSearchField(string name, string label, bool autocomplete) | |
{ | |
<div class="searchCrit"> | |
<label for="@name">@label</label> | |
@if(autocomplete) { | |
<input type="text" name="@name" class="autocompleteField" /> | |
} |
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 System.Threading.Tasks; | |
using FluentCassandra; | |
using FluentCassandra.Types; | |
namespace CassandraTest1 | |
{ | |
class Program | |
{ |
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 readonly object GeneratorLock = new object(); | |
///<summary> | |
/// Create the next id (numeric) | |
///</summary> | |
private int NextAccountNumber() | |
{ | |
lock (GeneratorLock) | |
{ | |
using (new TransactionScope(TransactionScopeOption.Suppress)) |
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
############################################################################### | |
# global variables | |
############################################################################### | |
$profileDir = [System.IO.Path]::GetDirectoryName($profile) | |
############################################################################### | |
# Set up a simple prompt, adding the git prompt parts inside git repos | |
############################################################################### | |
function prompt { | |
$realLASTEXITCODE = $LASTEXITCODE |
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 static byte[] ZlibCompress(byte[] data) | |
{ | |
using (MemoryStream outStream = new MemoryStream()) | |
{ | |
// zlib header | |
outStream.WriteByte(0x58); | |
outStream.WriteByte(0x85); | |
// zlib body | |
using (var compressor = new DeflateStream(outStream, CompressionMode.Compress, true)) |
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.Linq; | |
namespace System.Numerics | |
{ | |
public struct BigDecimal : IConvertible, IFormattable, IComparable, IComparable<BigDecimal>, IEquatable<BigDecimal> | |
{ | |
public static readonly BigDecimal MinusOne = new BigDecimal(BigInteger.MinusOne, 0); | |
public static readonly BigDecimal Zero = new BigDecimal(BigInteger.Zero, 0); | |
public static readonly BigDecimal One = new BigDecimal(BigInteger.One, 0); |
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; | |
namespace FluentCassandra | |
{ | |
/// <summary> | |
/// Used for generating UUID based on RFC 4122. | |
/// </summary> | |
/// <seealso href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122 - A Universally Unique IDentifier (UUID) URN Namespace</seealso> | |
public static partial class GuidGenerator | |
{ |
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 System.Linq; | |
namespace System | |
{ | |
public class DateTimePrecise | |
{ | |
private static readonly DateTimePrecise Instance = new DateTimePrecise(10); |
OlderNewer