public int this[Tag tag] { get { if (tag == null) return 0; return _tagCount.ContainsKey(tag) ? _tagCount[tag] : 0; } }
public void SetTagCountValue(Tag tag, int count) { if (_tagCount.ContainsKey(tag)) { _tagCount.Remove(tag); } _tagCount[tag] = count; }
public static Client.Tag Convert(Model.Tag modelTag) { if (modelTag == null) { throw new ArgumentNullException(nameof(modelTag)); } var clientTag = new Client.Tag { Id = modelTag.Id, Name = modelTag.Name, }; return(clientTag); }
public void AddTagToCloud(Tag tag) { SetTagCountValue(tag, _tagCount.ContainsKey(tag) ? _tagCount[tag] : 1); }