Table of Contents

Class FilesModelFactory

Namespace
Azure.Storage.Files.Shares.Models
Assembly
Azure.Storage.Files.Shares.dll

FilesModelFactory provides utilities for mocking.

public static class FilesModelFactory
Inheritance
FilesModelFactory
Inherited Members

Methods

ShareFileItem(bool, string, long?, string, ShareFileItemProperties, NtfsFileAttributes?, string)

Creates a new StorageFileItem instance for mocking.

public static ShareFileItem ShareFileItem(bool isDirectory = false, string name = null, long? fileSize = null, string id = null, ShareFileItemProperties properties = null, NtfsFileAttributes? fileAttributes = null, string permissionKey = null)

Parameters

isDirectory bool
name string
fileSize long?
id string
properties ShareFileItemProperties
fileAttributes NtfsFileAttributes?
permissionKey string

Returns

ShareFileItem

StorageDirectoryProperties(IDictionary<string, string>, ETag, DateTimeOffset, bool, string, DateTimeOffset, DateTimeOffset, DateTimeOffset, string, string, string)

Creates a new StorageDirectoryProperties instance for mocking.

public static ShareDirectoryProperties StorageDirectoryProperties(IDictionary<string, string> metadata, ETag eTag, DateTimeOffset lastModified, bool isServerEncrypted, string fileAttributes, DateTimeOffset fileCreationTime, DateTimeOffset fileLastWriteTime, DateTimeOffset fileChangeTime, string filePermissionKey, string fileId, string fileParentId)

Parameters

metadata IDictionary<string, string>
eTag ETag
lastModified DateTimeOffset
isServerEncrypted bool
fileAttributes string
fileCreationTime DateTimeOffset
fileLastWriteTime DateTimeOffset
fileChangeTime DateTimeOffset
filePermissionKey string
fileId string
fileParentId string

Returns

ShareDirectoryProperties

StorageFileDownloadInfo(DateTimeOffset, IEnumerable<string>, string, DateTimeOffset, string, string, string, Uri, CopyStatus, byte[], bool, string, string, IEnumerable<string>, DateTimeOffset, byte[], DateTimeOffset, ETag, DateTimeOffset, string, string, string, string, long, string, IDictionary<string, string>, Stream, string)

Creates a new StorageFileDownloadInfo instance for mocking.

public static ShareFileDownloadInfo StorageFileDownloadInfo(DateTimeOffset lastModified = default, IEnumerable<string> contentLanguage = null, string acceptRanges = null, DateTimeOffset copyCompletionTime = default, string copyStatusDescription = null, string contentDisposition = null, string copyProgress = null, Uri copySource = null, CopyStatus copyStatus = CopyStatus.Pending, byte[] fileContentHash = null, bool isServerEncrypted = false, string cacheControl = null, string fileAttributes = null, IEnumerable<string> contentEncoding = null, DateTimeOffset fileCreationTime = default, byte[] contentHash = null, DateTimeOffset fileLastWriteTime = default, ETag eTag = null, DateTimeOffset fileChangeTime = default, string contentRange = null, string filePermissionKey = null, string contentType = null, string fileId = null, long contentLength = 0, string fileParentId = null, IDictionary<string, string> metadata = null, Stream content = null, string copyId = null)

Parameters

lastModified DateTimeOffset
contentLanguage IEnumerable<string>
acceptRanges string
copyCompletionTime DateTimeOffset
copyStatusDescription string
contentDisposition string
copyProgress string
copySource Uri
copyStatus CopyStatus
fileContentHash byte[]
isServerEncrypted bool
cacheControl string
fileAttributes string
contentEncoding IEnumerable<string>
fileCreationTime DateTimeOffset
contentHash byte[]
fileLastWriteTime DateTimeOffset
eTag ETag
fileChangeTime DateTimeOffset
contentRange string
filePermissionKey string
contentType string
fileId string
contentLength long
fileParentId string
metadata IDictionary<string, string>
content Stream
copyId string

Returns

ShareFileDownloadInfo

StorageFileDownloadProperties(DateTimeOffset, IDictionary<string, string>, string, string, ETag, IEnumerable<string>, string, string, IEnumerable<string>, string, DateTimeOffset, string, string, string, Uri, CopyStatus, byte[], bool)

Creates a new StorageFileDownloadProperties instance for mocking.

public static ShareFileDownloadDetails StorageFileDownloadProperties(DateTimeOffset lastModified, IDictionary<string, string> metadata, string contentType, string contentRange, ETag eTag, IEnumerable<string> contentEncoding, string cacheControl, string contentDisposition, IEnumerable<string> contentLanguage, string acceptRanges, DateTimeOffset copyCompletedOn, string copyStatusDescription, string copyId, string copyProgress, Uri copySource, CopyStatus copyStatus, byte[] fileContentHash, bool isServiceEncrypted)

