Class SQLitePropertyStore
The in-memory implementation of a property store
Inherited Members
Namespace:FubarDev.WebDavServer.Props.Store.SQLite
Assembly:FubarDev.WebDavServer.Props.Store.SQLite.dll
Syntax
public class SQLitePropertyStore : PropertyStoreBase, IFileSystemPropertyStore, IPropertyStore
Constructors
| Improve this Doc View SourceSQLitePropertyStore(IDeadPropertyFactory, String, IOptions<SQLitePropertyStoreOptions>, ILogger<SQLitePropertyStore>)
Initializes a new instance of the SQLitePropertyStore class.
Declaration
public SQLitePropertyStore([NotNull] IDeadPropertyFactory deadPropertyFactory, [NotNull] string dbFileName, [CanBeNull] IOptions<SQLitePropertyStoreOptions> options, [NotNull] ILogger<SQLitePropertyStore> logger)
Parameters
Type | Name | Description |
---|---|---|
IDeadPropertyFactory | deadPropertyFactory | The factory to create dead properties |
String | dbFileName | The file name of the SQLite database |
Microsoft.Extensions.Options.IOptions<SQLitePropertyStoreOptions> | options | The options for this property store |
Microsoft.Extensions.Logging.ILogger<SQLitePropertyStore> | logger | The logger |
Properties
| Improve this Doc View SourceCost
Gets the cost to query the properties of a property store
Declaration
public override int Cost { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Implements
Methods
| Improve this Doc View SourceGetAsync(IEntry, CancellationToken)
Gets all dead properties for a given entry
Declaration
public override Task<IReadOnlyCollection<XElement>> GetAsync(IEntry entry, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEntry | entry | The entry to get all the dead properties for |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<IReadOnlyCollection<XElement>> | The collection of all dead properties |
Overrides
Implements
Remarks
A GetETagProperty will not be returned by this function.
GetDeadETagAsync(IEntry, CancellationToken)
Gets a GetETagProperty from the property store
Declaration
protected override Task<EntityTag> GetDeadETagAsync(IEntry entry, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEntry | entry | The entry to get the |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<EntityTag> | The entity tag for the entry |
Overrides
| Improve this Doc View SourceIgnoreEntry(IEntry)
Determines whether the given entry should be ignored when the client performs a PROPFIND
Declaration
public bool IgnoreEntry(IEntry entry)
Parameters
Type | Name | Description |
---|---|---|
IEntry | entry | The entry that needs to be checked if it should be ignored |
Returns
Type | Description |
---|---|
Boolean | true when the entry should be ignored |
Implements
| Improve this Doc View SourceRemoveAsync(IEntry, IEnumerable<XName>, CancellationToken)
Remove multiple dead properties by its name at once from the given entry
Declaration
public override Task<IReadOnlyCollection<bool>> RemoveAsync(IEntry entry, IEnumerable<XName> keys, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEntry | entry | The entry to remove the given property names from |
IEnumerable<XName> | keys | |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<IReadOnlyCollection<Boolean>> | A collection of booleans where a true value indicates that there was a dead property for a given name that could be removed from the entry. A GetETagProperty cannot be removed by this function. |
Overrides
Implements
| Improve this Doc View SourceRemoveAsync(IEntry, CancellationToken)
Remove all dead propertied (including a probably exting GetETagProperty) from a given entry
Declaration
public override Task RemoveAsync(IEntry entry, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEntry | entry | The entry to remove all the dead properties from |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task | The async task |
Overrides
Implements
| Improve this Doc View SourceSetAsync(IEntry, IEnumerable<XElement>, CancellationToken)
Sets all given dead properties for the given entry
Declaration
public override Task SetAsync(IEntry entry, IEnumerable<XElement> elements, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEntry | entry | The entry to set all the dead properties for |
IEnumerable<XElement> | elements | |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task | The async task |
Overrides
Implements
Remarks
A GetETagProperty cannot be updated using this method
UpdateDeadETagAsync(IEntry, CancellationToken)
Updates a GetETagProperty in the property store
Declaration
protected override Task<EntityTag> UpdateDeadETagAsync(IEntry entry, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEntry | entry | The entry to update the |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<EntityTag> | The updated entity tag for the entry |