TaskLoggingHelper.LogWarningFromResources Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Logs a warning using the specified resource string.
Overloads
LogWarningFromResources(String, Object[]) |
Logs a warning using the specified resource string. Thread safe. |
LogWarningFromResources(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[]) |
Logs a warning using the specified resource string and other warning details. Thread safe. |
LogWarningFromResources(String, Object[])
- Source:
- TaskLoggingHelper.cs
Logs a warning using the specified resource string. Thread safe.
public:
void LogWarningFromResources(System::String ^ messageResourceName, ... cli::array <System::Object ^> ^ messageArgs);
public void LogWarningFromResources (string messageResourceName, params object[] messageArgs);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public void LogWarningFromResources (string messageResourceName, params object[] messageArgs);
member this.LogWarningFromResources : string * obj[] -> unit
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.LogWarningFromResources : string * obj[] -> unit
Public Sub LogWarningFromResources (messageResourceName As String, ParamArray messageArgs As Object())
Parameters
- messageResourceName
- String
The name of the string resource to load.
- messageArgs
- Object[]
Optional arguments for formatting the loaded string.
- Attributes
Exceptions
Thrown when messageResourceName
is null.
Remarks
This method is not thread-safe.
Applies to
LogWarningFromResources(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])
- Source:
- TaskLoggingHelper.cs
Logs a warning using the specified resource string and other warning details. Thread safe.
public:
void LogWarningFromResources(System::String ^ subcategoryResourceName, System::String ^ warningCode, System::String ^ helpKeyword, System::String ^ file, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber, System::String ^ messageResourceName, ... cli::array <System::Object ^> ^ messageArgs);
public void LogWarningFromResources (string subcategoryResourceName, string warningCode, string helpKeyword, string file, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber, string messageResourceName, params object[] messageArgs);
member this.LogWarningFromResources : string * string * string * string * int * int * int * int * string * obj[] -> unit
Public Sub LogWarningFromResources (subcategoryResourceName As String, warningCode As String, helpKeyword As String, file As String, lineNumber As Integer, columnNumber As Integer, endLineNumber As Integer, endColumnNumber As Integer, messageResourceName As String, ParamArray messageArgs As Object())
Parameters
- subcategoryResourceName
- String
The name of the string resource that describes the warning type (can be null).
- warningCode
- String
The warning code (can be null).
- helpKeyword
- String
The help keyword for the host IDE (can be null).
- file
- String
The path to the file causing the warning (can be null).
- lineNumber
- Int32
The line in the file causing the warning (set to zero if not available).
- columnNumber
- Int32
The column in the file causing the warning (set to zero if not available).
- endLineNumber
- Int32
The last line of a range of lines in the file causing the warning (set to zero if not available).
- endColumnNumber
- Int32
The last column of a range of columns in the file causing the warning (set to zero if not available).
- messageResourceName
- String
The name of the string resource containing the warning message.
- messageArgs
- Object[]
Optional arguments for formatting the loaded string.
Exceptions
Thrown when messageResourceName
is null.
Remarks
The parameters subCategoryResourceName
, warningCode
, helpKeyword
, and file
can be null
.
The parameters lineNumber
, columnNumber
, endLineNumber
, and endColumnNumber
should be set to 0 if they are not available.