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 namespace System.Management.Automation | |
| using namespace System.Management.Automation.Language | |
| if ($host.Name -eq 'ConsoleHost') { | |
| Import-Module PSReadLine | |
| } | |
| <# | |
| Install Commands - Commented out for faster execution. | |
| If this is the first time you are running this - uncomment the below to automate installation |
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
| { | |
| "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
| "blocks": [ | |
| { | |
| "alignment": "left", | |
| "segments": [ | |
| { | |
| "background": "#ff479c", | |
| "foreground": "#ffffff", | |
| "leading_diamond": "\ue0b6", |
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 (angular) { | |
| angular.module('my') | |
| .factory('customHttpInterceptor', ['HTML', function (html) { | |
| return { | |
| request: function (config) { | |
| if (config.url.indexOf('views/') > 0) { | |
| if(config.url.indexOf('deployments-history/history.html') > 0){ | |
| console.log("called history"); | |
| } | |
| var key = config.url.replace("Scripts/dist/", "") |
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 () { | |
| return angular.module("my.constants").constant("HTML", { | |
| "views/modules/applications/applications.html": "views/modules/applications/applications.html", | |
| "views/modules/home/home.html": "views/modules/home/home.html" | |
| }); | |
| })(); |
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
| const gulp = require('gulp'); | |
| const rev = require('gulp-rev'); | |
| const b2v = require('buffer-to-vinyl'); | |
| const ngConfig = require('gulp-ng-config'); | |
| gulp.task("revision-html", function () { | |
| return gulp.src(["./Scripts/dist/**/*.html"]) | |
| .pipe(rev()) | |
| .pipe(gulp.dest("./Scripts/dist")) | |
| .pipe(rev.manifest("rev-manifest-html.json")) |
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 class ApiExceptionFilter : ExceptionFilterAttribute | |
| { | |
| private IGlobalStore _gStore { get; set; } | |
| public override void OnException(HttpActionExecutedContext actionExecutedContext) | |
| { | |
| var scope = actionExecutedContext.Request.GetDependencyScope(); | |
| var _gStoreFactory = scope.GetService(typeof(IGlobalStore)) as IGlobalStore; | |
| string correlationId = ""; | |
| //Good to check if _gStore is null to avoid null exception. |
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 builder = new ContainerBuilder(); | |
| var config = GlobalConfiguration.Configuration; | |
| //This provides HTTPContext | |
| builder.RegisterModule(new AutofacWebTypesModule()); | |
| //.. | |
| //Other registrations | |
| //.. | |
| builder.RegisterType&lt;GlobalStore&gt;() |
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 class GlobalStore : IGlobalStore | |
| { | |
| private string CorrelationId { get; set; } | |
| private string RequestId { get; set; } | |
| public GlobalStore() { } | |
| public GlobalStore(CorrelationContext correlation_context) | |
| { | |
| if (correlation_context != null) |
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 interface IGlobalStore | |
| { | |
| string GetCorrelationId(); | |
| string GetRequestId(); | |
| } |
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
| const gulp = require('gulp'); | |
| const rev = require('gulp-rev'); | |
| gulp.task("revision", function () { | |
| return gulp.src(["./Scripts/dist/**/*.js", "./Scripts/dist/**/*.css"]) | |
| .pipe(rev()) | |
| .pipe(gulp.dest("./Scripts/dist")) | |
| .pipe(rev.manifest()) | |
| .pipe(gulp.dest("./Scripts")); | |
| }); |
NewerOlder