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 http = Substitute.For<IHttp>(); | |
| http.GetResponse(Arg.Any<string>()).Returns(resourceString, resourceString2); | |
| http.GetResponse(Arg.Any<string>()).Returns(x => { throw new 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
| public MemoryMapPager(string fileName, FlushMode flushMode = FlushMode.Full) | |
| { | |
| _flushMode = flushMode; | |
| var fileInfo = new FileInfo(fileName); | |
| var fileLength = fileInfo.Length; | |
| var isFileEmpty = fileLength == 0 || fileInfo.Exists == false; | |
| _fileStream = fileInfo.Open(FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read); |
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 MeasuredInput | |
| { | |
| public string Identifier { get; set; } | |
| public int MeasuredValue { get; set; } | |
| public double Confidence { get; set; } | |
| } | |
| public class Measurement | |
| { | |
| public Measurement(string primaryId, string secondaryId, int value, double adjustedMeasurement) |
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 class Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| dynamic a = 1; | |
| MethodWithDynamic(a).Extension(); | |
| } | |
| public static int MethodWithDynamic(dynamic a) | |
| { |
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 Lib | |
| { | |
| public interface Counter { int Count(string s); } | |
| public abstract class AbstractClass : AbstractParent | |
| { | |
| public abstract int Foo(int x); | |
| public virtual int Foo(string s) { return Foo(Counter.Count(s)); } | |
| } |
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 Autofac; | |
| using Xunit; | |
| namespace ClassLibrary1 | |
| { | |
| public class Stackoverflow24762539 | |
| { | |
| [Fact] | |
| public void Repro() |
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.Diagnostics; | |
| using System.Linq; | |
| namespace PerformanceProblem | |
| { | |
| public class Program | |
| { | |
| public static 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| namespace PerformanceProblem | |
| { | |
| public class Program | |
| { | |
| public static 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
| Empty: 34 items | |
| Identity: 25 items | |
| Always true: 9 items |
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
| sxe ld:mscorlib | |
| g | |
| .loadby sos clr | |
| // .loadby sos mscorwks | |
| sxe ld:clrjit | |
| // sxe ld:mscorjit | |
| g | |
| !threads | |
| !dumpdomain | |
| !dumpdomain 000000a930db1d10 |
OlderNewer