Skip to content

Commit

Permalink
Fix typos in comments and test code (#3483)
Browse files Browse the repository at this point in the history
  • Loading branch information
304NotModified committed Jun 13, 2019
1 parent 6c8a16f commit c0175fc
Show file tree
Hide file tree
Showing 50 changed files with 123 additions and 117 deletions.
8 changes: 7 additions & 1 deletion src/NLog.sln.DotSettings
Expand Up @@ -7,4 +7,10 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantToStringCall/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EOF/@EntryIndexedValue">EOF</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GDC/@EntryIndexedValue">GDC</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MDC/@EntryIndexedValue">MDC</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MDC/@EntryIndexedValue">MDC</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=MDLC/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=NDLC/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=precalculate/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Renderers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=serialisation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=suppressions/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
2 changes: 1 addition & 1 deletion src/NLog/Annotations.cs
Expand Up @@ -208,7 +208,7 @@ public NotifyPropertyChangedInvocatorAttribute([NotNull] string parameterName)
/// </list>
/// If method has single input parameter, it's name could be omitted.<br/>
/// Using <c>halt</c> (or <c>void</c>/<c>nothing</c>, which is the same) for method output
/// means that the methos doesn't return normally (throws or terminates the process).<br/>
/// means that the methods doesn't return normally (throws or terminates the process).<br/>
/// Value <c>canbenull</c> is only applicable for output parameters.<br/>
/// You can use multiple <c>[ContractAnnotation]</c> for each FDT row, or use single attribute
/// with rows separated by semicolon. There is no notion of order rows, all rows are checked
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Common/InternalLogger.cs
Expand Up @@ -452,7 +452,7 @@ private static void WriteToErrorConsole(string message)
/// <param name="message">A message to write.</param>
/// <remarks>
/// Works when property <see cref="LogToTrace"/> set to true.
/// The <see cref="System.Diagnostics.Trace"/> is used in Debug and Relese configuration.
/// The <see cref="System.Diagnostics.Trace"/> is used in Debug and Relaese configuration.
/// The <see cref="System.Diagnostics.Debug"/> works only in Debug configuration and this is reason why is replaced by <see cref="System.Diagnostics.Trace"/>.
/// in DEBUG
/// </remarks>
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Conditions/ConditionRelationalExpression.cs
Expand Up @@ -177,7 +177,7 @@ private static void PromoteTypes(ref object leftValue, ref object rightValue)
}

/// <summary>
/// Promoto <paramref name="val"/> to type
/// Promotes <paramref name="val"/> to type
/// </summary>
/// <param name="val"></param>
/// <param name="type1"></param>
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Config/ConfigurationItemFactory.cs
Expand Up @@ -317,7 +317,7 @@ private void CallPreload(Type type)
var parameters = CreatePreloadParameters(preloadMethod, this);

