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
{ | |
"compilerOptions": { | |
"declaration": false, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"module": "none", | |
"moduleResolution": "node", | |
"sourceMap": true, | |
"target": "es5", | |
"inlineSources": 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
import { Inject, Service } from "core/decorators"; | |
@Service("loadingService") | |
export class LoadingService { | |
private _modal: ng.ui.bootstrap.IModalServiceInstance; | |
constructor( | |
@Inject("$uibModal") private _modalService: ng.ui.bootstrap.IModalService | |
) { | |
} |
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
import { Person } from "./person"; | |
import "test"; | |
const person = new Person("Kerry", "Ritter"); | |
alert(person.fullName); |
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 OmgDapperRules | |
{ | |
public List<ProjectVersionField> GetAllForVersion(int projectVersionId) | |
{ | |
using (var connection = _connectionFactory.Create()) | |
{ | |
var fields = connection.Query<ProjectVersionField, ProjectTemplateField, ProjectTemplateFieldType, ProjectVersionField>(@" | |
SELECT pvf.*, ptf.*, ptft.* | |
FROM [dbo].[ProjectVersionField] pvf | |
INNER JOIN [dbo].[ProjectTemplateField] ptf ON ptf.Id = pvf.ProjectTemplateFieldId |
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 CigarSerializer : Serializer<Cigar, CigarDto> | |
{ | |
public Cigar Serialize(CigarDto request) | |
{ | |
return new Cigar | |
{ | |
Name = request.Name, | |
Brand = request.Brand | |
}; | |
} |
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 (var connection = new SqlConnection(_config["Connection"])) | |
{ | |
string query = @"SELECT * | |
FROM [Template] | |
WHERE [Type] = @type; | |
SELECT tct.TemplateId as TemplateId, tc.Name as CategoryName | |
FROM [TemplateCategory_Template] tct | |
JOIN [TemplateCategory] tc ON tct.TemplateCategoryId = tc.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
using System.Data.SqlClient; | |
using System.Configuration; | |
namespace DapperTest | |
{ | |
public static class ContextFactory | |
{ | |
public static SqlConnection Create() => new SqlConnection(ConfigurationManager.ConnectionStrings["MyCxn"].ConnectionString); | |
} | |
} |
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> | |
/// Class for building CSV outputs | |
/// </summary> | |
/// <seealso cref="System.IDisposable" /> | |
public class CsvBuilder : IDisposable | |
{ | |
private readonly StringBuilder _stringBuilder; | |
private readonly string _delimiter; |
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
Show hidden characters
{ | |
"rules": { | |
"class-name": true, | |
"comment-format": [ | |
true, | |
"check-space" | |
], | |
"curly": true, | |
"indent": [ | |
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
/// <binding ProjectOpened='watch' /> | |
/// <reference path="node_modules/systemjs/dist/system.js" /> | |
/// <binding ProjectOpened='default' /> | |
var gulp = require("gulp"); | |
var less = require("gulp-less"); | |
var ts = require("gulp-typescript"); | |
var minifyCss = require("gulp-minify-css"); | |
var concatCss = require("gulp-concat-css"); | |
var concat = require("gulp-concat"); |