Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. class CiscoSwitch
  2. {
  3. Dictionary<int, CiscoVSAN> VSANList = new Dictionary<int, CiscoVSAN>();
  4. public void ParseFCIE(string block)
  5. {}
  6. }
  7.  
  8. class CiscoVSAN
  9. {
  10. Dictionary<string, CiscoSwitch> MemberSwitches = new Dictionary<string, CiscoSwitch> ();
  11. }
  12.  
  13. ParseFCIE(string block)
  14. {
  15. string DID = string.Empty;
  16. //partial implementation
  17. // 'this' is a CiscoSwitch object
  18. //this works
  19. var vsans= this.VSANList.SelectMany(v => v.Value.MemberSwitches.
  20. Where(d => d.Value.switchName == this.switchName));
  21. // assume DID now has a value;
  22. // this line the compiler says the type arguments cannot be inferred from usage
  23. if (this.VSANList.SelectMany(v => v.Value.MemberSwitches.ContainsKey(DID)))
  24. {}
  25. }
  26.  
  27. if (this.VSANList.SelectMany(v => v.Value.MemberSwitches).Any(x => x.ContainsKey(DID))) {
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement