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
class A | |
{ | |
private object _locker = new object(); | |
public event EventHandler Bang; | |
public void Foo() | |
{ | |
new Thread(() => | |
{ |
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
RunConfiguration cfg = RunnerConfigurator.New( | |
x => | |
{ | |
x.ConfigureService<SomeClass>(c => | |
{ | |
c.WhenStarted(s => s.BootHost()); | |
c.WhenStopped(s => s.ShutDownHost()); | |
c.WhenPaused(s => s.ShutDownHost()); | |
c.WhenContinued(s => s.BootHost()); | |
c.HowToBuildService( |
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
// Basic interfaces | |
/// <summary> | |
/// Wrapper of repository acces | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
public interface IDataRepository<T> where T : class | |
{ | |
/// <summary> |
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
/*db.Blogs | |
.Include("Posts") | |
.Include("Posts.Comments") | |
.Where(x => x.Id == 1) | |
.ToList();*/ | |
SELECT [Project2].[Id] AS [Id], |
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 class GenericHelpers | |
{ | |
public static HtmlTemplate HtmlTemplate(this HtmlHelper html, object htmlAttributes) | |
{ | |
return new HtmlTemplate(html, htmlAttributes); | |
} | |
} |
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
// Variable usage: (* marks globals, all other variables are used for various purposes by various parts of the code) | |
// a = calculator | |
// b* = random data | |
// c* = main canvas | |
// d* = main canvas style / main canvas context | |
// e = calculator | |
// f = | |
// g* = main canvas composite operations | |
// h* = 300 (height) | |
// i = counter |
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
/// <reference path="_references.js" /> | |
(function (window, undefined) { | |
// Define the "MyApp" namespace | |
var MyApp = window.MyApp = window.MyApp || {}; | |
// TodoItem class | |
var entityType = "TodoItem:#TodoApp.Models"; | |
MyApp.TodoItem = function(data) { | |
var self = this; |
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
protected static bool IsListSuitableForSimpleAdmin(IList<Record> records) | |
{ | |
bool returnValue = false; | |
if (records != null) | |
{ | |
int sundayCount = 0; | |
int mondayCount = 0; | |
int tuesdayCount = 0; | |
int wednesdayCount = 0; | |
int thursdayCount = 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
/// <summary> | |
/// Controls access to the cached values. | |
/// </summary> | |
private static ReaderWriterLockSlim mutex = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); | |
/// <summary> | |
/// Gets a values from the cache, adding it if required. | |
/// </summary> | |
/// <typeparam name="T">The type of the value.</typeparam> | |
/// <param name="cacheParameters">The name of the value used to identify it in the cache.</param> |
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 Fasterflect; | |
using RestSharp; | |
namespace xxx.xxx.Rest.Client | |
{ | |
public static partial class RestClientExtensions | |
{ | |
public static ClientResponse ExecuteItDynamic(this IRestClient client, IRestRequest request) |
OlderNewer