Interface IPartialBcmSerializer
Bcm serialization interface that allows for not holding the whole bcm document in memory
Namespace: Sdl.Core.Bcm.BcmModel.PartialSerialization
Assembly: Sdl.Core.Bcm.BcmModel.dll
Syntax
public interface IPartialBcmSerializer
Methods
AddFile(File)
Adds a file, based on the attributes and skeleton in the parameter. Array of paragraph units must be empty.
Declaration
void AddFile(File file)
Parameters
Type | Name | Description |
---|---|---|
File | file |
DeleteFile(Int32)
Deletes the file from the document.
Declaration
void DeleteFile(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
DeleteFile(String)
Deletes the file from the document.
Declaration
void DeleteFile(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id |
GetDocumentWithoutFiles()
Gets document attributes and metadata without the files list. Updates made to the object returned will be reflected automatically in the result in case the updated bcm is requested.
Declaration
Document GetDocumentWithoutFiles()
Returns
Type | Description |
---|---|
Document |
GetFileCount()
Number of files in this document
Declaration
int GetFileCount()
Returns
Type | Description |
---|---|
System.Int32 |
GetFileIds()
All file ids in this document
Declaration
IReadOnlyList<string> GetFileIds()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.String> |
GetFileSerializer(String)
Gets serialization wrapper for specific file
Declaration
IPartialFileSerializer GetFileSerializer(string fileId)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileId |
Returns
Type | Description |
---|---|
IPartialFileSerializer |
InsertFile(Int32, File)
Inserts a file to a specific position, based on the attributes and skeleton in the parameter. Array of paragraph units must be empty.
Declaration
void InsertFile(int index, File file)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
File | file |
SaveAsJson(Stream)
Saves bcm document as single json object
Declaration
void SaveAsJson(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream |
SaveAsJson(TextWriter)
Saves bcm document as single json object to TextWriter
Declaration
void SaveAsJson(TextWriter textWriter)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextWriter | textWriter |
SaveAsJson(String)
Saves bcm document as single json object
Declaration
void SaveAsJson(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath |