Show / Hide Table of Contents

Class TextFilePropertyStore

A property store that stores the properties in a JSON file

Inheritance
Object
PropertyStoreBase
TextFilePropertyStore
Inherited Members
PropertyStoreBase.DeadPropertyFactory
PropertyStoreBase.GetAsync(IEntry, XName, CancellationToken)
PropertyStoreBase.SetAsync(IEntry, XElement, CancellationToken)
PropertyStoreBase.RemoveAsync(IEntry, XName, CancellationToken)
PropertyStoreBase.Create(IEntry, XName)
PropertyStoreBase.LoadAsync(IEntry, XName, CancellationToken)
PropertyStoreBase.LoadAsync(IEntry, CancellationToken)
PropertyStoreBase.GetETagAsync(IEntry, CancellationToken)
PropertyStoreBase.UpdateETagAsync(IEntry, CancellationToken)
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace:FubarDev.WebDavServer.Props.Store.TextFile
Assembly:FubarDev.WebDavServer.Props.Store.TextFile.dll
Syntax
public class TextFilePropertyStore : PropertyStoreBase, IFileSystemPropertyStore, IPropertyStore

Constructors

| Improve this Doc View Source

TextFilePropertyStore(TextFilePropertyStoreOptions, IDeadPropertyFactory, String, Boolean, String, ILogger<TextFilePropertyStore>)

Initializes a new instance of the TextFilePropertyStore class.

Declaration
public TextFilePropertyStore(TextFilePropertyStoreOptions options, IDeadPropertyFactory deadPropertyFactory, string rootFolder, bool storeInRootOnly, string storeEntryName, ILogger<TextFilePropertyStore> logger)
Parameters
Type Name Description
TextFilePropertyStoreOptions options

The options for the text file property store

IDeadPropertyFactory deadPropertyFactory

The factory for the dead properties

String rootFolder

The root folder where the properties will be stored

Boolean storeInRootOnly

Store all properties in the same JSON text file

String storeEntryName

The name of the JSON text file

Microsoft.Extensions.Logging.ILogger<TextFilePropertyStore> logger

The logger for the property store

Properties

| Improve this Doc View Source

Cost

Gets the cost to query the properties of a property store

Declaration
public override int Cost { get; }
Property Value
Type Description
Int32
Overrides
PropertyStoreBase.Cost
Implements
IPropertyStore.Cost
| Improve this Doc View Source

RootPath

Gets or sets the root folder where the JSON file with the properties gets stored.

Declaration
public string RootPath { get; set; }
Property Value
Type Description
String

Methods

| Improve this Doc View Source

GetAsync(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
PropertyStoreBase.GetAsync(IEntry, CancellationToken)
Implements
IPropertyStore.GetAsync(IEntry, CancellationToken)
Remarks

A GetETagProperty will not be returned by this function.

| Improve this Doc View Source

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 getetag property from

CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<EntityTag>

The entity tag for the entry

Overrides
PropertyStoreBase.GetDeadETagAsync(IEntry, CancellationToken)
| Improve this Doc View Source

IgnoreEntry(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
IFileSystemPropertyStore.IgnoreEntry(IEntry)
| Improve this Doc View Source

RemoveAsync(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
PropertyStoreBase.RemoveAsync(IEntry, IEnumerable<XName>, CancellationToken)
Implements
IPropertyStore.RemoveAsync(IEntry, IEnumerable<XName>, CancellationToken)
| Improve this Doc View Source

RemoveAsync(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
PropertyStoreBase.RemoveAsync(IEntry, CancellationToken)
Implements
IPropertyStore.RemoveAsync(IEntry, CancellationToken)
| Improve this Doc View Source

SetAsync(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
PropertyStoreBase.SetAsync(IEntry, IEnumerable<XElement>, CancellationToken)
Implements
IPropertyStore.SetAsync(IEntry, IEnumerable<XElement>, CancellationToken)
Remarks

A GetETagProperty cannot be updated using this method

| Improve this Doc View Source

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 getetag property for

CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<EntityTag>

The updated entity tag for the entry

Overrides
PropertyStoreBase.UpdateDeadETagAsync(IEntry, CancellationToken)
  • Improve this Doc
  • View Source
Back to top Copyright © 2016-2017 Fubar Development Junker
Generated by DocFX