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
// this is mockable in your unit tests so you can just assign the func over it | |
public static Func<HttpContextBase> Context = () => new HttpContextWrapper(HttpContext.Current); | |
public void SomeMethod(){ | |
var context = Context(); | |
if (context == null) return; | |
// use context here like you would HttpContext.Current | |
} |
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
>>>>>> OS Version | |
SystemDirectory : C:\Windows\system32 | |
Organization : | |
BuildNumber : 14393 | |
RegisteredUser : Windows User | |
SerialNumber : 00376-30818-63755-AA823 | |
Version : 10.0.14393 |
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
namespace Tooling.WebApi.Common.Utility | |
{ | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Http; |
OlderNewer