ICallback Interface Reference

An interface for callback objects which can be used to return information about progress and errors.
More...

Collaboration diagram for ICallback:
Collaboration graph

Public Member Functions

void Error (string keyOfSender, string errorMsg)
 A function to report the information about an error. More...
 
void Progress (string keyOfSender, int percent, string message)
 A function to report the information about progress of the task. More...
 

Detailed Description

An interface for callback objects which can be used to return information about progress and errors.

Here is an example which demonstrates the usage of Callback.

public void Test()
{
Shapefile sf = new Shapefile();
sf.GlobalCallback = new Callback();
}
class Callback : ICallback
{
public void Error(string keyOfSender, string errorMsg)
{
Debug.Print("Error reported: " + errorMsg);
}
public void Progress(string keyOfSender, int percent, string message)
{
Debug.Print(message + ": " + percent + "%");
}
}
Provides a functionality for accessing and editing ESRI shapefiles.
Definition: Shapefile.cs:72
ICallback GlobalCallback
Gets or sets a Callback object which handles progress and error messages of the Shapefile class.
Definition: Shapefile.cs:219
An interface for callback objects which can be used to return information about progress and errors.
Definition: GlobalCallback.cs:34
void Error(string keyOfSender, string errorMsg)
A function to report the information about an error.
void Progress(string keyOfSender, int percent, string message)
A function to report the information about progress of the task.
Examples
CreateBuffer.cs.

Member Function Documentation

◆ Error()

void ICallback.Error ( string  keyOfSender,
string  errorMsg 
)

A function to report the information about an error.

Parameters
keyOfSenderThe key associated with the object in which error took place.
errorMsgThe description of the error.

◆ Progress()

void ICallback.Progress ( string  keyOfSender,
int  percent,
string  message 
)

A function to report the information about progress of the task.

Parameters
keyOfSenderThe key associated with the object in which error took place.
percentThe percent of completion (from 0 to 100).
messageThe information about the task being executed.