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
| // Copyright (c) .NET Foundation. All rights reserved. | |
| // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Collections.ObjectModel; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Runtime.ExceptionServices; | |
| using System.Threading; |
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.Threading.Tasks; | |
| namespace dotnet_test | |
| { | |
| public class UnitTest1 | |
| { | |
| // private string Skip = "Manual Only (only execute this tests if blabla exists"; | |
| private string Skip = null; | |
| [Fact(Skip = Skip)] |
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
| <rule name="Add trailing slash" stopProcessing="true"> | |
| <match url="(.*[^/])$" /> | |
| <conditions> | |
| <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
| <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | |
| <add input="{REQUEST_FILENAME}" pattern="(.*?)\.html$" negate="true" /> | |
| <add input="{REQUEST_FILENAME}" pattern="(.*?)\.aspx$" negate="true" /> | |
| </conditions> | |
| <action type="Redirect" redirectType="Permanent" url="{R:1}/" /> | |
| </rule> |
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
| export class AsyncBindingBehavior { | |
| bind(binding, source) { | |
| binding.originalupdateTarget = binding.updateTarget; | |
| binding.updateTarget = (a) => { | |
| if (typeof a.then === "function") { | |
| a.then(d => { binding.originalupdateTarget(d); }); | |
| } | |
| else | |
| binding.originalupdateTarget(a); |
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
| import { Repeat, RepeatStrategyLocator } from "aurelia-templating-resources"; | |
| export class PromiseRepeatStrategy { | |
| constructor(private repeatStrategyLocator: RepeatStrategyLocator) { } | |
| instanceChanged(repeat: Repeat, promise: any): void { | |
| promise.then((items) => { | |
| const strategy = this.repeatStrategyLocator.getStrategy(items); | |
| if (!strategy) { |
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
| (function () { | |
| var root = angular.element(document.getElementsByTagName('html')); var watchers = []; | |
| var f = function (element) { | |
| if (element.data().hasOwnProperty('$scope')) { | |
| angular.forEach(element.data().$scope.$$watchers, function (watcher) { watchers.push(watcher); }); | |
| } | |
| angular.forEach(element.children(), function (childElement) { f(angular.element(childElement)); }); | |
| }; | |
| f(root); | |
| console.log(watchers.length); |