preloadMethod.Invoke(null, parameters);
InternalLogger.Debug("Preload succesfully invoked for '{0}'", type.FullName);
InternalLogger.Debug("Preload successfully invoked for '{0}'", type.FullName);
}
catch (Exception e)
{
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Config/ExceptionRenderingFormat.cs
Expand Up @@ -34,7 +34,7 @@
namespace NLog.Config
{
/// <summary>
/// Format of the excpetion output to the specific target.
/// Format of the exception output to the specific target.
/// </summary>
public enum ExceptionRenderingFormat
{
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Config/Factory.cs
Expand Up @@ -249,7 +249,7 @@ public void RegisterFuncLayout(string name, FuncLayoutRenderer renderer)
/// <returns>True if instance was created successfully, false otherwise.</returns>
public override bool TryCreateInstance(string itemName, out LayoutRenderer result)
{
//first try func renderers, as they should have the possiblity to overwrite a current one.
//first try func renderers, as they should have the possibility to overwrite a current one.
if (_funcRenderers != null)
{
FuncLayoutRenderer funcResult;
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Config/LoggerNameMatcher.cs
Expand Up @@ -236,7 +236,7 @@ public override bool NameMatches(string loggerName)
/// <summary>
/// Defines a <see cref="LoggerNameMatcher"/> that matches with a complex wildcards combinations:
/// <list type="bullet">
/// <item>'*' means zero or more occurrecnces of any character</item>
/// <item>'*' means zero or more occurrences of any character</item>
/// <item>'?' means exactly one occurrence of any character</item>
/// </list>
/// used when pattern is a string containing any number of '?' or '*' in any position
Expand Down
4 changes: 2 additions & 2 deletions src/NLog/Config/XmlLoggingConfiguration.cs
Expand Up @@ -125,7 +125,7 @@ private static XmlReader CreateFileReader(string fileName)
{
fileName = fileName.Trim();
#if __ANDROID__
//suport loading config from special assets folder in nlog.config
//support loading config from special assets folder in nlog.config
if (fileName.StartsWith(AssetsPrefix, StringComparison.OrdinalIgnoreCase))
{
//remove prefix
Expand Down Expand Up @@ -597,7 +597,7 @@ private void ConfigureFromFilesByMask(string baseDirectory, string fileMask, boo
#endif
foreach (var file in files)
{
//note we exclude ourself in ConfigureFromFile
//note we exclude our self in ConfigureFromFile
ConfigureFromFile(file, autoReloadDefault);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/NLog/Internal/FileAppenders/BaseFileAppender.cs
Expand Up @@ -92,7 +92,7 @@ internal set
public DateTime CreationTimeSource { get; private set; }

/// <summary>
/// Gets the last time the file associated with the appeander is opened. The time returned is in Coordinated
/// Gets the last time the file associated with the appender is opened. The time returned is in Coordinated
/// Universal Time [UTC] standard.
/// </summary>
/// <returns>The time the file was last opened.</returns>
Expand Down Expand Up @@ -133,7 +133,7 @@ public void Write(byte[] bytes)
public abstract DateTime? GetFileCreationTimeUtc();

/// <summary>
/// Gets the length in bytes of the file associated with the appeander.
/// Gets the length in bytes of the file associated with the appender.
/// </summary>
/// <returns>A long value representing the length of the file in bytes.</returns>
public abstract long? GetFileLength();
Expand Down
Expand Up @@ -117,7 +117,7 @@ public override void Flush()
}

/// <summary>
/// Gets the length in bytes of the file associated with the appeander.
/// Gets the length in bytes of the file associated with the appender.
/// </summary>
/// <returns>A long value representing the length of the file in bytes.</returns>
public override long? GetFileLength()
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Internal/FileAppenders/FileAppenderCache.cs
Expand Up @@ -339,7 +339,7 @@ public void CloseAppenders(string reason)
}

/// <summary>
/// Close the allocated appenders initialised before the supplied time.
/// Close the allocated appenders initialized before the supplied time.
/// </summary>
/// <param name="expireTime">The time which prior the appenders considered expired</param>
public void CloseAppenders(DateTime expireTime)
Expand Down
Expand Up @@ -193,7 +193,7 @@ public override void Flush()
}

/// <summary>
/// Gets the length in bytes of the file associated with the appeander.
/// Gets the length in bytes of the file associated with the appender.
/// </summary>
/// <returns>A long value representing the length of the file in bytes.</returns>
public override long? GetFileLength()
Expand Down
Expand Up @@ -102,7 +102,7 @@ public override void Close()
}

/// <summary>
/// Gets the length in bytes of the file associated with the appeander.
/// Gets the length in bytes of the file associated with the appender.
/// </summary>
/// <returns>A long value representing the length of the file in bytes.</returns>
public override long? GetFileLength()
Expand Down
Expand Up @@ -137,7 +137,7 @@ public override void Close()
}

/// <summary>
/// Gets the length in bytes of the file associated with the appeander.
/// Gets the length in bytes of the file associated with the appender.
/// </summary>
/// <returns>A long value representing the length of the file in bytes.</returns>
public override long? GetFileLength()
Expand Down
Expand Up @@ -183,7 +183,7 @@ public override void Close()
}

/// <summary>
/// Gets the length in bytes of the file associated with the appeander.
/// Gets the length in bytes of the file associated with the appender.
/// </summary>
/// <returns>A long value representing the length of the file in bytes.</returns>
public override long? GetFileLength()
Expand Down
Expand Up @@ -204,7 +204,7 @@ public override void Flush()
}

/// <summary>
/// Gets the length in bytes of the file associated with the appeander.
/// Gets the length in bytes of the file associated with the appender.
/// </summary>
/// <returns>A long value representing the length of the file in bytes.</returns>
public override long? GetFileLength()
Expand Down
4 changes: 2 additions & 2 deletions src/NLog/Internal/LayoutHelpers-generated.cs
Expand Up @@ -67,7 +67,7 @@ public static short RenderShort(this Layout layout, LogEventInfo logEvent, short
short result;

// NumberStyles.Integer is default of Convert.ToInt16
// CultureInfo.InvariantCulture is backwardscomp.
// CultureInfo.InvariantCulture is backwards-compatible.
if (!short.TryParse(rendered, NumberStyles.Integer, CultureInfo.InvariantCulture, out result))
{
InternalLogger.Warn(layoutName + ": parse of value '" + rendered + "' failed, return " + defaultValue);
Expand Down Expand Up @@ -101,7 +101,7 @@ public static int RenderInt(this Layout layout, LogEventInfo logEvent, int defau
int result;

// NumberStyles.Integer is default of Convert.ToInt16
// CultureInfo.InvariantCulture is backwardscomp.
// CultureInfo.InvariantCulture is backwards-compatibility.
if (!int.TryParse(rendered, NumberStyles.Integer, CultureInfo.InvariantCulture, out result))
{
InternalLogger.Warn(layoutName + ": parse of value '" + rendered + "' failed, return " + defaultValue);
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Internal/NetworkSenders/HttpNetworkSender.cs
Expand Up @@ -76,7 +76,7 @@ protected override void DoSend(byte[] bytes, int offset, int length, AsyncContin
{
using (var response = webRequest.EndGetResponse(r))
{
// Response succesfully read
// Response successfully read
}
// completed fine
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Internal/StringBuilderExt.cs
Expand Up @@ -332,7 +332,7 @@ internal static void Append4DigitsZeroPadded(this StringBuilder builder, int num
}

/// <summary>
/// Apend a int type (byte, int) as string
/// Append a int type (byte, int) as string
/// </summary>
internal static void AppendIntegerAsString(this StringBuilder sb, IConvertible value, TypeCode objTypeCode)
{
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Internal/XmlHelper.cs
Expand Up @@ -214,7 +214,7 @@ internal static string XmlConvertToElementName(string xmlElementName, bool allow
bool includeChr = false;
switch (chr)
{
case ':': // namespace-delimeter
case ':': // namespace-delimiter
if (i != 0 && allowNamespace)
{
allowNamespace = false;
Expand Down
4 changes: 2 additions & 2 deletions src/NLog/LayoutRenderers/LayoutRenderer.cs
Expand Up @@ -258,7 +258,7 @@ public static void Register<T>(string name)
/// <summary>
/// Register a custom layout renderer.
/// </summary>
/// <remarks>Short-cut for registing to default <see cref="ConfigurationItemFactory"/></remarks>
/// <remarks>Short-cut for registering to default <see cref="ConfigurationItemFactory"/></remarks>
/// <param name="layoutRendererType"> Type of the layout renderer.</param>
/// <param name="name"> Name of the layout renderer - without ${}.</param>
public static void Register(string name, Type layoutRendererType)
Expand All @@ -268,7 +268,7 @@ public static void Register(string name, Type layoutRendererType)
}

/// <summary>
/// Register a custom layout renderer with a callback function <paramref name="func"/>. The callback recieves the logEvent.
/// Register a custom layout renderer with a callback function <paramref name="func"/>. The callback receives the logEvent.
/// </summary>
/// <param name="name">Name of the layout renderer - without ${}.</param>
/// <param name="func">Callback that returns the value for the layout renderer.</param>
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/LayoutRenderers/RegistryLayoutRenderer.cs
Expand Up @@ -73,7 +73,7 @@ public RegistryLayoutRenderer()
public Layout DefaultValue { get; set; }

/// <summary>
/// Require escaping backward slashes in <see cref="DefaultValue"/>. Need to be backwardscompatible.
/// Require escaping backward slashes in <see cref="DefaultValue"/>. Need to be backwards-compatible.
///
/// When true:
///
Expand Down
Expand Up @@ -66,7 +66,7 @@ public XmlEncodeLayoutRendererWrapper()
public bool XmlEncode { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to tranform newlines (\r\n) into (&#13;&#10;)
/// Gets or sets a value indicating whether to transform newlines (\r\n) into (&#13;&#10;)
/// </summary>
/// <docgen category="Transformation Options" order="10"/>
[DefaultValue(false)]
Expand Down
8 changes: 4 additions & 4 deletions src/NLog/Layouts/Layout.cs
Expand Up @@ -118,7 +118,7 @@ public static Layout FromString(string layoutText, ConfigurationItemFactory conf
/// Precalculates the layout for the specified log event and stores the result
/// in per-log event cache.
///
/// Only if the layout doesn't have [ThreadAgnostic] and doens't contain layouts with [ThreadAgnostic].
/// Only if the layout doesn't have [ThreadAgnostic] and doesn't contain layouts with [ThreadAgnostic].
/// </summary>
/// <param name="logEvent">The log event.</param>
/// <remarks>
Expand Down Expand Up @@ -291,7 +291,7 @@ internal void PerformObjectScanning()
MutableUnsafe = objectGraphScannerList.Any(item => item.GetType().IsDefined(typeof(MutableUnsafeAttribute), true));

// determine the max StackTraceUsage, to decide if Logger needs to capture callsite
StackTraceUsage = StackTraceUsage.None; // Incase this Layout should implement IUsesStackTrace
StackTraceUsage = StackTraceUsage.None; // In case this Layout should implement IUsesStackTrace
StackTraceUsage = objectGraphScannerList.OfType<IUsesStackTrace>().DefaultIfEmpty().Max(item => item?.StackTraceUsage ?? StackTraceUsage.None);

_scannedForObjects = true;
Expand Down Expand Up @@ -335,7 +335,7 @@ protected virtual void CloseLayout()
/// <summary>
/// Register a custom Layout.
/// </summary>
/// <remarks>Short-cut for registing to default <see cref="ConfigurationItemFactory"/></remarks>
/// <remarks>Short-cut for registering to default <see cref="ConfigurationItemFactory"/></remarks>
/// <typeparam name="T"> Type of the Layout.</typeparam>
/// <param name="name"> Name of the Layout.</param>
public static void Register<T>(string name)
Expand All @@ -348,7 +348,7 @@ public static void Register<T>(string name)
/// <summary>
/// Register a custom Layout.
/// </summary>
/// <remarks>Short-cut for registing to default <see cref="ConfigurationItemFactory"/></remarks>
/// <remarks>Short-cut for registering to default <see cref="ConfigurationItemFactory"/></remarks>
/// <param name="layoutType"> Type of the Layout.</param>
/// <param name="name"> Name of the Layout.</param>
public static void Register(string name, Type layoutType)
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/Layouts/LayoutParser.cs
Expand Up @@ -78,7 +78,7 @@ internal static LayoutRenderer[] CompileLayout(ConfigurationItemFactory configur
}
else
{
//dont treat \ as escape char and just read it
//don't treat \ as escape char and just read it
literalBuf.Append('\\');
}
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/LogManager.cs
Expand Up @@ -105,7 +105,7 @@ public static bool ThrowExceptions
/// </summary>
/// <value>A value of <c>true</c> if exception should be thrown; otherwise, <c>false</c>.</value>
/// <remarks>
/// This option is for backwards-compatiblity.
/// This option is for backwards-compatibility.
/// By default exceptions are not thrown under any circumstances.
///
/// </remarks>
Expand Down
2 changes: 1 addition & 1 deletion src/NLog/MessageTemplates/ValueFormatter.cs
Expand Up @@ -42,7 +42,7 @@
namespace NLog.MessageTemplates
{
/// <summary>
/// Convert Render or serialize a value, with optionnally backwardscompatible with <see cref="string.Format(System.IFormatProvider,string,object[])"/>
/// Convert Render or serialize a value, with optionally backwards-compatible with <see cref="string.Format(System.IFormatProvider,string,object[])"/>
/// </summary>
internal class ValueFormatter : IValueFormatter
{
Expand Down
4 changes: 2 additions & 2 deletions src/NLog/Targets/AsyncTaskTarget.cs
Expand Up @@ -364,7 +364,7 @@ protected override void Dispose(bool disposing)
/// <summary>
/// Checks the internal queue for the next <see cref="LogEventInfo"/> to create a new task for
/// </summary>
/// <param name="previousTask">Used for race-condition validation betweewn task-completion and timeout</param>
/// <param name="previousTask">Used for race-condition validation between task-completion and timeout</param>
/// <param name="fullBatchCompleted">Signals whether previousTask completed an almost full BatchSize</param>
private void TaskStartNext(object previousTask, bool fullBatchCompleted)
{
Expand Down Expand Up @@ -589,7 +589,7 @@ private void NotifyTaskCompletion(IList<AsyncContinuation> reusableContinuations
}

/// <summary>
/// Handles that scheduled task has completed (succesfully or failed), and starts the next pending task
/// Handles that scheduled task has completed (successfully or failed), and starts the next pending task
/// </summary>
/// <param name="completedTask">Task just completed</param>
/// <param name="continuation">AsyncContinuation to notify of success or failure</param>
Expand Down

0 comments on commit c0175fc

Please sign in to comment.