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
| 'use strict'; | |
| import { Memento } from "vscode"; | |
| export class LocalStorageService { | |
| constructor(private storage: Memento) { } | |
| public getValue<T>(key : string) : T{ | |
| return this.storage.get<T>(key, 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 static T GetQueryString<T>(string key, T defaultValue) where T : IConvertible | |
| { | |
| T result = defaultValue; | |
| if (!String.IsNullOrEmpty(HttpContext.Current.Request.QueryString[key])) | |
| { | |
| string value = HttpContext.Current.Request.QueryString[key]; | |
| try | |
| { |
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 AjaxOnlyAttribute : ActionMethodSelectorAttribute | |
| { | |
| public override Boolean IsValidForRequest(ControllerContext controllerContext, MethodInfo methodInfo) | |
| { | |
| return controllerContext.HttpContext.Request.IsAjaxRequest(); | |
| } | |
| } |