Class FileFactoryUtils
Inheritance
Inherited Members
Namespace: Terrasoft.File
Assembly: Terrasoft.File.dll
Syntax
public static class FileFactoryUtils
Methods
Create(IFileFactory, IFileLocator)
Creates a new instance of the IFile type by a provided fileLocator
.
Declaration
public static IFile Create(this IFileFactory source, IFileLocator fileLocator)
Parameters
Type | Name | Description |
---|---|---|
IFileFactory | source | An instance of the IFileFactory type. |
IFileLocator | fileLocator | An instance of the IFileLocator type. |
Returns
Type | Description |
---|---|
IFile | The corresponding instance of the IFile type. |
CreateFile(UserConnection, IFileLocator)
Creates a new instance of the IFile type by a provided fileLocator
.
Declaration
public static IFile CreateFile(this UserConnection source, IFileLocator fileLocator)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | source | User connection. |
IFileLocator | fileLocator | An instance of the IFileLocator type. |
Returns
Type | Description |
---|---|
IFile | The corresponding instance of the IFile type. |
Get(IFileFactory, IFileLocator)
Returns an instance of the IFile type by a provided source
.
Declaration
public static IFile Get(this IFileFactory source, IFileLocator fileLocator)
Parameters
Type | Name | Description |
---|---|---|
IFileFactory | source | An instance of the IFileFactory type. |
IFileLocator | fileLocator | An instance of the IFileLocator type. |
Returns
Type | Description |
---|---|
IFile | The corresponding instance of the IFile type. |
GetFile(UserConnection, IFileLocator)
Returns an instance of the IFile type by a provided fileLocator
.
Declaration
public static IFile GetFile(this UserConnection source, IFileLocator fileLocator)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | source | User connection. |
IFileLocator | fileLocator | An instance of the IFileLocator type. |
Returns
Type | Description |
---|---|
IFile | The corresponding instance of the IFile type. |
GetFileFactory(UserConnection)
Returns instance of the IFileFactory.
Declaration
public static IFileFactory GetFileFactory(this UserConnection source)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | source | User connection. |
Returns
Type | Description |
---|---|
IFileFactory | Instance of the IFileFactory. |
WithRightsDisabled(IFileFactory)
Returns instance of IFileFactory configured to ignore rights.
Declaration
public static IFileFactory WithRightsDisabled(this IFileFactory source)
Parameters
Type | Name | Description |
---|---|---|
IFileFactory | source | IFileFactory to configure. |
Returns
Type | Description |
---|---|
IFileFactory |