Interface INativeContentStreamMessageReporter
Message reporting mechanism intended for native content processors. Allows explicit locations to be associated with messages. The corresponding locations should be output on the native content stream through calls to LocationMark(LocationMarkerId).
Namespace: SdlSdl.FileTypeSupportFrameworkNativeApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface INativeContentStreamMessageReporter : IBasicMessageReporter
Methods
ReportMessage(object, string, ErrorLevel, string, LocationMarkerId, LocationMarkerId)
Used by native content processors to report a non-critical issue with an associated range or location identified by location marker ids passed around through LocationMark(LocationMarkerId) calls in the native content stream.
Declaration
void ReportMessage(object source, string origin, ErrorLevel level, string message, LocationMarkerId fromLocation, LocationMarkerId uptoLocation)
Parameters
Type | Name | Description |
---|---|---|
object | source | The component from which the message originates. Components typically pass |
string | origin | The description of the action/component from which this message originated. |
ErrorLevel | level | Severity of the message |
string | message | The actual message text |
LocationMarkerId | fromLocation | The start of the content location that the location the message refers to. Native content processors normally create a new location marker, and insert it into the content stream. |
LocationMarkerId | uptoLocation | The end of the content location that the message refers to. May be |
Examples
The following code shows an example of how to report a message with a location from a native content processor:
void ReportWarning(string message)
{
LocationMarkerId location = new LocationMarkerId();
Output.LocationMark(location);
MessageReporter.ReportMessage(this, "Origin of error", ErrorLevel.Warning, message, location, null);
}