Created
April 18, 2013 10:32
-
-
Save DavidSSL/5411759 to your computer and use it in GitHub Desktop.
Illustatres how SemanticComparison helps with keeping code clean
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 interface IResult | |
{ | |
void Execute(); | |
} | |
public class ErrorResult : IResult | |
{ | |
public void Execute() | |
{ | |
// Does something | |
} | |
} | |
public class CreateReportResult : IResult | |
{ | |
private readonly string _filePath; | |
private readonly string _patientId; | |
private readonly string _dataSource; | |
public CreateReportResult(string filePath, string patientId, string dataSource) | |
{ | |
_filePath = filePath; | |
_patientId = patientId; | |
_dataSource = dataSource; | |
} | |
public string FilePath | |
{ | |
get { return _filePath; } | |
} | |
public string PatientId | |
{ | |
get { return _patientId; } | |
} | |
public string DataSource | |
{ | |
get { return _dataSource; } | |
} | |
public void Execute() | |
{ | |
// Do something | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment