
|
If you were logged in you would be able to see more operations.
|
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
Imagine a logging framework method:
public void Log(LogLevel level, string message, params object[] formatItems)
{
Log(level, string.Format(message, formatItems);
}
I'd like to define my own attribute (much as NullableAttribute is supported) that specifies my method should receive the same analysis that string.Format() receives.
[StringFormatAnalysis]
public void Log(LogLevel level, string message, params object[] formatItems)
{
Log(level, string.Format(message, formatItems);
}
So calls like this would indicate warnings:
Log(LogLevel.Info, "Doing {0} {1} times", action);
Log(LogLevel.Info, "Entering {0}.", location, size);
|
|
Description
|
Imagine a logging framework method:
public void Log(LogLevel level, string message, params object[] formatItems)
{
Log(level, string.Format(message, formatItems);
}
I'd like to define my own attribute (much as NullableAttribute is supported) that specifies my method should receive the same analysis that string.Format() receives.
[StringFormatAnalysis]
public void Log(LogLevel level, string message, params object[] formatItems)
{
Log(level, string.Format(message, formatItems);
}
So calls like this would indicate warnings:
Log(LogLevel.Info, "Doing {0} {1} times", action);
Log(LogLevel.Info, "Entering {0}.", location, size); |
Show » |
| There are no comments yet on this issue.
|
|