Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AClassWithOneMethod
- {
- public static int GetOrdering(string someName, SomeAttributeDefinition someAttributeDefinition)
- {
- if (SomeConstants.ACollection.Exists(x => x == someName))
- return 20;
- switch (someName)
- {
- case SomeConstants.AConstant:
- return 10;
- case SomeConstants.AnotherConstant:
- return 30;
- case SomeConstants.YetAnotherConstant:
- return 40;
- default:
- // SomeAttribute
- // 51,...,55 or -1 - won't be displayed
- return 50 + someAttributeDefinition?.Order ?? -1;
- }
- }
- }
Add Comment
Please, Sign In to add comment