Example #1
0
 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;
 }
Example #2
0
 internal FileSmbProperties(FlattenedStorageFileProperties flattenedStorageFileProperties)
 {
     FileAttributes    = NtfsFileAttributes.Parse(flattenedStorageFileProperties.FileAttributes);
     FilePermissionKey = flattenedStorageFileProperties.FilePermissionKey;
     FileCreationTime  = flattenedStorageFileProperties.FileCreationTime;
     FileLastWriteTime = flattenedStorageFileProperties.FileLastWriteTime;
     FileChangeTime    = flattenedStorageFileProperties.FileChangeTime;
     FileId            = flattenedStorageFileProperties.FileId;
     ParentId          = flattenedStorageFileProperties.FileParentId;
 }
        /// <summary>
        /// Creates a new StorageFileDownloadProperties instance for mocking.
        /// </summary>
        public static StorageFileDownloadDetails 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)
        {
            var flattened = new FlattenedStorageFileProperties()
            {
                LastModified          = lastModified,
                Metadata              = metadata,
                ContentType           = contentType,
                ContentRange          = contentRange,
                ETag                  = eTag,
                ContentEncoding       = contentEncoding,
                CacheControl          = cacheControl,
                ContentDisposition    = contentDisposition,
                ContentLanguage       = contentLanguage,
                AcceptRanges          = acceptRanges,
                CopyCompletionTime    = copyCompletedOn,
                CopyStatusDescription = copyStatusDescription,
                CopyId                = copyId,
                CopyProgress          = copyProgress,
                CopySource            = copySource,
                CopyStatus            = copyStatus,
                FileContentHash       = fileContentHash,
                IsServerEncrypted     = isServiceEncrypted
            };

            return(new StorageFileDownloadDetails(flattened));
        }
 /// <summary>
 /// Creates a new StorageFileDownloadInfo backed by FlattenedStorageFileProperties
 /// </summary>
 /// <param name="flattened">The FlattenedStorageFileProperties returned with the request</param>
 internal StorageFileDownloadInfo(FlattenedStorageFileProperties flattened)
 {
     _flattened = flattened;
     Details    = new StorageFileDownloadDetails(flattened);
 }
 internal StorageFileDownloadDetails(FlattenedStorageFileProperties flattened)
 {
     _flattened    = flattened;
     SmbProperties = new FileSmbProperties(flattened);
 }
 /// <summary>
 /// Creates a new StorageFileDownloadInfo backed by FlattenedStorageFileProperties
 /// </summary>
 /// <param name="flattened">The FlattenedStorageFileProperties returned with the request</param>
 internal StorageFileDownloadInfo(FlattenedStorageFileProperties flattened)
 {
     this._flattened = flattened;
     this.Properties = new StorageFileDownloadProperties(flattened);
 }
Example #7
0
 internal StorageFileDownloadProperties(FlattenedStorageFileProperties flattened)
 {
     this._flattened = flattened;
     this.SmbProperties = new FileSmbProperties(flattened);
 }