Microsoft.AnalysisServices.Tabular.NamedMetadataObjectCollection.Contains(string)

Here are the examples of the csharp api class Microsoft.AnalysisServices.Tabular.NamedMetadataObjectCollection.Contains(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

1. Example

Project: BismNormalizer
Source File: Table.cs
public void DeleteRelationship(string internalName)
        {
            if (_tomTable.Model.Relationships.Contains(internalName))
            {
                _tomTable.Model.Relationships.Remove(internalName);
            }

            // shell model
            if (_relationships.ContainsInternalName(internalName))
            {
                _relationships.RemoveByInternalName(internalName);
            }
        }

2. Example

Project: BismNormalizer
Source File: TabularModel.cs
public List<SingleColumnRelationship> DeleteTable(string name)
        {
            List<SingleColumnRelationship> deletedRelationships = new List<SingleColumnRelationship>();

            // shell model
            if (_tables.ContainsName(name))
            {
                deletedRelationships = _tables.FindByName(name).DeleteAllAssociatedRelationships();
                _tables.RemoveByName(name);
            }

            if (_database.Model.Tables.Contains(name))
            {
                _database.Model.Tables.Remove(name);
            }

            return deletedRelationships;
        }

3. Example

Project: BismNormalizer
Source File: TabularModel.cs
public void DeleteRole(string name)
        {
            if (_database.Model.Roles.Contains(name))
            {
                _database.Model.Roles.Remove(name);
            }

            // shell model
            if (_roles.ContainsName(name))
            {
                _roles.Remove(name);
            }
        }