Parameters

lastModified DateTimeOffset
metadata IDictionary<string, string>
contentType string
contentRange string
eTag ETag
contentEncoding IEnumerable<string>
cacheControl string
contentDisposition string
contentLanguage IEnumerable<string>
acceptRanges string
copyCompletedOn DateTimeOffset
copyStatusDescription string
copyId string
copyProgress string
copySource Uri
copyStatus CopyStatus
fileContentHash byte[]
isServiceEncrypted bool

Returns

ShareFileDownloadDetails

StorageFileInfo(ETag, DateTimeOffset, bool, string, string, DateTimeOffset, DateTimeOffset, DateTimeOffset, string, string)

Creates a new StorageFileInfo instance for mocking.

public static ShareFileInfo StorageFileInfo(ETag eTag, DateTimeOffset lastModified, bool isServerEncrypted, string filePermissionKey, string fileAttributes, DateTimeOffset fileCreationTime, DateTimeOffset fileLastWriteTime, DateTimeOffset fileChangeTime, string fileId, string fileParentId)

Parameters

eTag ETag
lastModified DateTimeOffset
isServerEncrypted bool
filePermissionKey string
fileAttributes string
fileCreationTime DateTimeOffset
fileLastWriteTime DateTimeOffset
fileChangeTime DateTimeOffset
fileId string
fileParentId string

Returns

ShareFileInfo

StorageFileProperties(DateTimeOffset, IDictionary<string, string>, long, string, ETag, byte[], IEnumerable<string>, string, string, IEnumerable<string>, DateTimeOffset, string, string, string, string, CopyStatus, bool, NtfsFileAttributes, DateTimeOffset, DateTimeOffset, DateTimeOffset, string, string, string)

Creates a new StorageFileProperties instance for mocking.

public static ShareFileProperties StorageFileProperties(DateTimeOffset lastModified, IDictionary<string, string> metadata, long contentLength, string contentType, ETag eTag, byte[] contentHash, IEnumerable<string> contentEncoding, string cacheControl, string contentDisposition, IEnumerable<string> contentLanguage, DateTimeOffset copyCompletedOn, string copyStatusDescription, string copyId, string copyProgress, string copySource, CopyStatus copyStatus, bool isServerEncrypted, NtfsFileAttributes fileAttributes, DateTimeOffset fileCreationTime, DateTimeOffset fileLastWriteTime, DateTimeOffset fileChangeTime, string filePermissionKey, string fileId, string fileParentId)

Parameters

lastModified DateTimeOffset
metadata IDictionary<string, string>
contentLength long
contentType string
eTag ETag
contentHash byte[]
contentEncoding IEnumerable<string>
cacheControl string
contentDisposition string
contentLanguage IEnumerable<string>
copyCompletedOn DateTimeOffset
copyStatusDescription string
copyId string
copyProgress string
copySource string
copyStatus CopyStatus
isServerEncrypted bool
fileAttributes NtfsFileAttributes
fileCreationTime DateTimeOffset
fileLastWriteTime DateTimeOffset
fileChangeTime DateTimeOffset
filePermissionKey string
fileId string
fileParentId string

Returns

ShareFileProperties

StorageFileProperties(DateTimeOffset, IDictionary<string, string>, long, string, ETag, byte[], IEnumerable<string>, string, string, IEnumerable<string>, DateTimeOffset, string, string, string, string, CopyStatus, bool, string, DateTimeOffset, DateTimeOffset, DateTimeOffset, string, string, string)

Creates a new StorageFileProperties instance for mocking.

public static ShareFileProperties StorageFileProperties(DateTimeOffset lastModified, IDictionary<string, string> metadata, long contentLength, string contentType, ETag eTag, byte[] contentHash, IEnumerable<string> contentEncoding, string cacheControl, string contentDisposition, IEnumerable<string> contentLanguage, DateTimeOffset copyCompletedOn, string copyStatusDescription, string copyId, string copyProgress, string copySource, CopyStatus copyStatus, bool isServerEncrypted, string fileAttributes, DateTimeOffset fileCreationTime, DateTimeOffset fileLastWriteTime, DateTimeOffset fileChangeTime, string filePermissionKey, string fileId, string fileParentId)

Parameters

lastModified DateTimeOffset
metadata IDictionary<string, string>
contentLength long
contentType string
eTag ETag
contentHash byte[]
contentEncoding IEnumerable<string>
cacheControl string
contentDisposition string
contentLanguage IEnumerable<string>
copyCompletedOn DateTimeOffset
copyStatusDescription string
copyId string
copyProgress string
copySource string
copyStatus CopyStatus
isServerEncrypted bool
fileAttributes string
fileCreationTime DateTimeOffset
fileLastWriteTime DateTimeOffset
fileChangeTime DateTimeOffset
filePermissionKey string
fileId string
fileParentId string

Returns

ShareFileProperties