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
isDirectoryboolnamestringfileSizelong?idstringpropertiesShareFileItemPropertiesfileAttributesNtfsFileAttributes?permissionKeystring
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
metadataIDictionary<string, string>eTagETaglastModifiedDateTimeOffsetisServerEncryptedboolfileAttributesstringfileCreationTimeDateTimeOffsetfileLastWriteTimeDateTimeOffsetfileChangeTimeDateTimeOffsetfilePermissionKeystringfileIdstringfileParentIdstring
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
lastModifiedDateTimeOffsetcontentLanguageIEnumerable<string>acceptRangesstringcopyCompletionTimeDateTimeOffsetcopyStatusDescriptionstringcontentDispositionstringcopyProgressstringcopySourceUricopyStatusCopyStatusfileContentHashbyte[]isServerEncryptedboolcacheControlstringfileAttributesstringcontentEncodingIEnumerable<string>fileCreationTimeDateTimeOffsetcontentHashbyte[]fileLastWriteTimeDateTimeOffseteTagETagfileChangeTimeDateTimeOffsetcontentRangestringfilePermissionKeystringcontentTypestringfileIdstringcontentLengthlongfileParentIdstringmetadataIDictionary<string, string>contentStreamcopyIdstring
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
lastModifiedDateTimeOffsetmetadataIDictionary<string, string>contentTypestringcontentRangestringeTagETagcontentEncodingIEnumerable<string>cacheControlstringcontentDispositionstringcontentLanguageIEnumerable<string>acceptRangesstringcopyCompletedOnDateTimeOffsetcopyStatusDescriptionstringcopyIdstringcopyProgressstringcopySourceUricopyStatusCopyStatusfileContentHashbyte[]isServiceEncryptedbool
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
eTagETaglastModifiedDateTimeOffsetisServerEncryptedboolfilePermissionKeystringfileAttributesstringfileCreationTimeDateTimeOffsetfileLastWriteTimeDateTimeOffsetfileChangeTimeDateTimeOffsetfileIdstringfileParentIdstring
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
lastModifiedDateTimeOffsetmetadataIDictionary<string, string>contentLengthlongcontentTypestringeTagETagcontentHashbyte[]contentEncodingIEnumerable<string>cacheControlstringcontentDispositionstringcontentLanguageIEnumerable<string>copyCompletedOnDateTimeOffsetcopyStatusDescriptionstringcopyIdstringcopyProgressstringcopySourcestringcopyStatusCopyStatusisServerEncryptedboolfileAttributesNtfsFileAttributesfileCreationTimeDateTimeOffsetfileLastWriteTimeDateTimeOffsetfileChangeTimeDateTimeOffsetfilePermissionKeystringfileIdstringfileParentIdstring
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
lastModifiedDateTimeOffsetmetadataIDictionary<string, string>contentLengthlongcontentTypestringeTagETagcontentHashbyte[]contentEncodingIEnumerable<string>cacheControlstringcontentDispositionstringcontentLanguageIEnumerable<string>copyCompletedOnDateTimeOffsetcopyStatusDescriptionstringcopyIdstringcopyProgressstringcopySourcestringcopyStatusCopyStatusisServerEncryptedboolfileAttributesstringfileCreationTimeDateTimeOffsetfileLastWriteTimeDateTimeOffsetfileChangeTimeDateTimeOffsetfilePermissionKeystringfileIdstringfileParentIdstring