Example #1
0
        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;
        }
Example #2
0
        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);
        }