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
| namespace Generics | |
| { | |
| internal class Program | |
| { | |
| private static void Main(string[] args) | |
| { | |
| IList<IThing> list = new List<IThing>(); | |
| list.Add(new A()); | |
| list.Add(new B()); |
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
| { | |
| "version": "1.0.0", | |
| "name": "ASP.NET", | |
| "private": true, | |
| "devDependencies": { | |
| "grunt": "0.4.5", | |
| "grunt-contrib-uglify": "0.9.1", | |
| "grunt-contrib-watch": "0.6.1", | |
| "grunt-contrib-clean": "0.6.0", | |
| "grunt-contrib-concat" : "0.5.1", |
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
| /// <binding ProjectOpened='watch' /> | |
| module.exports = function (grunt) { | |
| grunt.initConfig({ | |
| clean: ["wwwroot/lib/*", "temp/"], | |
| concat: { | |
| all: { | |
| src: ['Scripts/**'], | |
| dest: 'temp/combined.js' | |
| } |
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
| FROM centos:centos6 | |
| RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
| RUN yum update -y | |
| RUN yum install -y npm | |
| RUN yum install -y git | |
| RUN git clone https://github.com/dimitar/HelloWorld.git /home/HelloWorld | |
| RUN cd /home/HelloWorld; npm install | |
| CMD ["node", "/home/HelloWorld/index.js"] |
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
| select 1 from <table_name> with (UPDLOCK) where <some_key> = <some_value> |
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
| if (Database.CurrentTransaction == null) | |
| { | |
| throw new InvalidOperationException("Cannot acquire lock outside a transaction."); | |
| } |
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
| public async Task GetLockedEntity(Expression<Func<TEntity, object>> property, long key) where TEntity : class | |
| { | |
| if (Database.CurrentTransaction == null) | |
| { | |
| throw new InvalidOperationException("Cannot acquire lock outside a transaction."); | |
| } | |
| var expression = property.Body as UnaryExpression; | |
| var memberExpression = expression.Operand as MemberExpression; | |