Skip to content

Commit

Permalink
Fix some comment typos (#101232)
Browse files Browse the repository at this point in the history
* Fix some comment typos

* Apply suggestions from code review

Co-authored-by: Huo Yaoyuan <[email protected]>

---------

Co-authored-by: Buyaa Namnan <[email protected]>
Co-authored-by: Huo Yaoyuan <[email protected]>
  • Loading branch information
3 people authored May 29, 2024
1 parent 21aa3b7 commit eaa10eb
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal static string NormalizeHostName(string? targetHost)
}
catch (ArgumentException) when (IsSafeDnsString(targetHost))
{
// Seems like name that does not confrom to IDN but apers somewhat valid according to original DNS rfc.
// Seems like name that does not conform to IDN but appears somewhat valid according to original DNS rfc.
}

return targetHost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ private WrappedStream OpenInWriteMode()
if (_everOpenedForWrite)
throw new IOException(SR.CreateModeWriteOnceAndOneEntryAtATime);

// we assume that if another entry grabbed the archive stream, that it set this entry's _everOpenedForWrite property to true by calling WriteLocalFileHeaderIfNeeed
// we assume that if another entry grabbed the archive stream, that it set this entry's _everOpenedForWrite property to true by calling WriteLocalFileHeaderAndDataIfNeeded
_archive.DebugAssertIsStillArchiveStreamOwner(this);

_everOpenedForWrite = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ private static unsafe string[] SegmentCommandLine(char* cmdLine)
// character is simply accepted. Fancier handling is not required
// because the program name must be a legal NTFS/HPFS file name.
// Note that the double-quote characters are not copied, nor do they
// contribyte to character_count.
// contribute to character_count.

bool inQuotes = false;
stringBuilder = new ValueStringBuilder(stringBuffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static string GetFullPath(string path)
if (PathInternal.IsEffectivelyEmpty(path.AsSpan()))
throw new ArgumentException(SR.Arg_PathEmpty, nameof(path));

// Embedded null characters are the only invalid character case we trully care about.
// Embedded null characters are the only invalid character case we truly care about.
// This is because the nulls will signal the end of the string to Win32 and therefore have
// unpredictable results.
if (path.Contains('\0'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace System.Runtime.InteropServices
/// <summary>
/// Constructs an instance from a 32-bit integer.
/// </summary>
/// <param name="value">The integer vaule.</param>
/// <param name="value">The integer value.</param>
public CLong(int value)
{
_value = (NativeType)value;
Expand All @@ -38,7 +38,7 @@ public CLong(int value)
/// <summary>
/// Constructs an instance from a native sized integer.
/// </summary>
/// <param name="value">The integer vaule.</param>
/// <param name="value">The integer value.</param>
/// <exception cref="OverflowException"><paramref name="value"/> is outside the range of the underlying storage type.</exception>
public CLong(nint value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace System.Runtime.InteropServices
/// <summary>
/// Constructs an instance from a 32-bit unsigned integer.
/// </summary>
/// <param name="value">The integer vaule.</param>
/// <param name="value">The integer value.</param>
public CULong(uint value)
{
_value = (NativeType)value;
Expand All @@ -38,7 +38,7 @@ public CULong(uint value)
/// <summary>
/// Constructs an instance from a native sized unsigned integer.
/// </summary>
/// <param name="value">The integer vaule.</param>
/// <param name="value">The integer value.</param>
/// <exception cref="OverflowException"><paramref name="value"/> is outside the range of the underlying storage type.</exception>
public CULong(nuint value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
** operations against a single handle at the same time or block their
** access to Close and Dispose unless you are very comfortable with the
** semantics of passing an invalid (or possibly invalidated and
** reallocated) to the unamanged routines you marshal your handle to
** reallocated) to the unmanaged routines you marshal your handle to
** (and the effects of closing such a handle while those calls are in
** progress). The runtime cannot protect you from undefined program
** behvior that might result from such scenarios. You have been warned.
** behavior that might result from such scenarios. You have been warned.
**
**
===========================================================*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace System.Runtime.InteropServices
{
// The enum of the return value of IQuerable.GetInterface
// The enum of the return value of ICustomQueryInterface.GetInterface
[EditorBrowsable(EditorBrowsableState.Never)]
public enum CustomQueryInterfaceResult
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace System.Runtime.InteropServices
public
#else
#pragma warning disable CS0436 // Type conflicts with imported type
// Some assemblies that target downlevel have InternalsVisibleTo to their test assembiles.
// Some assemblies that target downlevel have InternalsVisibleTo to their test assemblies.
// As this is only used in this repo and isn't a problem in shipping code,
// just disable the duplicate type warning.
internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ public static void StructureToPtr<T>([DisallowNull] T structure, IntPtr ptr, boo
}

/// <summary>
/// Creates a new instance of "structuretype" and marshals data from a
/// Creates a new instance of <paramref name="structureType"/> and marshals data from a
/// native memory block to it.
/// </summary>
[RequiresDynamicCode("Marshalling code for the object might not be available")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public static void SetDllImportResolver(Assembly assembly, DllImportResolver res
/// <param name="libraryName">The native library to load.</param>
/// <param name="assembly">The assembly trying load the native library.</param>
/// <param name="hasDllImportSearchPathFlags">If the pInvoke has DefaultDllImportSearchPathAttribute.</param>
/// <param name="dllImportSearchPathFlags">If hasdllImportSearchPathFlags is true, the flags in
/// <param name="dllImportSearchPathFlags">If <paramref name="hasDllImportSearchPathFlags"/> is true, the flags in
/// DefaultDllImportSearchPathAttribute; meaningless otherwise </param>
/// <returns>The handle for the loaded library on success. Null on failure.</returns>
internal static IntPtr LoadLibraryCallbackStub(string libraryName, Assembly assembly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace System.Runtime.InteropServices
enum StringMarshalling
{
/// <summary>
/// Indicates the user is suppling a specific marshaller in <see cref="LibraryImportAttribute.StringMarshallingCustomType"/>.
/// Indicates the user is supplying a specific marshaller in <see cref="LibraryImportAttribute.StringMarshallingCustomType"/>.
/// </summary>
Custom = 0,
/// <summary>
Expand Down

0 comments on commit eaa10eb

Please sign in to comment.