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 filename = @"<file path>"; | |
var bytes = File.ReadAllBytes(filename); | |
var newBytes = new List<byte>(); | |
for (var i = 0; i < bytes.Length; i++) | |
{ | |
if (bytes[i] == 0x0D && bytes[i+1] == 0x0A) | |
{ |
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
void Main() | |
{ | |
var thing = Substitute.For<IThing>(); | |
thing.Thing(new [] { 1 }); | |
thing.Received().Thing(new [] { 1 }); | |
} | |
public interface IThing |
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
Create an Azure Worker Role (SDK 2.4 was used) | |
Run update-package to update everything | |
Newtonsoft.json now version 6.0.4 and binding redirects reflect this | |
Run update-package windowsazure.storage -reinstall | |
Newtonsoft.json is reverted to 5.0.6. | |
Binding redirects not updated, still redirect to version 6.0.0.0 (assembly version in 6.0.4 package) | |
Also issue with Microsoft.Data.Edm, Microsoft.Data.OData and System.Spatial packages. | |
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 adds a new Arg.ShouldMatch<T> method that uses expected objects to verify the received argument matches the expected object. For example the code below gives an error message of "ReceivedCallsException: Expected to receive exactly 1 call matching: | |
Blah(For Thing.Stuff, expected "Whatever2" but found "Whatever". | |
For Thing.OtherStuff, expected "abcd2" but found "abcd". | |
) | |
Actually received no matching calls. | |
Received 1 non-matching call (non-matching arguments indicated with '*' characters): | |
Blah(*Thing*)" | |
void Main() | |
{ |
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 FooActionFilter : IActionFilter | |
{ | |
public void OnActionExecuting(ActionExecutingContext filterContext) | |
{ | |
var fooController = (IFoo) filterContext.Controller; | |
fooController.Context = new FooContext(); | |
} | |
public void OnActionExecuted(ActionExecutedContext filterContext) |