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

this() public method

public this ( Player key ) : CardAttribute
key Player
return CardAttribute
        public CardAttribute this[Player key]
        {
            get
            {
                if (key == null) return this;
                if (!key.AssociatedCardAttributes.ContainsKey(this))
                {
                    var attribute = new CardAttribute(this.Name);
                    attribute.internalKey = key;
                    key.AssociatedCardAttributes.Add(this, attribute);
                }
                return key.AssociatedCardAttributes[this];
            }
        }