C# 클래스 System.Data.DataRelationCollection

상속: InternalDataCollectionBase
파일 보기 프로젝트 열기: dotnet/corefx 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AssignName string
InternalIndexOf int
MakeName string
RegisterName void
UnregisterName void

공개 메소드들

메소드 설명
Add ( DataColumn parentColumns, DataColumn childColumns ) : DataRelation

Creates a relation given the parameters and adds it to the collection. The name is defaulted. An ArgumentException is thrown if this relation already belongs to this collection or belongs to another collection. An InvalidConstraintException is thrown if the relation can't be created based on the parameters. The CollectionChanged event is fired if it succeeds.

Add ( string name, DataColumn parentColumns, DataColumn childColumns ) : DataRelation

Creates a with the specified name, parent columns, child columns, and adds it to the collection.

Add ( string name, DataColumn parentColumns, DataColumn childColumns, bool createConstraints ) : DataRelation

Creates a relation given the parameters and adds it to the collection. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation already belongs to this collection, belongs to another collection, or if this collection already has a relation with the same name (case insensitive). An InvalidRelationException is thrown if the relation can't be created based on the parameters. The CollectionChanged event is fired if it succeeds.

Add ( DataRelation relation ) : void

Adds the relation to the collection.

AddRange ( DataRelation relations ) : void
CanRemove ( DataRelation relation ) : bool

Verifies if a given relation can be removed from the collection.

Clear ( ) : void

Clears the collection of any relations.

Contains ( string name ) : bool

Returns true if this collection has a relation with the given name (case insensitive), false otherwise.

CopyTo ( DataRelation array, int index ) : void
IndexOf ( DataRelation relation ) : int

Returns the index of a specified .

IndexOf ( string relationName ) : int

Returns the index of the relation with the given name (case insensitive), or -1 if the relation doesn't exist in the collection.

Remove ( DataRelation relation ) : void

Removes the given relation from the collection. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation doesn't belong to this collection. The CollectionChanged event is fired if it succeeds.

Remove ( string name ) : void

Removes the relation with the given name from the collection. An IndexOutOfRangeException is thrown if this collection doesn't have a relation with that name The CollectionChanged event is fired if it succeeds.

RemoveAt ( int index ) : void

Removes the relation at the given index from the collection. An IndexOutOfRangeException is thrown if this collection doesn't have a relation at this index. The CollectionChanged event is fired if it succeeds.

this ( int index ) : DataRelation

Gets the relation specified by index.

this ( string name ) : DataRelation

Gets the relation specified by name.

보호된 메소드들

메소드 설명
AddCore ( DataRelation relation ) : void

Does verification on the table. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation already belongs to this collection, belongs to another collection. A DuplicateNameException is thrown if this collection already has a relation with the same name (case insensitive).

GetDataSet ( ) : DataSet

Gets the dataSet for this collection.

OnCollectionChanged ( CollectionChangeEventArgs ccevent ) : void

This method is called whenever the collection changes. Overriders of this method should call the base implementation of this method.

OnCollectionChanging ( CollectionChangeEventArgs ccevent ) : void
RemoveCore ( DataRelation relation ) : void

Does verification on the relation. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation doesn't belong to this collection.

비공개 메소드들

메소드 설명
AssignName ( ) : string

Creates a new default name.

InternalIndexOf ( string name ) : int
MakeName ( int index ) : string

Makes a default name with the given index. e.g. Relation1, Relation2, ... Relationi

RegisterName ( string name ) : void

Registers this name as being used in the collection. Will throw an ArgumentException if the name is already being used. Called by Add, All property, and Relation.RelationName property. if the name is equivalent to the next default name to hand out, we increment our defaultNameIndex.

UnregisterName ( string name ) : void

Unregisters this name as no longer being used in the collection. Called by Remove, All property, and Relation.RelationName property. If the name is equivalent to the last proposed default name, we walk backwards to find the next proper default name to use.

메소드 상세

Add() 공개 메소드

Creates a relation given the parameters and adds it to the collection. The name is defaulted. An ArgumentException is thrown if this relation already belongs to this collection or belongs to another collection. An InvalidConstraintException is thrown if the relation can't be created based on the parameters. The CollectionChanged event is fired if it succeeds.
public Add ( DataColumn parentColumns, DataColumn childColumns ) : DataRelation
parentColumns DataColumn
childColumns DataColumn
리턴 DataRelation

