Пример #1
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    SQLCmd_AddBotComment.Dispose();
                    SQLCmd_AddCheckedComment.Dispose();
                    SQLCmd_DoesBotCommentExist.Dispose();
                    SQLCmd_GetBotComment.Dispose();
                    SQLCmd_HasCommentBeenChecked.Dispose();
                    SQLCmd_HasPostBeenChecked.Dispose();
                    SQLCmd_AddCheckedPost.Dispose();
                    SQLCmd_UpdateBotComment.Dispose();
                    dbConnection.Dispose();
                    // TODO: dispose managed state (managed objects).
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }
Пример #2
0
 public bool HasPostBeenChecked(string postId)
 {
     SQLCmd_HasPostBeenChecked.Parameters["@postID"].Value = postId;
     return(Convert.ToBoolean(SQLCmd_HasPostBeenChecked.ExecuteScalar()));
 }