GPPointFileInfo\GPMessages.vb
Creating a non-trival custom GP tool - inputs, outputs, and responding to environment settings
GPPointFileInfo\GPMessages.vb
' Copyright 2008 ESRI
' 
' All rights reserved under the copyright laws of the United States
' and applicable international laws, treaties, and conventions.
' 
' You may freely redistribute and use this sample code, with or
' without modification, provided you include the original copyright
' notice and use restrictions.
' 
' See use restrictions at <your ArcGIS install location>/developerkit/userestrictions.txt.
' 

Imports Microsoft.VisualBasic
Imports System
Namespace GPPointFileInfo
  Public Class GPMessages
        Implements GPPointFileInfo.IGPMessages
    Private _gpMessages As ESRI.ArcGIS.Geodatabase.IGPMessages

    Public Sub New(ByVal gpMessages As ESRI.ArcGIS.Geodatabase.IGPMessages)
      _gpMessages = gpMessages
    End Sub

        Public Sub AddInfo(ByVal message As String) Implements IGPMessages.AddInfo
            _gpMessages.AddMessage(message)
        End Sub

        Public Sub AddWarn(ByVal message As String) Implements IGPMessages.AddWarn
            _gpMessages.AddWarning(message)
        End Sub

        Public Sub AddError(ByVal message As String) Implements IGPMessages.AddError
            Const DefaultCode As Integer = 1

            _gpMessages.AddError(DefaultCode, message)
        End Sub

        Public Sub AddFatal(ByVal message As String) Implements IGPMessages.AddFatal
            _gpMessages.AddAbort(message)
        End Sub
  End Class
End Namespace