Skip to content

Commit

Permalink
[wip] Enable use of APIs using PCSTR/PCWSTR on net35
Browse files Browse the repository at this point in the history
  • Loading branch information
jnm2 committed Oct 9, 2021
1 parent c9df035 commit 163a6a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions src/Microsoft.Windows.CsWin32/templates/PCSTR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,5 @@ internal int Length
/// <returns>A <see langword="string"/>, or <see langword="null"/> if <see cref="Value"/> is <see langword="null"/>.</returns>
public override string ToString() => this.Value is null ? null : new string((sbyte*)this.Value, 0, this.Length, global::System.Text.Encoding.UTF8);

/// <summary>
/// Returns a span of the characters in this string.
/// </summary>
internal ReadOnlySpan<byte> AsSpan() => this.Value is null ? default(ReadOnlySpan<byte>) : new ReadOnlySpan<byte>(this.Value, this.Length);

private string DebuggerDisplay => this.ToString();
}
5 changes: 0 additions & 5 deletions src/Microsoft.Windows.CsWin32/templates/PCWSTR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,5 @@ internal int Length
/// <returns>A <see langword="string"/>, or <see langword="null"/> if <see cref="Value"/> is <see langword="null"/>.</returns>
public override string ToString() => this.Value is null ? null : new string(this.Value);

/// <summary>
/// Returns a span of the characters in this string.
/// </summary>
internal ReadOnlySpan<char> AsSpan() => this.Value is null ? default(ReadOnlySpan<char>) : new ReadOnlySpan<char>(this.Value, this.Length);

private string DebuggerDisplay => this.ToString();
}

0 comments on commit 163a6a7

Please sign in to comment.