Deveel.Data.TableSourceComposite.CloseAndDropTable C# (CSharp) Method

CloseAndDropTable() private method

private CloseAndDropTable ( string tableFileName ) : bool
tableFileName string
return bool
        private bool CloseAndDropTable(string tableFileName)
        {
            // Find the table with this file name.
            int? tableId = null;
            foreach (var source in tableSources.Values) {
                if (source.StoreIdentity.Equals(tableFileName)) {
                    if (source.IsRootLocked)
                        return false;

                    if (!source.Drop())
                        return false;

                    tableId = source.TableId;
                }
            }

            if (tableId != null)
                tableSources.Remove(tableId.Value);

            return false;
        }