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 static class OracleManagedDataSourceExtensions | |
{ | |
public static string ToConnectionString(this OracleManagedDataSource source, string userName, string password) | |
{ | |
var connectionStringFormat = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL={0})(HOST={1})(PORT={2}))(CONNECT_DATA=(SERVICE_NAME={3})));User Id={4};Password={5};"; | |
return string.Format(connectionStringFormat, | |
source.Protocol, | |
source.ServerName, | |
source.Port, | |
source.ServiceName, |
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 Songhay.Extensions; | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
namespace Songhay.Extensions | |
{ | |
/// <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
public static class IDataReaderExtensions | |
{ | |
public static DateTime ToDateTime(this IDataReader reader, string key) | |
{ | |
var d = reader.ToNullableDateTime(key); | |
if (!d.HasValue) ThrowNullReferenceException(key); | |
return d.GetValueOrDefault(); | |
} | |
public static int ToInt(this IDataReader reader, string key) |
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
isIndexSubsetHeaderSelected: function (subset, isFirst) { | |
if (!this.routeIndexSet) { | |
return false; | |
} | |
if (!this.routeIndexSubset) { | |
return isFirst; | |
}; | |
return (this.routeIndexSubset === subset); | |
}, |
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
var doIndexController = function ($scope, paginationService) { | |
$scope.vm = { | |
filterExpression: null, | |
filterData: function () { | |
var filterExpression = $scope.vm.filterExpression; | |
if (!filterExpression) { return; } | |
var dataFiltered = _(this.data).filter(function (i) { | |
var title = i.Title; | |
var isContainedInTitle = (title && title.toLowerCase().indexOf(filterExpression) === -1) ? false : true; | |
return isContainedInTitle; |
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
/* Services */ | |
var doDataService = function ($http, $q) { | |
var dataCache = []; | |
return { | |
cacheData: function (id, data) { | |
dataCache.push({ | |
"id": id, | |
"data": data | |
}); | |
}, |
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
/*jslint node: true */ | |
/*global require, console */ | |
"use strict"; | |
var gulp = require("gulp"), | |
concat = require("gulp-concat"), | |
map = require("map-stream"), | |
vinyl_fs = require("vinyl-fs"), | |
sass = require("gulp-ruby-sass"), |
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 Newtonsoft.Json; | |
using System; | |
using System.Net.Http.Formatting; | |
using System.Net.Http.Headers; | |
namespace Songhay.Web.MediaTypeFormatters | |
{ | |
/// <summary> | |
/// Media-Type Formatter for client-side JSON | |
/// </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
/// <summary> | |
/// Test context extensions: should transform web configuration. | |
/// </summary> | |
/// <param name="context">The context.</param> | |
/// <param name="pathToWebConfigTransformRunnerExe">The path to web configuration transform runner executable.</param> | |
/// <param name="outputFile">The output file.</param> | |
/// <param name="transformFile">The transform file.</param> | |
/// <param name="webConfigFile">The web configuration file.</param> | |
/// <param name="workingDirectory">The working directory.</param> | |
/// <param name="xPaths">The x paths.</param> |
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
/// <summary> | |
/// Test context extensions: should test routes. | |
/// </summary> | |
/// <param name="context">The context.</param> | |
/// <param name="pathToJson">The path to json.</param> | |
public static void ShouldTestRoutes(this TestContext context, Type controllerType, string pathToJson) | |
{ | |
var routes = new RouteCollection(); | |
routes.MapAttributeRoutesInAssembly(controllerType); | |
Assert.IsTrue(routes.Any(), "The expected attribute routes are not here."); |