/// <summary> /// Creates a new StorageDirectoryProperties instance for mocking. /// </summary> public static ShareDirectoryProperties StorageDirectoryProperties( IDictionary <string, string> metadata, ETag eTag, DateTimeOffset lastModified, bool isServerEncrypted, #pragma warning disable CA1801 // Review unused parameters string fileAttributes, DateTimeOffset fileCreationTime, DateTimeOffset fileLastWriteTime, DateTimeOffset fileChangeTime, string filePermissionKey, string fileId, string fileParentId #pragma warning restore CA1801 // Review unused parameters ) => new ShareDirectoryProperties { Metadata = metadata, ETag = eTag, LastModified = lastModified, IsServerEncrypted = isServerEncrypted, SmbProperties = new FileSmbProperties { FileAttributes = ShareExtensions.ToFileAttributes(fileAttributes), FilePermissionKey = filePermissionKey, FileCreatedOn = fileCreationTime, FileLastWrittenOn = fileLastWriteTime, FileChangedOn = fileChangeTime, FileId = fileId, ParentId = fileParentId } };
/// <summary> /// Creates a new StorageDirectoryInfo instance for mocking. /// </summary> public static ShareDirectoryInfo StorageDirectoryInfo( ETag eTag, DateTimeOffset lastModified, string filePermissionKey, string fileAttributes, DateTimeOffset fileCreationTime, DateTimeOffset fileLastWriteTime, DateTimeOffset fileChangeTime, string fileId, string fileParentId) => new ShareDirectoryInfo { ETag = eTag, LastModified = lastModified, SmbProperties = new FileSmbProperties { FileAttributes = ShareExtensions.ToFileAttributes(fileAttributes), FilePermissionKey = filePermissionKey, FileCreatedOn = fileCreationTime, FileLastWrittenOn = fileLastWriteTime, FileChangedOn = fileChangeTime, FileId = fileId, ParentId = fileParentId } };
/// <summary> /// Creates a new StorageFileProperties instance for mocking. /// </summary> 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, #pragma warning disable CA1801 // Review unused parameters string fileAttributes, DateTimeOffset fileCreationTime, DateTimeOffset fileLastWriteTime, DateTimeOffset fileChangeTime, string filePermissionKey, string fileId, string fileParentId #pragma warning restore CA1801 // Review unused parameters ) => new ShareFileProperties { LastModified = lastModified, Metadata = metadata, ContentLength = contentLength, ContentType = contentType, ETag = eTag, ContentHash = contentHash, ContentEncoding = contentEncoding, CacheControl = cacheControl, ContentDisposition = contentDisposition, ContentLanguage = contentLanguage, CopyCompletedOn = copyCompletedOn, CopyStatusDescription = copyStatusDescription, CopyId = copyId, CopyProgress = copyProgress, CopySource = copySource, CopyStatus = copyStatus, IsServerEncrypted = isServerEncrypted, SmbProperties = new FileSmbProperties { FileAttributes = ShareExtensions.ToFileAttributes(fileAttributes), FilePermissionKey = filePermissionKey, FileCreatedOn = fileCreationTime, FileLastWrittenOn = fileLastWriteTime, FileChangedOn = fileChangeTime, FileId = fileId, ParentId = fileParentId } };
internal FileSmbProperties(FlattenedStorageFileProperties flattenedStorageFileProperties) { FileAttributes = ShareExtensions.ToFileAttributes(flattenedStorageFileProperties.FileAttributes); FilePermissionKey = flattenedStorageFileProperties.FilePermissionKey; FileCreatedOn = flattenedStorageFileProperties.FileCreationTime; FileLastWrittenOn = flattenedStorageFileProperties.FileLastWriteTime; FileChangedOn = flattenedStorageFileProperties.FileChangeTime; FileId = flattenedStorageFileProperties.FileId; ParentId = flattenedStorageFileProperties.FileParentId; }
internal FileSmbProperties(RawStorageFileInfo rawStorageFileInfo) { FileAttributes = ShareExtensions.ToFileAttributes(rawStorageFileInfo.FileAttributes); FilePermissionKey = rawStorageFileInfo.FilePermissionKey; FileCreatedOn = rawStorageFileInfo.FileCreationTime; FileLastWrittenOn = rawStorageFileInfo.FileLastWriteTime; FileChangedOn = rawStorageFileInfo.FileChangeTime; FileId = rawStorageFileInfo.FileId; ParentId = rawStorageFileInfo.FileParentId; }
/// <summary> /// Creates a new StorageFileDownloadInfo instance for mocking. /// </summary> public static ShareFileDownloadInfo StorageFileDownloadInfo( DateTimeOffset lastModified = default, IEnumerable <string> contentLanguage = default, string acceptRanges = default, DateTimeOffset copyCompletionTime = default, string copyStatusDescription = default, string contentDisposition = default, string copyProgress = default, Uri copySource = default, CopyStatus copyStatus = default, byte[] fileContentHash = default, bool isServerEncrypted = default, string cacheControl = default, string fileAttributes = default, IEnumerable <string> contentEncoding = default, DateTimeOffset fileCreationTime = default, byte[] contentHash = default, DateTimeOffset fileLastWriteTime = default, ETag eTag = default, DateTimeOffset fileChangeTime = default, string contentRange = default, string filePermissionKey = default, string contentType = default, string fileId = default, long contentLength = default, string fileParentId = default, IDictionary <string, string> metadata = default, Stream content = default, string copyId = default) { return(new ShareFileDownloadInfo { ContentLength = contentLength, Content = content, ContentType = contentType, ContentHash = contentHash, Details = new ShareFileDownloadDetails { LastModified = lastModified, Metadata = metadata, ContentRange = contentRange, ETag = eTag, ContentEncoding = contentEncoding, CacheControl = cacheControl, ContentDisposition = contentDisposition, ContentLanguage = contentLanguage, AcceptRanges = acceptRanges, CopyCompletedOn = copyCompletionTime, CopyStatusDescription = copyStatusDescription, CopyId = copyId, CopyProgress = copyProgress, CopySource = copySource, CopyStatus = copyStatus, FileContentHash = fileContentHash, IsServerEncrypted = isServerEncrypted, SmbProperties = new FileSmbProperties { FileAttributes = ShareExtensions.ToFileAttributes(fileAttributes), FilePermissionKey = filePermissionKey, FileCreatedOn = fileCreationTime, FileLastWrittenOn = fileLastWriteTime, FileChangedOn = fileChangeTime, FileId = fileId, ParentId = fileParentId } } }); }