Class FilesModelFactory
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
boolname
stringfileSize
long?id
stringproperties
ShareFileItemPropertiesfileAttributes
NtfsFileAttributes?permissionKey
string
Returns
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
ETaglastModified
DateTimeOffsetisServerEncrypted
boolfileAttributes
stringfileCreationTime
DateTimeOffsetfileLastWriteTime
DateTimeOffsetfileChangeTime
DateTimeOffsetfilePermissionKey
stringfileId
stringfileParentId
string
Returns
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
DateTimeOffsetcontentLanguage
IEnumerable<string>acceptRanges
stringcopyCompletionTime
DateTimeOffsetcopyStatusDescription
stringcontentDisposition
stringcopyProgress
stringcopySource
UricopyStatus
CopyStatusfileContentHash
byte[]isServerEncrypted
boolcacheControl
stringfileAttributes
stringcontentEncoding
IEnumerable<string>fileCreationTime
DateTimeOffsetcontentHash
byte[]fileLastWriteTime
DateTimeOffseteTag
ETagfileChangeTime
DateTimeOffsetcontentRange
stringfilePermissionKey
stringcontentType
stringfileId
stringcontentLength
longfileParentId
stringmetadata
IDictionary<string, string>content
StreamcopyId
string
Returns
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
DateTimeOffsetmetadata
IDictionary<string, string>contentType
stringcontentRange
stringeTag
ETagcontentEncoding
IEnumerable<string>cacheControl
stringcontentDisposition
stringcontentLanguage
IEnumerable<string>acceptRanges
stringcopyCompletedOn
DateTimeOffsetcopyStatusDescription
stringcopyId
stringcopyProgress
stringcopySource
UricopyStatus
CopyStatusfileContentHash
byte[]isServiceEncrypted
bool
Returns
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
ETaglastModified
DateTimeOffsetisServerEncrypted
boolfilePermissionKey
stringfileAttributes
stringfileCreationTime
DateTimeOffsetfileLastWriteTime
DateTimeOffsetfileChangeTime
DateTimeOffsetfileId
stringfileParentId
string
Returns
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
DateTimeOffsetmetadata
IDictionary<string, string>contentLength
longcontentType
stringeTag
ETagcontentHash
byte[]contentEncoding
IEnumerable<string>cacheControl
stringcontentDisposition
stringcontentLanguage
IEnumerable<string>copyCompletedOn
DateTimeOffsetcopyStatusDescription
stringcopyId
stringcopyProgress
stringcopySource
stringcopyStatus
CopyStatusisServerEncrypted
boolfileAttributes
NtfsFileAttributesfileCreationTime
DateTimeOffsetfileLastWriteTime
DateTimeOffsetfileChangeTime
DateTimeOffsetfilePermissionKey
stringfileId
stringfileParentId
string
Returns
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
DateTimeOffsetmetadata
IDictionary<string, string>contentLength
longcontentType
stringeTag
ETagcontentHash
byte[]contentEncoding
IEnumerable<string>cacheControl
stringcontentDisposition
stringcontentLanguage
IEnumerable<string>copyCompletedOn
DateTimeOffsetcopyStatusDescription
stringcopyId
stringcopyProgress
stringcopySource
stringcopyStatus
CopyStatusisServerEncrypted
boolfileAttributes
stringfileCreationTime
DateTimeOffsetfileLastWriteTime
DateTimeOffsetfileChangeTime
DateTimeOffsetfilePermissionKey
stringfileId
stringfileParentId
string