This file contains 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
class Program | |
{ | |
static void Main() | |
{ | |
Person.Eats(); | |
} | |
} | |
public class Person | |
{ |
This file contains 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
class Program | |
{ | |
// 1 Declaration of a delegate type | |
public delegate void PersonEatsDelegate(); | |
static void Main() | |
{ | |
// 3 Instantiation of a delegate (short form) | |
PersonEatsDelegate personEatsDelegate = Person.Eats; |
This file contains 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
.class private auto ansi sealed StartApp.PersonEatsDelegate | |
extends [mscorlib]System.MulticastDelegate | |
{ | |
// Methods | |
.method public hidebysig specialname rtspecialname | |
instance void .ctor ( | |
object 'object', | |
native int 'method' | |
) runtime managed | |
{ |
This file contains 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
Interface IMyInterface | |
{ | |
void SomeMethod(); | |
} |
This file contains 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
class Person | |
{ | |
public static void Eats() | |
{ | |
// Some implementation | |
} | |
public static void Says(string message) | |
{ | |
// Some implementation |
This file contains 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 ActionResult Send() | |
{ | |
_logger.Info("In Send method"); | |
... | |
} |
This file contains 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
private ILogger _logger = NullLogger.Instance; | |
public ILogger Logger | |
{ | |
get { return _logger; } | |
set { _logger = value; } | |
} |
This file contains 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
<?xml version="1.0" encoding="utf-8" ?> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<!-- | |
See http://nlog-project.org/wiki/Configuration_file | |
for information on customizing logging rules and outputs. | |
--> | |
<targets> | |
<!-- add your targets here --> |
This file contains 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
[Theory, AutoFixture] | |
public void ParseValidInputShouldReturnCorrectResult( | |
PatientReportParser sut) | |
{ | |
const string argsString = @"-o=C:\Temp\someFile -p=1 -d"; | |
var args = new string[0]; | |
IResult actualResult = null; | |
var expectedResult = | |
new Likeness<CreateReportResult, CreateReportResult>(new CreateReportResult(@"C:\Temp\someFile", "1", "database")); |
This file contains 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
[Theory, AutoFixture] | |
public void ParseValidInputShouldReturnCorrectResult( | |
PatientReportParser sut) | |
{ | |
const string argsString = @"-o=C:\Temp\someFile -p=1 -d"; | |
var args = new string[0]; | |
IResult actualResult = null; | |
"Given valid arguments" | |
.Given(() => args = argsString.Split(' ')); |
NewerOlder