C# Класс Microsoft.Samples.Synchronization.ClientServices.Formatters.ODataAtomWriter

SyncWriter implementation for the OData Atompub format
Наследование: SyncWriter
Показать файл Открыть проект

Открытые методы

Метод Описание
ODataAtomWriter ( Uri serviceUri ) : System

Constructor

StartFeed ( bool isLastBatch, byte serverBlob ) : void

Should be called prior to any Items are added to the stream. This ensures that the stream is set up with the right doc level feed parameters

WriteFeed ( XmlWriter writer ) : void

Called by the runtime when all entities are written and contents needs to flushed to the underlying stream.

WriteItemInternal ( IOfflineEntity live, string liveTempId, IOfflineEntity conflicting, string conflictingTempId, string desc, bool isConflict, bool emitMetadataOnly ) : void

Adds an IOfflineEntity and its associated Conflicting/Error entity as an Atom entry element

Приватные методы

Метод Описание
WriteEntityContents ( IOfflineEntity entity ) : System.Xml.Linq.XElement

This writes the public contents of the Entity in the properties element.

WriteEntry ( IOfflineEntity live, string tempId, bool emitPartial ) : System.Xml.Linq.XElement

Writes the tag and all its related elements.

Описание методов

ODataAtomWriter() публичный Метод

Constructor
public ODataAtomWriter ( Uri serviceUri ) : System
serviceUri System.Uri Service Url to include as the base namespace
Результат System

StartFeed() публичный Метод

Should be called prior to any Items are added to the stream. This ensures that the stream is set up with the right doc level feed parameters
public StartFeed ( bool isLastBatch, byte serverBlob ) : void
isLastBatch bool Whether this feed will be the last batch or not.
serverBlob byte Sync server blob.
Результат void

WriteFeed() публичный Метод

Called by the runtime when all entities are written and contents needs to flushed to the underlying stream.
public WriteFeed ( XmlWriter writer ) : void
writer System.Xml.XmlWriter XmlWriter to which this feed will be serialized to
Результат void

WriteItemInternal() публичный Метод

Adds an IOfflineEntity and its associated Conflicting/Error entity as an Atom entry element
public WriteItemInternal ( IOfflineEntity live, string liveTempId, IOfflineEntity conflicting, string conflictingTempId, string desc, bool isConflict, bool emitMetadataOnly ) : void
live IOfflineEntity Live Entity
liveTempId string TempId for the live entity
conflicting IOfflineEntity Conflicting entity that will be sent in synnConflict or syncError extension
conflictingTempId string TempId for the conflicting entity
desc string Error description or the conflict resolution
isConflict bool Denotes if its an errorElement or conflict. Used only when is not null
emitMetadataOnly bool Bool flag that denotes whether a partial metadata only entity is to be written
Результат void