Last active
November 4, 2020 14:44
-
-
Save mgjam/31da98780f8e2ccac2573fa207fcb7d2 to your computer and use it in GitHub Desktop.
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
class MyService | |
{ | |
/* ... dependencies ... */ | |
MyResult Process(MyParams params) | |
{ | |
if (!IsSerialCodeValid(params.SerialCode)) return MyResult.InvalidSerialCode; | |
var externalId = GetExternalId(params.SerialCode); | |
StoreData(params.SerialCode, externalId); | |
Report(params.SerialCode, externalId); | |
return MyResult.Success; | |
} | |
bool IsSerialCodeValid(string serialCode) { ... } | |
string GetExternalId(string serialCode) { ... } | |
void StoreData(string serialCode, string externalId); | |
void Report(string serialCode, string externalId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment