Exemplo n.º 1
0
        public bool Equals(IReadableStringCollection other)
        {
            if (this.Count() != other.Count())
                return false;

            foreach (var kv in this)
            {
                var values1 = GetValues(kv.Key);
                var values2 = other.GetValues(kv.Key);

                var missing1 = values1.Except(values2).Any();
                var missing2 = values2.Except(values1).Any();

                if (missing1 || missing2)
                    return false;
            }

            return true;
        }
Exemplo n.º 2
0
        public bool Equals(IReadableStringCollection other)
        {
            if (this.Count() != other.Count())
            {
                return(false);
            }

            foreach (var kv in this)
            {
                var values1 = GetValues(kv.Key);
                var values2 = other.GetValues(kv.Key);

                var missing1 = values1.Except(values2).Any();
                var missing2 = values2.Except(values1).Any();

                if (missing1 || missing2)
                {
                    return(false);
                }
            }

            return(true);
        }
Exemplo n.º 3
0
 public Message(IReadableStringCollection parameters, bool strict)
 {
     Namespaces = new Dictionary<string, Property>(StringComparer.Ordinal);
     Properties = new Dictionary<string, Property>(parameters.Count(), StringComparer.Ordinal);
     Add(parameters, strict);
 }
Exemplo n.º 4
0
 public Message(IReadableStringCollection parameters, bool strict)
 {
     Namespaces = new Dictionary <string, Property>(StringComparer.Ordinal);
     Properties = new Dictionary <string, Property>(parameters.Count(), StringComparer.Ordinal);
     Add(parameters, strict);
 }