Прочетете на английски Редактиране

Споделяне чрез


MemberRelationshipService.Item[] Property

Definition

Establishes a relationship between a source and target object.

Overloads

Item[MemberRelationship]

Establishes a relationship between a source and target object.

Item[Object, MemberDescriptor]

Establishes a relationship between a source and target object.

Item[MemberRelationship]

Source:
MemberRelationshipService.cs
Source:
MemberRelationshipService.cs
Source:
MemberRelationshipService.cs

Establishes a relationship between a source and target object.

C#
public System.ComponentModel.Design.Serialization.MemberRelationship this[System.ComponentModel.Design.Serialization.MemberRelationship source] { get; set; }

Parameters

source
MemberRelationship

The source relationship. This is the left-hand side of a relationship assignment.

Property Value

The current relationship associated with source, or Empty if there is no relationship.

Exceptions

source is null.

source is empty, or the relationship is not supported by the service.

Remarks

If Empty is assigned to the source, any existing relationship is removed.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

Item[Object, MemberDescriptor]

Source:
MemberRelationshipService.cs
Source:
MemberRelationshipService.cs
Source:
MemberRelationshipService.cs

Establishes a relationship between a source and target object.

C#
public System.ComponentModel.Design.Serialization.MemberRelationship this[object sourceOwner, System.ComponentModel.MemberDescriptor sourceMember] { get; set; }

Parameters

sourceOwner
Object

The owner of a source relationship.

sourceMember
MemberDescriptor

The member of a source relationship.

Property Value

A MemberRelationship structure encapsulating the relationship between a source and target object, or null if there is no relationship.

Exceptions

sourceOwner or sourceMember is null.

sourceOwner or sourceMember is empty, or the relationship is not supported by the service.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1