C# Class Microsoft.Samples.Synchronization.ClientServices.Formatters.ODataAtomWriter

SyncWriter implementation for the OData Atompub format
Inheritance: SyncWriter
Afficher le fichier Open project: rafek/SyncFx

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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.

Method Details

ODataAtomWriter() public méthode

Constructor
public ODataAtomWriter ( Uri serviceUri ) : System
serviceUri System.Uri Service Url to include as the base namespace
Résultat System

StartFeed() public méthode

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.
Résultat void

WriteFeed() public méthode

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
Résultat void

WriteItemInternal() public méthode

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
Résultat void