Developer: Extensions

>> Download this guide (docx format)
>> Download FI_IUploader.dll

 

Summary

Extensions are dynamic link libraries written in any .Net language, which extends FileImaging functionality by adding new image hosting services for pattern uploading.

 

Technical information

 

Extension must be written in any .Net language and must contain Reference to FI_IUploader.dll.

 

Extension structure

 

Extension must contain FI_Extension root namespace.

 

Classes

Class name and position

Access

Inheritance

FI_Extension.Uploader

Public

IUploader

FI_Extension.Uploader.FailedEventArgs

Public

IUploader.IFailedEventArgs

FI_Extension.Uploader.CompletedEventArgs

Public

IUploader.ICompletedEventArgs

FI_Extension.Uploader.ProcessEventArgs

Public

IUploader.IProcessEventArgs

 

Class structure:

 

Uploader
Events:

Access

Arguments

Inheritance

Public

sender (type: IUploader)
e (type: IUploader.ICompletedEventArgs)

IUploader.Completed

Public

sender (type: IUploader)
e (type: IUploader.IProcessEventArgs)

IUploader.Process

Public

sender (type: IUploader)
e (type: IUploader.IFailedEventArgs)

IUploader.Failed

Properties:

Access

Type

Inheritance

Public

System.String

IUploader.ImageFile

Public, ReadOnly

System.Boolean

IUploader.Working

Procedures (methods):

Access

Arguments

Inheritance

Public

None

IUploader.StartUpload

Public

None

IUploader.CancelUpload

 
 
FailedEventArgs

 

Properties:

Access

Type

Inheritance

Public

System.String

IFailedEventArgs.Cause

 
 
CompletedEventArgs

 

Properties:

Access

Type

Inheritance

Public

System.String

ICompletedEventArgs.URL

 
 
ProcessEventArgs
Properties:

Access

Type

Inheritance

Public

System.Double

IProcessEventArgs.Percent

 

 

Explanatory notes

 

Uploader class is root that contains subclasses FailedEventArgs, CompletedEventArgs and ProcessEventArgs for  Failed, Completed и Process events correspondingly and must be placed inside FI_Extension namespace.
-Failed event must be fired when extension handles exception (Cause property must contain exception message).
-Completed event must be fired when upload process completes (URL property must contain direct link to pattern (image)).
-Process event must be fired every time when portion of data was sent to server (Percent property must contain current upload process percent (in decimal)).

-StartUpload method must start pattern uploading process.
-CancelUpload must stop uploading process.


-ImageFile property describes path and name of pattern on a user's local computer.
-Working property must be set to True when uploading process is in progress


Note: all events must be fired in a main program thread.

 

Extension file names

To work in FileImaging, extension file name must be built in a following way:
FI_Extension_<service name>.dll
for instance,
FI_Extension_ImageShack.dll
Program will read this extension as “ImageShack