Class IWritableExtensions
This extension class extends the IWritable<T> interface with common functions. It provides shared logic for implementations across the persistence layer.
Inheritance
System.Object
IWritableExtensions
Namespace: TeleScope.Persistence.Abstractions.Extensions
Assembly: TeleScope.Persistence.Abstractions.dll
Syntax
public static class IWritableExtensions : object
Methods
| Improve this Doc View SourceValidateOrThrow<T>(IWritable<T>, IEnumerable<T>, FileInfo)
Validates the permissions to create and delete of the calling instance and returns a true if the process should continue or false if not.
In case that the permissions were violated an
Declaration
public static bool ValidateOrThrow<T>(this IWritable<T> writer, IEnumerable<T> data, FileInfo info)
Parameters
| Type | Name | Description |
|---|---|---|
| IWritable<T> | writer | The calling instance. |
| IEnumerable<T> | data | The data of the calling instance. |
| FileInfo | info | The file informations that are used to delete or create files. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Type Parameters
| Name | Description |
|---|---|
| T | The data type of the data. |