Show / Hide Table of Contents

Class FileSystemSession

Represents a user-impersonated session of working with a file system. This class is NOT thread-safe

Inheritance
System.Object
DisposableObject
FileSystemSession
GoogleDriveSession
S3V4FileSystemSession
SVNFileSystemSession
Implements
System.IDisposable
INamed
Inherited Members
DisposableObject.DisposeAndNull<T>(T)
DisposableObject.DisposeStarted
DisposableObject.Disposed
DisposableObject.EnsureObjectNotDisposed()
DisposableObject.Dispose()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.IO.FileSystem
Assembly: NFX.dll
Syntax
public class FileSystemSession : DisposableObject, IDisposable, INamed

Constructors

FileSystemSession(FileSystem, IFileSystemHandle, FileSystemSessionConnectParams)

Starts new file system session

Declaration
protected FileSystemSession(FileSystem fs, IFileSystemHandle handle, FileSystemSessionConnectParams cParams)
Parameters
Type Name Description
FileSystem fs
IFileSystemHandle handle
FileSystemSessionConnectParams cParams

Fields

m_FileSystem

Declaration
protected readonly FileSystem m_FileSystem
Field Value
Type Description
FileSystem

m_Handle

Declaration
protected readonly IFileSystemHandle m_Handle
Field Value
Type Description
IFileSystemHandle

m_Items

Declaration
protected readonly List<FileSystemSessionItem> m_Items
Field Value
Type Description
System.Collections.Generic.List<FileSystemSessionItem>

m_Name

Declaration
protected readonly string m_Name
Field Value
Type Description
System.String

m_TransactionHandle

Declaration
protected IFileSystemTransactionHandle m_TransactionHandle
Field Value
Type Description
IFileSystemTransactionHandle

m_User

Declaration
protected readonly User m_User
Field Value
Type Description
User

Properties

FileSystem

Returns file system instance that this session operates under

Declaration
public FileSystem FileSystem { get; }
Property Value
Type Description
FileSystem

Handle

Returns file system handle for this session

Declaration
public IFileSystemHandle Handle { get; }
Property Value
Type Description
IFileSystemHandle

Item[String]

Navigates to the specified path

Declaration
public FileSystemSessionItem this[string path] { get; }
Parameters
Type Name Description
System.String path

Path to navigate to

Property Value
Type Description
FileSystemSessionItem

FileSystemSessionItem instance - a directory or a file or null if it does not exist

Items

Returns file system items initialized through this session

Declaration
public IEnumerable<FileSystemSessionItem> Items { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<FileSystemSessionItem>

LatestVersion

Returns latest version for file systems that support versioning, null otherwise

Declaration
public virtual IFileSystemVersion LatestVersion { get; }
Property Value
Type Description
IFileSystemVersion

Name

Returns session name

Declaration
public string Name { get; }
Property Value
Type Description
System.String

SecurityManager

Returns security manager that services this file system session. This may be useful in cases when file system implements its own permission structure and user directory

Declaration
public ISecurityManager SecurityManager { get; }
Property Value
Type Description
ISecurityManager

TransactionHandle

Returns transaction object if transaction has been started or null

Declaration
public IFileSystemTransactionHandle TransactionHandle { get; }
Property Value
Type Description
IFileSystemTransactionHandle

UniqueSequenceProvider

Returns unique sequence provider for the system or null if it is not supported

Declaration
public IUniqueSequenceProvider UniqueSequenceProvider { get; }
Property Value
Type Description
IUniqueSequenceProvider

User

Returns user that this file system session is for

Declaration
public User User { get; }
Property Value
Type Description
User

Version

Gets/sets version of the file system that this session works against (a changeset that session "sees")

Declaration
public virtual IFileSystemVersion Version { get; set; }
Property Value
Type Description
IFileSystemVersion

Methods

BeginTransaction()

Starts a transaction returning its' transaction handle object, otherwise does nothing

Declaration
public IFileSystemTransactionHandle BeginTransaction()
Returns
Type Description
IFileSystemTransactionHandle

BeginTransactionAsync()

Async version of BeginTransaction()

Declaration
public Task<IFileSystemTransactionHandle> BeginTransactionAsync()
Returns
Type Description
System.Threading.Tasks.Task<IFileSystemTransactionHandle>

CommitTransaction()

Commits active transaction, does nothing otherwise

Declaration
public void CommitTransaction()

CommitTransactionAsync()

Async version of CommitTransaction()

Declaration
public Task CommitTransactionAsync()
Returns
Type Description
System.Threading.Tasks.Task

Destructor()

Declaration
protected override void Destructor()
Overrides
DisposableObject.Destructor()

GetItemAsync(String)

Async version of Item(string)

Declaration
public Task<FileSystemSessionItem> GetItemAsync(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
System.Threading.Tasks.Task<FileSystemSessionItem>

GetLatestVersionAsync()

Async version of LatestVersion

Declaration
public virtual Task<IFileSystemVersion> GetLatestVersionAsync()
Returns
Type Description
System.Threading.Tasks.Task<IFileSystemVersion>

GetVersions(IFileSystemVersion, Int32)

Returns specified number of versions going back from the specific version. This call is thread-safe

Declaration
public virtual IEnumerable<IFileSystemVersion> GetVersions(IFileSystemVersion from, int countBack)
Parameters
Type Name Description
IFileSystemVersion from
System.Int32 countBack
Returns
Type Description
System.Collections.Generic.IEnumerable<IFileSystemVersion>

GetVersionsAsync(IFileSystemVersion, Int32)

Async version of GetVersions(IFileSystemVersion, Int32)

Declaration
public virtual Task<IEnumerable<IFileSystemVersion>> GetVersionsAsync(IFileSystemVersion from, int countBack)
Parameters
Type Name Description
IFileSystemVersion from
System.Int32 countBack
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IFileSystemVersion>>

RollbackTransaction()

Cancels active transaction changes, does nothing otherwise

Declaration
public void RollbackTransaction()

RollbackTransactionAsync()

Async version of RollbackTransaction()

Declaration
public Task RollbackTransactionAsync()
Returns
Type Description
System.Threading.Tasks.Task

SetFileSystemVersionAsync(IFileSystemVersion)

Async version of Version

Declaration
public virtual Task SetFileSystemVersionAsync(IFileSystemVersion version)
Parameters
Type Name Description
IFileSystemVersion version
Returns
Type Description
System.Threading.Tasks.Task

ValidateConnectParams(FileSystemSessionConnectParams)

Declaration
protected virtual void ValidateConnectParams(FileSystemSessionConnectParams cParams)
Parameters
Type Name Description
FileSystemSessionConnectParams cParams

Implements

System.IDisposable
INamed

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX