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.Concurrent; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Runtime.CompilerServices; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace ObjectAnnotation | |
| { |
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.IO; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Runtime.Serialization; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Web; | |
| using System.Web.Hosting; |
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.Xml; | |
| using System.Xml.Linq; | |
| using System.Xml.Serialization; | |
| public static class XNodeSerializationExtensions | |
| { | |
| static string GetXmlRootName(XNode xml) | |
| { |
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) |
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.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.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.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; | |
| 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.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 |