Class LocalItem
Inheritance
System.Object
LocalItem
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Terrasoft.Sync
Assembly: Terrasoft.Sync.dll
Syntax
public class LocalItem : IEnumerable<SyncEntity>, IEnumerable
Constructors
LocalItem(SyncItemSchema)
Declaration
public LocalItem(SyncItemSchema itemSchema)
Parameters
Type | Name | Description |
---|---|---|
SyncItemSchema | itemSchema |
Properties
Entities
Коллекция ентитей в которые мапится один SyncItem. Содержит имя схемы + коллекцию ентитей этой схемы
Declaration
public Dictionary<string, List<SyncEntity>> Entities { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<SyncEntity>> |
Remarks
Гарантировано содержит проинициализированые списки для всех схем указаных в атрибуте Map класса наследника SyncItemValue
Schema
Declaration
public SyncItemSchema Schema { get; }
Property Value
Type | Description |
---|---|
SyncItemSchema |
Version
Declaration
public DateTime Version { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
Methods
Add(UserConnection, String)
Создает и добавляет новый SyncEntity в колекцию
Declaration
public SyncEntity Add(UserConnection userConnection, string schemaName)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | |
System.String | schemaName |
Returns
Type | Description |
---|---|
SyncEntity |
AddOrReplace(String, SyncEntity)
Добавляет новый SyncEntity в колекцию, в случае если SyncEntity с таким EntityId уже существует, заменяет его
Declaration
public void AddOrReplace(string schemaName, SyncEntity syncEntity)
Parameters
Type | Name | Description |
---|---|---|
System.String | schemaName | |
SyncEntity | syncEntity |
GetEnumerator()
Declaration
public IEnumerator<SyncEntity> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<SyncEntity> |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable