Guest User

Untitled

a guest
Oct 22nd, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public class AClassWithOneMethod
  2. {
  3. public static int GetOrdering(string someName, SomeAttributeDefinition someAttributeDefinition)
  4. {
  5. if (SomeConstants.ACollection.Exists(x => x == someName))
  6. return 20;
  7. switch (someName)
  8. {
  9. case SomeConstants.AConstant:
  10. return 10;
  11. case SomeConstants.AnotherConstant:
  12. return 30;
  13. case SomeConstants.YetAnotherConstant:
  14. return 40;
  15. default:
  16. // SomeAttribute
  17. // 51,...,55 or -1 - won't be displayed
  18. return 50 + someAttributeDefinition?.Order ?? -1;
  19. }
  20. }
  21. }
Add Comment
Please, Sign In to add comment