Search Results for

    Show / Hide Table of Contents

    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).

    Inherited Members
    IBasicMessageReporter.ReportMessage(object, string, ErrorLevel, string, string)
    Namespace: Sdl.FileTypeSupport.Framework.NativeApi
    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 this for this parameter.

    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 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.

    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);
    }
    In this article
    • Methods
      • ReportMessage(object, string, ErrorLevel, string, LocationMarkerId, LocationMarkerId)
    Back to top Generated by DocFX