C# Класс Microsoft.Cci.ErrorMessage

Наследование: ISourceErrorMessage
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ObjectInvariant void

Открытые методы

Метод Описание
MakeShallowCopy ( ISourceDocument targetDocument ) : ISourceErrorMessage

Makes a copy of this error message, changing only Location and SourceLocation to come from the given source document. Returns the same instance if the given source document is the same as this.SourceLocation.SourceDocument.

Защищенные методы

Метод Описание
ErrorMessage ( ISourceLocation sourceLocation, long errorCode, string messageKey ) : System

Initializes an object providing error information relating to a portion of a source document.

ErrorMessage ( ISourceLocation sourceLocation, long errorCode, string messageKey, IEnumerable relatedLocations ) : System

Initializes an object providing error information relating to a portion of a source document.

GetMessage ( System rm ) : string

Obtains a localized message from the given resource manager and formats it using the message arguments associated with this error message. If no localized message corresponds to the message key of this message, the invariant culture is used. If no message corresponding to this error can be found then the message key itself is returned.

MessageArguments ( ) : string[]

Zero or more strings that are to be subsituted for "{i}" sequences in the message string return by GetMessage.

Приватные методы

Метод Описание
ObjectInvariant ( ) : void

Описание методов

ErrorMessage() защищенный Метод

Initializes an object providing error information relating to a portion of a source document.
protected ErrorMessage ( ISourceLocation sourceLocation, long errorCode, string messageKey ) : System
sourceLocation ISourceLocation The location of the error in the source document.
errorCode long A code that corresponds to this error. This code is the same for all cultures.
messageKey string A string that is used as the key when looking for the localized error message using a resource manager.
Результат System

ErrorMessage() защищенный Метод

Initializes an object providing error information relating to a portion of a source document.
protected ErrorMessage ( ISourceLocation sourceLocation, long errorCode, string messageKey, IEnumerable relatedLocations ) : System
sourceLocation ISourceLocation The location of the error in the source document.
errorCode long A code that corresponds to this error. This code is the same for all cultures.
messageKey string A string that is used as the key when looking for the localized error message using a resource manager.
relatedLocations IEnumerable Zero ore more locations that are related to this error.
Результат System

GetMessage() защищенный Метод

Obtains a localized message from the given resource manager and formats it using the message arguments associated with this error message. If no localized message corresponds to the message key of this message, the invariant culture is used. If no message corresponding to this error can be found then the message key itself is returned.
protected GetMessage ( System rm ) : string
rm System A resource manager corresponding to the current locale.
Результат string

MakeShallowCopy() публичный абстрактный Метод

Makes a copy of this error message, changing only Location and SourceLocation to come from the given source document. Returns the same instance if the given source document is the same as this.SourceLocation.SourceDocument.
public abstract MakeShallowCopy ( ISourceDocument targetDocument ) : ISourceErrorMessage
targetDocument ISourceDocument The document to which the resulting error message must refer.
Результат ISourceErrorMessage

MessageArguments() защищенный Метод

Zero or more strings that are to be subsituted for "{i}" sequences in the message string return by GetMessage.
protected MessageArguments ( ) : string[]
Результат string[]