Skip to content

Instantly share code, notes, and snippets.

@DavidSSL
Created April 18, 2013 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidSSL/5411759 to your computer and use it in GitHub Desktop.
Save DavidSSL/5411759 to your computer and use it in GitHub Desktop.
Illustatres how SemanticComparison helps with keeping code clean
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