X Tutup
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public class InvokeRestMethodCommand : WebRequestPSCmdlet
[Parameter(ParameterSetName = "StandardMethodNoProxy")]
public override WebRequestMethod Method
{
get { return base.Method; }
get => base.Method;

set { base.Method = value; }
set => base.Method = value;
}

/// <summary>
Expand All @@ -46,9 +46,9 @@ public override WebRequestMethod Method
[ValidateNotNullOrEmpty]
public override string CustomMethod
{
get { return base.CustomMethod; }
get => base.CustomMethod;

set { base.CustomMethod = value; }
set => base.CustomMethod = value;
}

/// <summary>
Expand All @@ -58,9 +58,9 @@ public override string CustomMethod
[Alias("FL")]
public SwitchParameter FollowRelLink
{
get { return base._followRelLink; }
get => base._followRelLink;

set { base._followRelLink = value; }
set => base._followRelLink = value;
}

/// <summary>
Expand All @@ -71,9 +71,9 @@ public SwitchParameter FollowRelLink
[ValidateRange(1, int.MaxValue)]
public int MaximumFollowRelLink
{
get { return base._maximumFollowRelLink; }
get => base._maximumFollowRelLink;

set { base._maximumFollowRelLink = value; }
set => base._maximumFollowRelLink = value;
}

/// <summary>
Expand Down Expand Up @@ -401,27 +401,23 @@ public override void Flush()
_streamBuffer.SetLength(0);
}

public override long Length
{
get { return _length; }
}
public override long Length => _length;

private long _length;

public override long Position
{
get { return _streamBuffer.Position; }
get => _streamBuffer.Position;

set { _streamBuffer.Position = value; }
set => _streamBuffer.Position = value;
}

public override int Read(byte[] buffer, int offset, int count)
{
long previousPosition = Position;
bool consumedStream = false;
int totalCount = count;
while ((!consumedStream) &&
((Position + totalCount) > _streamBuffer.Length))
while (!consumedStream && (Position + totalCount) > _streamBuffer.Length)
{
// If we don't have enough data to fill this from memory, cache more.
// We try to read 4096 bytes from base stream every time, so at most we
Expand Down
X Tutup