Class Storage
Compound storage implementation based on standard COM-object.
Inheritance
Inherited Members
Namespace: Syncfusion.CompoundFile.DocIO.Native
Assembly: Syncfusion.DocIO.Base.dll
Syntax
public class Storage : ICompoundStorage, IDisposable
Constructors
Storage(IStorage)
Initializes new instance of the storage.
Declaration
[CLSCompliant(false)]
public Storage(IStorage root)
Parameters
Type | Name | Description |
---|---|---|
IStorage | root | Root substorage. |
Storage(IStorage, String)
Initializes new instance of te storage.
Declaration
[CLSCompliant(false)]
public Storage(IStorage root, string storageName)
Parameters
Type | Name | Description |
---|---|---|
IStorage | root | Root substorage. |
System.String | storageName | Name of the storage. |
Storage(String, STGM)
Initializes new instance of the class.
Declaration
public Storage(string fileName, STGM storageOptions)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | Name of the file to open. |
STGM | storageOptions | Storage options. |
Properties
COMStorage
Returns internal COM storage. This property will be removed after implementing some document properties reading.
Declaration
[CLSCompliant(false)]
public IStorage COMStorage { get; }
Property Value
Type |
---|
IStorage |
Name
Returns name of the storage.
Declaration
public string Name { get; }
Property Value
Type |
---|
System.String |
Storages
Returns all storage names that are placed inside this stream.
Declaration
public string[] Storages { get; }
Property Value
Type |
---|
System.String[] |
Streams
Returns all stream names that are placed inside this stream.
Declaration
public string[] Streams { get; }
Property Value
Type |
---|
System.String[] |
Methods
ContainsStorage(String)
Determines whether this storage contains substorage with specified name.
Declaration
public bool ContainsStorage(string storageName)
Parameters
Type | Name | Description |
---|---|---|
System.String | storageName | Name of the storage to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if storage contains substorage with specified name. |
ContainsStream(String)
Determines whether storage contains specified stream.
Declaration
public bool ContainsStream(string streamName)
Parameters
Type | Name | Description |
---|---|---|
System.String | streamName | Name of the stream to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if storage contains specified stream. |
CreateStorage(String)
Creates new substorage inside this one.
Declaration
public ICompoundStorage CreateStorage(string storageName)
Parameters
Type | Name | Description |
---|---|---|
System.String | storageName | Name of the storage to create. |
Returns
Type | Description |
---|---|
ICompoundStorage | Created storage object. |
CreateStream(String)
Creates new stream inside this storage.
Declaration
public CompoundStream CreateStream(string streamName)
Parameters
Type | Name | Description |
---|---|---|
System.String | streamName | Name of the stream to create. |
Returns
Type | Description |
---|---|
CompoundStream | Created stream object. |
DeleteStorage(String)
Removes exisiting substorage from this one.
Declaration
public void DeleteStorage(string storageName)
Parameters
Type | Name | Description |
---|---|---|
System.String | storageName | Name of the storage to remove. |
DeleteStream(String)
Removes existing stream from this storage.
Declaration
public void DeleteStream(string streamName)
Parameters
Type | Name | Description |
---|---|---|
System.String | streamName | Name of the stream to remove. |
Dispose()
Declaration
public void Dispose()
Finalize()
Destructor.
Declaration
protected void Finalize()
Flush()
Commits changes.
Declaration
public void Flush()
InsertCopy(CompoundStream)
Inserts copy of the stream inside current storage.
Declaration
public void InsertCopy(CompoundStream streamToCopy)
Parameters
Type | Name | Description |
---|---|---|
CompoundStream | streamToCopy | Stream to copy. |
InsertCopy(ICompoundStorage)
Inserts copy of the storage and all subitems inside current storage.
Declaration
public void InsertCopy(ICompoundStorage storageToCopy)
Parameters
Type | Name | Description |
---|---|---|
ICompoundStorage | storageToCopy | Storage to copy. |
OpenStorage(String)
Opens existing substorage inside this one.
Declaration
public ICompoundStorage OpenStorage(string storageName)
Parameters
Type | Name | Description |
---|---|---|
System.String | storageName | Name of the storage to open. |
Returns
Type | Description |
---|---|
ICompoundStorage | Created storage object. |
OpenStream(String)
Opens existing stream inside this storage.
Declaration
public CompoundStream OpenStream(string streamName)
Parameters
Type | Name | Description |
---|---|---|
System.String | streamName | Name of the stream to open. |
Returns
Type |
---|
CompoundStream |