DataRelationCollection Classe
Definição
Representa a coleção de objetos DataRelation para este DataSet.Represents the collection of DataRelation objects for this DataSet.
public ref class DataRelationCollection abstract : System::Data::InternalDataCollectionBase
public abstract class DataRelationCollection : System.Data.InternalDataCollectionBase
[System.Serializable]
public abstract class DataRelationCollection : System.Data.InternalDataCollectionBase
type DataRelationCollection = class
inherit InternalDataCollectionBase
[<System.Serializable>]
type DataRelationCollection = class
inherit InternalDataCollectionBase
Public MustInherit Class DataRelationCollection
Inherits InternalDataCollectionBase
- Herança
- Atributos
Comentários
Um DataRelationCollection objeto permite A navegação entre objetos pai/filho relacionados DataTable .A DataRelationCollection object enables navigation between related parent/child DataTable objects.
Você cria um DataRelationCollection objeto definindo-o como uma propriedade do DataSet ou do DataTable , em vez de usar diretamente um construtor.You create a DataRelationCollection object by defining it as a property of either the DataSet or the DataTable, instead of by directly using a constructor. (Use a Relations propriedade de DataSet , ou a ParentRelations propriedade de DataTable .)(Use the Relations property of the DataSet, or the ParentRelations property of the DataTable.)
Para acessar a coleção, use a Relations Propriedade do DataSet objeto.To access the collection, use the Relations property of the DataSet object.
Assim que a coleção existe, você pode gerenciar os objetos que ele contém usando métodos como Add , Clear e Remove .As soon as the collection exists you can manage the objects it contains by using methods such as Add, Clear, and Remove.
Construtores
DataRelationCollection() |
Inicializa uma nova instância da classe DataRelationCollection.Initializes a new instance of the DataRelationCollection class. |
Propriedades
Count |
Obtém o número total de elementos em uma coleção.Gets the total number of elements in a collection. (Herdado de InternalDataCollectionBase) |
IsReadOnly |
Obtém um valor que indica se o InternalDataCollectionBase é somente leitura.Gets a value that indicates whether the InternalDataCollectionBase is read-only. (Herdado de InternalDataCollectionBase) |
IsSynchronized |
Obtém um valor que indica se o InternalDataCollectionBase é sincronizado.Gets a value that indicates whether the InternalDataCollectionBase is synchronized. (Herdado de InternalDataCollectionBase) |
Item[Int32] |
Obtém o objeto DataRelation no índice especificado.Gets the DataRelation object at the specified index. |
Item[String] |
Obtém o objeto DataRelation especificado por nome.Gets the DataRelation object specified by name. |
List |
Obtém os itens da coleção como uma lista.Gets the items of the collection as a list. (Herdado de InternalDataCollectionBase) |
SyncRoot |
Obtém um objeto que pode ser usado para sincronizar a coleção.Gets an object that can be used to synchronize the collection. (Herdado de InternalDataCollectionBase) |
Métodos
Add(DataColumn, DataColumn) |
Cria um DataRelation com uma coluna pai e filho especificada e a adiciona à coleção.Creates a DataRelation with a specified parent and child column, and adds it to the collection. |
Add(DataColumn[], DataColumn[]) |
Cria um DataRelation com as colunas pai e filho especificadas e as adiciona à coleção.Creates a DataRelation with the specified parent and child columns, and adds it to the collection. |
Add(DataRelation) |
Adiciona um DataRelation ao DataRelationCollection.Adds a DataRelation to the DataRelationCollection. |
Add(String, DataColumn, DataColumn) |
Cria um DataRelation com o nome e as colunas pai e filho especificadas e os adiciona à coleção.Creates a DataRelation with the specified name, and parent and child columns, and adds it to the collection. |
Add(String, DataColumn, DataColumn, Boolean) |
Cria um DataRelation com o nome especificado e colunas pai e filho, com restrições opcionais de acordo com o valor do parâmetro |
Add(String, DataColumn[], DataColumn[]) |
Cria um DataRelation com o nome e as matrizes de colunas pai e filho especificadas e os adiciona à coleção.Creates a DataRelation with the specified name and arrays of parent and child columns, and adds it to the collection. |
Add(String, DataColumn[], DataColumn[], Boolean) |
Cria um DataRelation com o nome especificado, matrizes de colunas pai e filho e um valor que especifica se uma restrição deve ser criada e o adiciona à coleção.Creates a DataRelation with the specified name, arrays of parent and child columns, and value specifying whether to create a constraint, and adds it to the collection. |
AddCore(DataRelation) |
Executa a verificação na tabela.Performs verification on the table. |
AddRange(DataRelation[]) |
Copia os elementos da matriz DataRelation especificada para o fim da coleção.Copies the elements of the specified DataRelation array to the end of the collection. |
CanRemove(DataRelation) |
Verifica se o DataRelation especificado pode ser removido da coleção.Verifies whether the specified DataRelation can be removed from the collection. |
Clear() |
Limpa a coleção de todas as relações.Clears the collection of any relations. |
Contains(String) |
Verifica se um DataRelation com o nome específico (não diferencia maiúsculas de minúsculas) existe na coleção.Verifies whether a DataRelation with the specific name (case insensitive) exists in the collection. |
CopyTo(Array, Int32) |
Copia todos os elementos do InternalDataCollectionBase atual para um Array unidimensional, começando no índice InternalDataCollectionBase especificado.Copies all the elements of the current InternalDataCollectionBase to a one-dimensional Array, starting at the specified InternalDataCollectionBase index. (Herdado de InternalDataCollectionBase) |
CopyTo(DataRelation[], Int32) |
Copia a coleção de objetos DataRelation começando no índice especificado.Copies the collection of DataRelation objects starting at the specified index. |
Equals(Object) |
Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object. (Herdado de Object) |
GetDataSet() |
Este método oferece suporte à .NET infraestrutura e não se destina a ser usado diretamente do seu código.This method supports the .NET infrastructure and is not intended to be used directly from your code. |
GetEnumerator() |
Obtém um IEnumerator para a coleção.Gets an IEnumerator for the collection. (Herdado de InternalDataCollectionBase) |
GetHashCode() |
Serve como a função de hash padrão.Serves as the default hash function. (Herdado de Object) |
GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
IndexOf(DataRelation) |
Obtém o índice do objeto DataRelation especificado.Gets the index of the specified DataRelation object. |
IndexOf(String) |
Obtém o índice do DataRelation especificado por nome.Gets the index of the DataRelation specified by name. |
MemberwiseClone() |
Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object. (Herdado de Object) |
OnCollectionChanged(CollectionChangeEventArgs) |
Aciona o evento CollectionChanged.Raises the CollectionChanged event. |
OnCollectionChanging(CollectionChangeEventArgs) |
Aciona o evento CollectionChanged.Raises the CollectionChanged event. |
Remove(DataRelation) |
Remove a relação especificada da coleção.Removes the specified relation from the collection. |
Remove(String) |
Remove a relação com o nome especificado da coleção.Removes the relation with the specified name from the collection. |
RemoveAt(Int32) |
Remove a relação no índice especificado da coleção.Removes the relation at the specified index from the collection. |
RemoveCore(DataRelation) |
Realiza uma verificação no objeto DataRelation especificado.Performs a verification on the specified DataRelation object. |
ToString() |
Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object. (Herdado de Object) |
Eventos
CollectionChanged |
Ocorre quando a coleção foi alterada.Occurs when the collection has changed. |
Métodos de Extensão
Cast<TResult>(IEnumerable) |
Converte os elementos de um IEnumerable para o tipo especificado.Casts the elements of an IEnumerable to the specified type. |
OfType<TResult>(IEnumerable) |
Filtra os elementos de um IEnumerable com base em um tipo especificado.Filters the elements of an IEnumerable based on a specified type. |
AsParallel(IEnumerable) |
Habilita a paralelização de uma consulta.Enables parallelization of a query. |
AsQueryable(IEnumerable) |
Converte um IEnumerable em um IQueryable.Converts an IEnumerable to an IQueryable. |
Aplica-se a
Acesso thread-safe
Este tipo é seguro para operações de leitura e multithread.This type is safe for multithreaded read operations. Você deve sincronizar todas as operações de gravação.You must synchronize any write operations.