Ejemplo n.º 1
0
 /// <summary>
 /// Gets paged image store content under the given relative path.
 /// The purpose of paging is to prevent from the oversized message which might be happend when listing a large number of files.
 /// </summary>
 /// <param name="listDescription">The information on how to get image store content.</param>
 /// <param name="timeout">The timeout for performing the listing operation.</param>
 /// <returns></returns>
 public async Task <ImageStorePagedContent> ListPagedContentWithDetailsAsync(ImageStoreListDescription listDescription, TimeSpan timeout)
 {
     return(await Task.Run(() =>
     {
         return this.ListPagedContentWithDetails(listDescription, timeout);
     }));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets paged image store relative paths under the given relative path.
 /// The purpose of paging is to prevent from the oversized message which might be happened when listing a large number of files.
 /// </summary>
 /// <param name="listDescription">The information on how to get image store content.</param>
 /// <param name="timeout">The timeout for performing the listing operation.</param>
 /// <returns></returns>
 public async Task <ImageStorePagedRelativePath> ListPagedContentAsync(ImageStoreListDescription listDescription, TimeSpan timeout)
 {
     return(await Task.Run(() =>
     {
         return this.ListPagedContent(listDescription, timeout);
     }));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets paged image store relative paths under the given relative path.
 /// The purpose of paging is to prevent from the oversized message which might be happened when listing a large number of files.
 /// </summary>
 ///<param name="listDescription">The information on how to get image store content.</param>
 ///<param name="timeout">The timeout for performing the listing operation.</param>
 /// <returns></returns>
 public ImageStorePagedRelativePath ListPagedContent(ImageStoreListDescription listDescription, TimeSpan timeout)
 {
     return(Utility.WrapNativeSyncInvokeInMTA(() =>
     {
         return this.ListPagedContentWrapper(listDescription, Utility.ToMilliseconds(timeout, "timeout"));
     }, "ListContent"));
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Gets paged image store content under the given relative path.
        /// The purpose of paging is to prevent from the oversized message which might be happend when listing a large number of files.
        /// </summary>
        /// <param name="listDescription">The information on how to get image store content.</param>
        /// <param name="timeout">The timeout for performing the listing operation.</param>
        /// <returns></returns>
        public ImageStorePagedContent ListPagedContentWithDetails(ImageStoreListDescription listDescription, TimeSpan timeout)
        {
            //return new ImageStoreContent();

            return(Utility.WrapNativeSyncInvokeInMTA(() =>
            {
                return this.ListPagedContentWithDetailsWrapper(listDescription, Utility.ToMilliseconds(timeout, "timeout"));
            }, "ListContent"));
        }
Ejemplo n.º 5
0
        private ImageStorePagedContent ListPagedContentWithDetailsWrapper(ImageStoreListDescription listDescription, UInt32 timeoutMilliseconds)
        {
            using (var pin = new PinCollection())
            {
                var nativeDescription = new NativeImageStore.FABRIC_IMAGE_STORE_LIST_DESCRIPTION();
                listDescription.ToNative(pin, out nativeDescription);

                var nativePtr = this.nativeClient.ListPagedContentWithDetails(
                    pin.AddBlittable(nativeDescription),
                    timeoutMilliseconds);

                return(FromNativePagedContent(nativePtr));
            }
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Get the paged image store content information
 /// Currently no implementation and has not been supported at the file image store
 /// </summary>
 /// <param name="listDescription">The information how to get image store content</param>
 /// <param name="timeout">The timeout for performing the listing operation</param>
 /// <returns></returns>
 public ImageStorePagedContent ListPagedContentWithDetails(ImageStoreListDescription listDescription, TimeSpan timeout)
 {
     // Message based communication doesn't exist in the file share image store. Paging doesn't need to be implemented here.
     throw new NotImplementedException();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Get the paged XStore content information.
 /// Currently no implementation and has not been supported at the XStore.
 /// </summary>
 /// <param name="listDescription">The information on how to get XStore content.</param>
 /// <param name="timeout">The timeout for performing the listing operation.</param>
 public ImageStorePagedContent ListPagedContentWithDetails(ImageStoreListDescription listDescription, TimeSpan timeout)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Gets the paged XStore blob relative paths.
 /// Currently no implementation and has not been supported at the XStore.
 /// </summary>
 /// <param name="listDescription">The information on how to get image store content.</param>
 /// <param name="timeout">The timeout for performing the listing operation.</param>
 /// <returns></returns>
 //Messgae based communication doesn't exist in the XStore. Paging doesn't need to be implemented here.
 public ImageStorePagedRelativePath ListPagedContent(ImageStoreListDescription listDescription, TimeSpan timeout)
 {
     throw new NotImplementedException();
 }
            public Task <ImageStorePagedContent> ListPagedContentAsync(string imageStoreConnectionString, ImageStoreListDescription listDescription, TimeSpan timeout)
            {
                this.fabricClient.ThrowIfDisposed();
                Requires.Argument <string>("remoteLocation", listDescription.RemoteLocation).NotNullOrEmpty();
                Requires.Argument <string>("imageStoreConnectionString", imageStoreConnectionString).NotNullOrEmpty();
                IImageStore imageStore = this.fabricClient.GetImageStore(imageStoreConnectionString);

                return(imageStore.ListPagedContentWithDetailsAsync(listDescription, timeout));
            }