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 ExamplesUsage | |
{ | |
private Int32 _initial; | |
private Int32 _eat; | |
[Given("Given there are <initial> cucumbers")] | |
private void Given(Int32 initial) | |
{ | |
_initial = initial; | |
} |
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
// Requires Newtonsoft.Json to create JSON String | |
public static String ToJson(this SqlDataReader rdr) | |
{ | |
StringBuilder sb = new StringBuilder(); | |
StringWriter sw = new StringWriter(sb); | |
using (JsonWriter jsonWriter = new JsonTextWriter(sw)) | |
{ | |
jsonWriter.WriteStartArray(); |
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; | |
using MediatR; | |
namespace MediatR_101 | |
{ | |
// The Query GetWeather that we will use to get weather status of any city | |
public class GetWeather : IRequest<Weather> | |
{ | |
public GetWeather(String city) | |
{ |
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; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net.NetworkInformation; | |
using System.Text; | |
using System.Threading.Tasks; | |
using MediatR; | |
using StructureMap; |