Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation the StringEncoder and StringDecoder and all them depen… #86

Merged
merged 1 commit into from
Apr 27, 2016
Merged

Implementation the StringEncoder and StringDecoder and all them depen… #86

merged 1 commit into from
Apr 27, 2016

Conversation

avatar29A
Copy link
Contributor

Modifications

  • Added LineBasedFrameDecoder.cs
  • Added MessageToMessageDecoder.cs
  • Added StringDecoder.cs, StringEncoder.cs
  • Added ByteProcessor.cs
  • Added methods ForEachByte in IByteBuffer (also implemented them in AbstractByteBuffer.cs, EmptyByteBuffer.cs, SwappedByteBuffer, WrappedByteBuf);
  • Added method EncodeString in ByteBufferUtil.cs

@azurecla
Copy link

Hi @avatar29A, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.azure.com.

TTYL, AZPRBOT;

@azurecla
Copy link

@avatar29A, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, AZPRBOT;

@@ -15,9 +15,9 @@ namespace DotNetty.Buffers
/// <summary>
/// Abstract base class implementation of a <see cref="IByteBuffer"/>
/// </summary>
public abstract class AbstractByteBuffer : IByteBuffer
public abstract class AbstractByteBuffer : IByteBuffer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use spaces for indentation

@avatar29A
Copy link
Contributor Author

CI fell with error "System.Exception: Error during NuGet package creation.". What does it meant? It's normal?

int i = index;
try {
do {
if (processor.Process(GetByte(i))) {
Copy link
Member

@nayato nayato Apr 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use _GetByte like in netty to avoid unnecessary index check.

@nayato
Copy link
Member

nayato commented Apr 25, 2016

@avatar29A, no idea, don't mind it - clearly unrelated to your changes. I've only started the review will continue in ~6 hours.

@avatar29A
Copy link
Contributor Author

One more question, if I push new changes in branch, Do you see it, or I need make some advanced actions?

@onatm
Copy link
Contributor

onatm commented Apr 25, 2016

@avatar29A if you push something to the branch you wanted to merge will be seen here.

Btw, you probably need to squash commits into one.

@avatar29A
Copy link
Contributor Author

@onatm thank's. Yes, I will do it (squash commits into one).

@nayato
Copy link
Member

nayato commented Apr 25, 2016

@avatar29A, @onatm actually it's easier for everyone to go through review (might take a series of back-and-forth) and then squash once you get a "LGTM".

{
do
{
if (processor.Process(this.GetByte(i)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use _GetByte (like in netty) instead to avoid unnecessary index check.

@nayato
Copy link
Member

nayato commented Apr 25, 2016

FYI, Still haven't looked through yet, will do in 2h.

{
do
{
if (processor.Process(this.GetByte(i)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_GetByte


public override bool Process(byte value)
{
if (this.customHandler == null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move check into ctor so that we won't check on every byte during processing

@nayato
Copy link
Member

nayato commented Apr 26, 2016

@avatar29A now I think I'm through. Code style comments about xml-doc are optional. That's a lot to change and we already have a lot in that format ported over so we can address it later.

@Aaronontheweb
Copy link
Contributor

NuGet is unhappy about something... not sure what.

@Aaronontheweb
Copy link
Contributor

Going to re-run CI to see if it's a fluke. Otherwise might be an issue with the version of NuGet.exe being used (might be breaking changes with NuGet)

@nayato
Copy link
Member

nayato commented Apr 27, 2016

@Aaronontheweb it's a persistent problem. can you try running without these changes to see if it's ok then?

@Aaronontheweb
Copy link
Contributor

I'll run it locally and see what the deal is - we had issues with Akka.NET recently too where the latest NuGet.exe blew up our ability to restore and push packages on the fly without modifying the configuration and build script.

@@ -666,6 +666,26 @@ public Task WriteBytesAsync(Stream stream, int length, CancellationToken cancell
return this.buf.WriteBytesAsync(stream, length, cancellationToken);
}

public int ForEachByte(DotNetty.Common.Utilities.ByteProcessor processor)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move DotNetty.Common.Utilities to usings

@nayato
Copy link
Member

nayato commented Apr 27, 2016

@avatar29A, left a few more minor comments, LGTM otherwise. Pls, address the comments, squash, and rebase on latest dev. Thanks for taking on this!

…dencies

Modifications

 - Added LineBasedFrameDecoder.cs
 - Added MessageToMessageDecoder.cs
 - Added StringDecoder.cs, StringEncoder.cs
 - Added ByteProcessor.cs
 - Added methods ForEachByte in IByteBuffer (also implemented them in AbstractByteBuffer.cs, EmptyByteBuffer.cs, SwappedByteBuffer, WrappedByteBuf);
 - Added method EncodeString in ByteBufferUtil.cs
@avatar29A
Copy link
Contributor Author

avatar29A commented Apr 27, 2016

To my mind, I'm through. Check please.

@nayato nayato merged commit d3e6fe4 into Azure:dev Apr 27, 2016
@avatar29A avatar29A deleted the implement-stringdecoder-and-string-encoder-85 branch April 27, 2016 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants