Class UploadProgressProvider
Provides a common base class for all upload progress providers, and a way for developers to implement custom upload progress providers that can be used with the Mediachase FileUploader.NET infrastructure as persistent stores for upload progress.
Inheritance
Namespace: Mediachase.FileUploader.Web
Assembly: Mediachase.FileUploader.dll
Version: 10.8.0Syntax
public abstract class UploadProgressProvider : ProviderBase
Constructors
UploadProgressProvider()
Initializes a new instance of the UploadProgressProvider class.
Declaration
public UploadProgressProvider()
Methods
GetInfo(Guid)
Gets the upload progress information by ProgressUid.
Declaration
public abstract UploadProgressInfo GetInfo(Guid ProgressUid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | ProgressUid | The progress uid. |
Returns
Type | Description |
---|---|
UploadProgressInfo | UploadProgressInfo if progress info is exist, otherwise null. |
Initialize(String, NameValueCollection)
Initializes the provider.
Declaration
public override void Initialize(string name, NameValueCollection config)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The friendly name of the provider. |
System.Collections.Specialized.NameValueCollection | config | A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The name of the provider is null. |
System.InvalidOperationException | An attempt is made to call System.Configuration.Provider.ProviderBase.Initialize(System.String,System.Collections.Specialized.NameValueCollection) on a provider after the provider has already been initialized. |
System.ArgumentException | The name of the provider has a length of zero. |
SetUploadError(Guid, String)
Sets the upload error.
Declaration
public void SetUploadError(Guid ProgressUid, string ErrorMessage)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | ProgressUid | The progress uid. |
System.String | ErrorMessage | The error message. |
Update(UploadProgressInfo)
Updates the upload progress information.
Declaration
public abstract void Update(UploadProgressInfo info)
Parameters
Type | Name | Description |
---|---|---|
UploadProgressInfo | info | The info. |
UpdateBytesReceived(Guid, Int32)
Updates the bytes received.
Declaration
public virtual void UpdateBytesReceived(Guid ProgressUid, int BytesReceived)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | ProgressUid | The progress uid. |
System.Int32 | BytesReceived | The bytes received. |