Add() 공개 메소드

Creates a with the specified name, parent columns, child columns, and adds it to the collection.
public Add ( string name, DataColumn parentColumns, DataColumn childColumns ) : DataRelation
name string
parentColumns DataColumn
childColumns DataColumn
리턴 DataRelation

Add() 공개 메소드

Creates a relation given the parameters and adds it to the collection. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation already belongs to this collection, belongs to another collection, or if this collection already has a relation with the same name (case insensitive). An InvalidRelationException is thrown if the relation can't be created based on the parameters. The CollectionChanged event is fired if it succeeds.
public Add ( string name, DataColumn parentColumns, DataColumn childColumns, bool createConstraints ) : DataRelation
name string
parentColumns DataColumn
childColumns DataColumn
createConstraints bool
리턴 DataRelation

Add() 공개 메소드

Adds the relation to the collection.
public Add ( DataRelation relation ) : void
relation DataRelation
리턴 void

AddCore() 보호된 메소드

Does verification on the table. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation already belongs to this collection, belongs to another collection. A DuplicateNameException is thrown if this collection already has a relation with the same name (case insensitive).
protected AddCore ( DataRelation relation ) : void
relation DataRelation
리턴 void

AddRange() 공개 메소드

public AddRange ( DataRelation relations ) : void
relations DataRelation
리턴 void

CanRemove() 공개 메소드

Verifies if a given relation can be removed from the collection.
public CanRemove ( DataRelation relation ) : bool
relation DataRelation
리턴 bool

Clear() 공개 메소드

Clears the collection of any relations.
public Clear ( ) : void
리턴 void

Contains() 공개 메소드

Returns true if this collection has a relation with the given name (case insensitive), false otherwise.
public Contains ( string name ) : bool
name string
리턴 bool

CopyTo() 공개 메소드

public CopyTo ( DataRelation array, int index ) : void
array DataRelation
index int
리턴 void

GetDataSet() 보호된 추상적인 메소드

Gets the dataSet for this collection.
protected abstract GetDataSet ( ) : DataSet
리턴 DataSet

IndexOf() 공개 메소드

Returns the index of a specified .
public IndexOf ( DataRelation relation ) : int
relation DataRelation
리턴 int

IndexOf() 공개 메소드

Returns the index of the relation with the given name (case insensitive), or -1 if the relation doesn't exist in the collection.
public IndexOf ( string relationName ) : int
relationName string
리턴 int

OnCollectionChanged() 보호된 메소드

This method is called whenever the collection changes. Overriders of this method should call the base implementation of this method.
protected OnCollectionChanged ( CollectionChangeEventArgs ccevent ) : void
ccevent System.ComponentModel.CollectionChangeEventArgs
리턴 void

OnCollectionChanging() 보호된 메소드

protected OnCollectionChanging ( CollectionChangeEventArgs ccevent ) : void
ccevent System.ComponentModel.CollectionChangeEventArgs
리턴 void

Remove() 공개 메소드

Removes the given relation from the collection. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation doesn't belong to this collection. The CollectionChanged event is fired if it succeeds.
public Remove ( DataRelation relation ) : void
relation DataRelation
리턴 void

Remove() 공개 메소드

Removes the relation with the given name from the collection. An IndexOutOfRangeException is thrown if this collection doesn't have a relation with that name The CollectionChanged event is fired if it succeeds.
public Remove ( string name ) : void
name string
리턴 void

RemoveAt() 공개 메소드

Removes the relation at the given index from the collection. An IndexOutOfRangeException is thrown if this collection doesn't have a relation at this index. The CollectionChanged event is fired if it succeeds.
public RemoveAt ( int index ) : void
index int
리턴 void

RemoveCore() 보호된 메소드

Does verification on the relation. An ArgumentNullException is thrown if this relation is null. An ArgumentException is thrown if this relation doesn't belong to this collection.
protected RemoveCore ( DataRelation relation ) : void
relation DataRelation
리턴 void

this() 공개 추상적인 메소드

Gets the relation specified by index.
public abstract this ( int index ) : DataRelation
index int
리턴 DataRelation

this() 공개 추상적인 메소드

Gets the relation specified by name.
public abstract this ( string name ) : DataRelation
name string
리턴 DataRelation