Skip to content

Commit

Permalink
chore: clear code
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKonstantinSh committed May 26, 2020
1 parent d3de3b1 commit aea8794
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions OpenScreen.Core/Mjpeg/MjpegWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public MjpegWriter(Stream stream)
/// </summary>
public void WriteHeaders()
{
var headers = Encoding.ASCII.GetBytes(MjpegConstants.ResponseHeaders);
byte[] headers = Encoding.ASCII.GetBytes(MjpegConstants.ResponseHeaders);

const int offset = 0;
_stream.Write(headers, offset, headers.Length);
Expand All @@ -39,15 +39,15 @@ public void WriteHeaders()
/// <param name="imageStream">Stream of images.</param>
public void WriteImage(MemoryStream imageStream)
{
var headers = Encoding.ASCII.GetBytes(
byte[] headers = Encoding.ASCII.GetBytes(
MjpegConstants.GetImageInfoHeaders(imageStream.Length));

const int offset = 0;
_stream.Write(headers, offset, headers.Length);

imageStream.WriteTo(_stream);

var endOfResponse = Encoding.ASCII.GetBytes(MjpegConstants.NewLine);
byte[] endOfResponse = Encoding.ASCII.GetBytes(MjpegConstants.NewLine);

_stream.Write(endOfResponse, offset, endOfResponse.Length);

Expand Down
3 changes: 1 addition & 2 deletions OpenScreen.Core/Screenshot/Screenshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static class Screenshot
var rawImage = new Bitmap(screenSize.Width, screenSize.Height);
var rawGraphics = Graphics.FromImage(rawImage);

var isNeedToScale = (screenSize != requiredSize);
bool isNeedToScale = screenSize != requiredSize;

var image = rawImage;
var graphics = rawGraphics;
Expand Down Expand Up @@ -58,7 +58,6 @@ public static class Screenshot

yield return image;
}
// ReSharper disable once IteratorNeverReturns
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion OpenScreen.Core/Screenshot/WinFeatures/MouseCursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace OpenScreen.Core.Screenshot.WinFeatures
/// <summary>
/// Class for working with the mouse cursor.
///
/// Details of the CURSORINFO structure:
/// Details of the CursorInfo structure:
/// https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-cursorinfo
///
/// Details of the GetCursorInfo method:
Expand Down
3 changes: 3 additions & 0 deletions OpenScreen.Core/Screenshot/WinFeatures/RunningApplications.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

namespace OpenScreen.Core.Screenshot.WinFeatures
{
/// <summary>
/// Provides information about running applications that you can stream.
/// </summary>
public static class RunningApplications
{
private const int GwlStyle = -16; // Sets a new window style.
Expand Down

0 comments on commit aea8794

Please sign in to comment.