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
/// Latest version is here: https://gist.github.com/pmunin/28d0ba1acce677736c5e | |
using System; | |
using System.Collections; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace DictionaryUtils |
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.Threading; | |
/// <summary> | |
/// Extensions that allow to deal with ReaderWriterLock easier | |
/// Latest version is here: https://gist.github.com/pmunin/446dbf323cc9a67e14a7 | |
/// | |
/// Depends on: | |
/// DisposableAction https://gist.github.com/pmunin/e09ba0eacbbc31e28d6e | |
/// </summary> |
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
// Analogy of KnockoutJs With directive http://knockoutjs.com/documentation/with-binding.html | |
// Implementation is based on that one: http://stackoverflow.com/questions/17300814/the-with-binding-of-knockoutjs-in-angularjs | |
myAngularApp | |
.directive('koWith', function () { | |
return { | |
restrict: 'A', | |
scope: true, | |
controller: function ($scope, $attrs, $parse) { | |
var ScopePropertyDesc = function (prop) { | |
var self = this; |
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.Concurrent; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
namespace ObjectDataUtils | |
{ | |
/// <summary> | |
/// Allows to extend any .NET objects with dynamic dictionary storage, | |
/// which will be collected by GC with the associated object |
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; | |
using System.Collections.Generic; | |
using System.Dynamic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
/// <summary> | |
/// IEnumerable extension that allows to aggregate multiple accumulators within single enumerator run |
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.Data; | |
using System.Data.Common; | |
using System.Data.Entity; | |
using System.Data.Entity.Core.Objects; | |
using System.Data.Entity.Infrastructure; | |
using System.Linq; | |
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; | |
using System.Text; | |
using System.Threading.Tasks; | |
/// <summary> | |
/// Extensions for LinkedList, allowing to enumerate nodes. | |
/// Latest version is here: https://gist.github.com/pmunin/d8cb8b39513b33e31cae | |
/// </summary> |
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 DisposeUtils | |
{ | |
/// <summary> | |
/// Util class for implementing disposable using delegates. | |
/// Latest version is here: https://gist.github.com/pmunin/e09ba0eacbbc31e28d6e | |
/// </summary> |
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.Threading; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Thread safe readWriteLocker by key | |
/// Latest version here: https://gist.github.com/pmunin/2e48f13dc8f6673752a2 | |
/// ReaderWriterLockByKey - allows to apply thread safety and read/write/upgrade locking by key to any dictionary-like object. | |
/// Internally it uses ConcurrentDictionary and ReaderWriterLock (not ReaderWriterLockerSlim yet). |
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.Configuration; | |
using System.Linq; | |
using System.Reflection; | |
namespace {MyProject}_Tests | |
{ | |
public abstract class ConfigFileContext : IDisposable | |
{ | |
public static ConfigFileContext Change(string path) |
OlderNewer