Microsoft.Cci.MetadataHostEnvironment.ReportError C# (CSharp) Method

ReportError() public method

Raises the CompilationErrors event with the given error wrapped up in an error event arguments object. The event is raised on a separate thread.
public ReportError ( IErrorMessage error ) : void
error IErrorMessage The error to report.
return void
    public void ReportError(IErrorMessage error) {
      if (this.Errors != null) {
        List<IErrorMessage> errors = new List<IErrorMessage>(1);
        errors.Add(error);
        Microsoft.Cci.ErrorEventArgs errorEventArguments = new Microsoft.Cci.ErrorEventArgs(error.ErrorReporter, error.Location, errors.AsReadOnly());
        this.ReportErrors(errorEventArguments);
      }
    }