Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CiscoSwitch
- {
- Dictionary<int, CiscoVSAN> VSANList = new Dictionary<int, CiscoVSAN>();
- public void ParseFCIE(string block)
- {}
- }
- class CiscoVSAN
- {
- Dictionary<string, CiscoSwitch> MemberSwitches = new Dictionary<string, CiscoSwitch> ();
- }
- ParseFCIE(string block)
- {
- string DID = string.Empty;
- //partial implementation
- // 'this' is a CiscoSwitch object
- //this works
- var vsans= this.VSANList.SelectMany(v => v.Value.MemberSwitches.
- Where(d => d.Value.switchName == this.switchName));
- // assume DID now has a value;
- // this line the compiler says the type arguments cannot be inferred from usage
- if (this.VSANList.SelectMany(v => v.Value.MemberSwitches.ContainsKey(DID)))
- {}
- }
- if (this.VSANList.SelectMany(v => v.Value.MemberSwitches).Any(x => x.ContainsKey(DID))) {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement