public static bool TryGetProtocol(string version, out IRxProtocol protocol) { if (protocols.Any(x => x.Metadata.Version == version)) { var p = protocols.SingleOrDefault(x => x.Metadata.Version == version); if (p != null) { protocol = p.Value; return true; } } protocol = null; return false; }
public static bool TryGetProtocol(string version, out IRxProtocol protocol) { if (protocols.Any(x => x.Metadata.Version == version)) { var p = protocols.SingleOrDefault(x => x.Metadata.Version == version); if (p != null) { protocol = p.Value; return(true); } } protocol = null; return(false); }