Class CollectionApiEvent
Событие изменения коллекции.
Implements
Inherited Members
Namespace: Ascon.Polynom.Api.Events
Assembly: Ascon.Polynom.Api.dll
Syntax
public class CollectionApiEvent : ApiEvent, IEquatable<CollectionApiEvent>
Constructors
CollectionApiEvent(ApiObjectIdentifier, NotifyCollectionChangedActionEnum, IReadOnlyList<ApiObjectData>, IReadOnlyList<ApiObjectData>)
Инициализирует объект класса CollectionApiEvent.
Declaration
public CollectionApiEvent(ApiObjectIdentifier collectionIdentifier, NotifyCollectionChangedActionEnum action, IReadOnlyList<ApiObjectData> newItems, IReadOnlyList<ApiObjectData> oldItems)
Parameters
| Type | Name | Description |
|---|---|---|
| ApiObjectIdentifier | collectionIdentifier | The collection identifier. |
| NotifyCollectionChangedActionEnum | action | The action. |
| IReadOnlyList<ApiObjectData> | newItems | The new items. |
| IReadOnlyList<ApiObjectData> | oldItems | The old items. |
CollectionApiEvent(ApiObjectIdentifier, NotifyCollectionChangedActionEnum, IReadOnlyList<ApiObjectData>, IReadOnlyList<ApiObjectData>, int, int)
Инициализирует объект класса CollectionApiEvent.
Declaration
public CollectionApiEvent(ApiObjectIdentifier collectionIdentifier, NotifyCollectionChangedActionEnum action, IReadOnlyList<ApiObjectData> newItems, IReadOnlyList<ApiObjectData> oldItems, int newIndex, int oldIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| ApiObjectIdentifier | collectionIdentifier | The collection identifier. |
| NotifyCollectionChangedActionEnum | action | The action. |
| IReadOnlyList<ApiObjectData> | newItems | The new items. |
| IReadOnlyList<ApiObjectData> | oldItems | The old items. |
| int | newIndex | |
| int | oldIndex |
CollectionApiEvent(ApiObjectIdentifier, IReadOnlyList<ApiObjectData>, int, int)
Инициализирует объект класса CollectionApiEvent.
Declaration
public CollectionApiEvent(ApiObjectIdentifier collectionIdentifier, IReadOnlyList<ApiObjectData> newItems, int index, int oldIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| ApiObjectIdentifier | collectionIdentifier | The collection identifier. |
| IReadOnlyList<ApiObjectData> | newItems | The new items. |
| int | index | The new index. |
| int | oldIndex | The old index. |
Properties
Action
Возвращает действие.
Declaration
public NotifyCollectionChangedActionEnum Action { get; }
Property Value
| Type | Description |
|---|---|
| NotifyCollectionChangedActionEnum |
NewIndex
Возвращает новый индекс перемещённого объекта.
Declaration
public int NewIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
NewItems
Declaration
public IReadOnlyList<ApiObjectData> NewItems { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ApiObjectData> |
NewObjects
Возвращает новые объекты.
Declaration
public IApiObject[] NewObjects { get; set; }
Property Value
| Type | Description |
|---|---|
| IApiObject[] |
OldIndex
Возвращает старый индекс перемещённого объекта.
Declaration
public int OldIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
OldItems
Declaration
public IReadOnlyList<ApiObjectData> OldItems { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ApiObjectData> |
OldObjects
Возвращает старые объекты.
Declaration
public IApiObject[] OldObjects { get; set; }
Property Value
| Type | Description |
|---|---|
| IApiObject[] |
Methods
Equals(CollectionApiEvent)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(CollectionApiEvent other)
Parameters
| Type | Name | Description |
|---|---|---|
| CollectionApiEvent | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| bool | true if the current object is equal to the |
Equals(object)
Determines whether the specified object, is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with this instance. |
Returns
| Type | Description |
|---|---|
| bool |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |