Add XML docs to core packages

This commit is contained in:
SteveSandersonMS
2016-11-29 16:03:15 +00:00
parent 3b91ad9b39
commit 3ff4447924
24 changed files with 448 additions and 10 deletions

View File

@@ -3,19 +3,31 @@ using System.IO;
namespace Microsoft.AspNetCore.NodeServices
{
// Makes it easier to pass script files to Node in a way that's sure to clean up after the process exits
/// <summary>
/// Makes it easier to pass script files to Node in a way that's sure to clean up after the process exits.
/// </summary>
public sealed class StringAsTempFile : IDisposable
{
private bool _disposedValue;
/// <summary>
/// Create a new instance of <see cref="StringAsTempFile"/>.
/// </summary>
/// <param name="content">The contents of the temporary file to be created.</param>
public StringAsTempFile(string content)
{
FileName = Path.GetTempFileName();
File.WriteAllText(FileName, content);
}
/// <summary>
/// Specifies the filename of the temporary file.
/// </summary>
public string FileName { get; }
/// <summary>
/// Disposes the instance and deletes the associated temporary file.
/// </summary>
public void Dispose()
{
DisposeImpl(true);
@@ -37,6 +49,9 @@ namespace Microsoft.AspNetCore.NodeServices
}
}
/// <summary>
/// Implements the finalization part of the IDisposable pattern by calling Dispose(false).
/// </summary>
~StringAsTempFile()
{
DisposeImpl(false);