Sanguosha.Core.Cards.ReadOnlyCard.this C# (CSharp) Method

this() public method

public this ( CardAttribute key ) : int
key CardAttribute
return int
        public int this[CardAttribute key]
        {
            get
            {
                if (!attributes.ContainsKey(key))
                {
                    return 0;
                }
                else
                {
                    return attributes[key];
                }
            }
            set
            {
                if (!attributes.ContainsKey(key))
                {
                    attributes.Add(key, value);
                }
                else if (attributes[key] == value)
                {
                    return;
                }
                attributes[key] = value;
            }
        }