| INativeContentStreamMessageReporterReportMessage Method (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.
Namespace: Sdl.FileTypeSupport.Framework.NativeApiAssembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2551.0)
Syntaxvoid ReportMessage(
Object source,
string origin,
ErrorLevel level,
string message,
LocationMarkerId fromLocation,
LocationMarkerId uptoLocation
)
Sub ReportMessage (
source As Object,
origin As String,
level As ErrorLevel,
message As String,
fromLocation As LocationMarkerId,
uptoLocation As LocationMarkerId
)
void ReportMessage(
Object^ source,
String^ origin,
ErrorLevel level,
String^ message,
LocationMarkerId^ fromLocation,
LocationMarkerId^ uptoLocation
)
abstract ReportMessage :
source : Object *
origin : string *
level : ErrorLevel *
message : string *
fromLocation : LocationMarkerId *
uptoLocation : LocationMarkerId -> unit
Parameters
- source
- Type: SystemObject
The component from which the message originates. Components typically pass this for this parameter. - origin
- Type: SystemString
The description of the action/component from which this message originated. - level
- Type: Sdl.FileTypeSupport.Framework.NativeApiErrorLevel
Severity of the message - message
- Type: SystemString
The actual message text - fromLocation
- Type: Sdl.FileTypeSupport.Framework.NativeApiLocationMarkerId
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. - uptoLocation
- Type: Sdl.FileTypeSupport.Framework.NativeApiLocationMarkerId
The end of the content location that the message refers to. May be null or the
same as the fromLocation, in which case the message is interpreted to refer to a single location,
and not a range of content.
Remarks
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);
}
See Also
Comments