bool ISet <ISPListInfo> .Add(ISPListInfo item) { if (item == null) { throw new ArgumentNullException(nameof(item)); } if (item.ListAlias == null) { throw new ArgumentException($"{nameof(ISPListInfo.ListAlias)} property must not be null!", nameof(item)); } if (item.ListUri == null) { throw new ArgumentException($"{nameof(ISPListInfo.ListUri)} property must not be null!", nameof(item)); } if (item.Type == null) { throw new ArgumentException($"{nameof(ISPListInfo.Type)} property must not be null!", nameof(item)); } var listInfo = TryGetByAlias(item.ListAlias); if (listInfo != null) { throw new ArgumentException($"An item with alias '{item.ListAlias}' is already contained in the set!"); } listInfo = TryGetByType(item.Type); if (listInfo != null) { throw new ArgumentException($"An item with type '{item.Type}' is already contained in the set!"); } return(listInfoSet.Add(item)); }
void ICollection <ISPListInfo> .Add(ISPListInfo item) { listInfoSet.Add(item); }
public bool Remove(ISPListInfo item) { return(listInfoSet.Remove(item)); }
public bool Contains(ISPListInfo item) { return(listInfoSet.Contains(item)); }