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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Web.Hosting; | |
namespace Helpers.Web | |
{ | |
public class FileVirtualPathProvider : VirtualPathProvider | |
{ |
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 SuperFakeHttpContext : HttpContextBase | |
{ | |
public SuperFakeHttpContext(string relativeUrl) | |
{ | |
} | |
public override System.Web.Caching.Cache Cache | |
{ | |
get { return HttpRuntime.Cache; } | |
} |
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 SvgHandler : IHttpHandler | |
{ | |
public void ProcessRequest(HttpContext context) | |
{ | |
var fileName = Path.GetFileName(context.Request.AppRelativeCurrentExecutionFilePath) ?? string.Empty; | |
var svgIndex = fileName.LastIndexOf(".svg", StringComparison.InvariantCultureIgnoreCase); | |
var classIndex = fileName.IndexOf('.'); | |
string[] classNames = new string[0]; | |
string svgPath; |
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
angular.module("shared.ui").directive( | |
"svgHover", | |
[ | |
() => { | |
return { | |
restrict: "A", | |
link: (scope: ng.IScope, element: ng.IAugmentedJQuery) => { | |
function getSvg(svg: HTMLObjectElement): SVGElement { | |
var svgDocument: Document; | |
try { |
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
module app.controllers { | |
export class MyController extends BaseController { | |
public static $inject = [ | |
"$scope", | |
"MyService" | |
]; | |
public SomeData: app.models.DataClass[] = []; | |
// Scope members |
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
<div> | |
<input type="text" ng-model="ctrl.SomeProperty"><br> | |
<input type="text" ng-model="ctrl.SomeModel.SomeField" ng-show="ctrl.ShouldShow()"><br> | |
</div> | |
// Usage of the directive: | |
<my-directive model="Whatever"></my-directive> |
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
module shared { | |
"use strict"; | |
export interface IMapOptions { | |
Properties: { [key: string]: (x: any) => any }; | |
Ignore?: string[]; | |
PropertyNames?: { [key: string]: string }; | |
} | |
function includeProperty(mapOptions: IMapOptions, prop: string) { |
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
Some parameter | Other parameter | Last parameter | |
---|---|---|---|
CONST | 123456 | 12.45 |
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
open Fake.OpenCoverHelper | |
let buildDir = "./build/" | |
let coverageDir = buildDir + "coverage/" | |
let testsDir = buildDir + "tests/" | |
Target "RunNUnitTests" (fun _ -> | |
let assembliesToTest = (" ", (!! (buildDir + "/*.Tests.dll"))) |> System.String.Join | |
CreateDir coverageDir | |
CreateDir testsDir |
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
[Serializable] | |
public class XmlType<T> : MutableType | |
where T : class | |
{ | |
public XmlType() | |
: base(new XmlSqlType()) | |
{ | |
} |
OlderNewer