-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Push Microsoft.Diagnostics.NETCore.Client to release branch (#705)
* Microsoft.Diagnostics.NETCore.Client Implementation (#617) This is the initial implementation of Microsoft.Diagnostics.NETCore.Client library. This will be released with version 1.0.0-preview, and when I feel that enough customers have validated it that we can match it with the rest of the diagnostics OOB packages and bump up the version to 3.1. * add .NET Standard 2.0 for diagnostics client library (#700) * Make MultiplePublishedProcessTest more stable (#701) * Make MultiplePublishedProcessTest more stable * Bump up DiagnosticsClient library version to 0.2.0 (#704)
- Loading branch information
Showing
44 changed files
with
1,749 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/Microsoft.Diagnostics.NETCore.Client/BinaryWriterExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.IO; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
|
||
namespace Microsoft.Diagnostics.NETCore.Client | ||
{ | ||
internal static class BinaryWriterExtensions | ||
{ | ||
public static void WriteString(this BinaryWriter @this, string value) | ||
{ | ||
if (@this == null) | ||
throw new ArgumentNullException(nameof(@this)); | ||
|
||
@this.Write(value != null ? (value.Length + 1) : 0); | ||
if (value != null) | ||
@this.Write(Encoding.Unicode.GetBytes(value + '\0')); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.