/// <summary> /// Determines whether the specified <see cref="System.Object"/> is equal to this instance. /// </summary> /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param> /// <returns> /// Returns <c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>. /// </returns> /// <exception cref="T:System.NullReferenceException"> /// The <paramref name="obj"/> parameter is null. /// </exception> public override bool Equals(object obj) { if (obj == null) { return(false); } TableServiceTable rhs = obj as TableServiceTable; if (rhs == null) { return(false); } return(this.TableName.Equals(rhs.TableName, StringComparison.InvariantCultureIgnoreCase)); }
/// <summary> /// Delete table implementation. /// </summary> /// <param name="tableName">The table name.</param> /// <returns>A sequence of tasks to do the operation.</returns> private TaskSequence DeleteTableImpl(string tableName) { var svc = this.GetDataServiceContext(); var table = new TableServiceTable(tableName); svc.AttachTo(Protocol.Constants.TableServiceTablesName, table); svc.DeleteObject(table); var saveChangesTask = svc.SaveChangesAsync(); yield return(saveChangesTask); // wrap any exceptions try { var result = saveChangesTask.Result; } catch (InvalidOperationException ex) { throw Utilities.TranslateDataServiceClientException(ex); } }