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

Assorted nits from C# code. #605

Merged

Conversation

jtattermusch
Copy link
Contributor

Fixes #535.

@@ -79,12 +79,6 @@ internal static InvalidProtocolBufferException InvalidEndTag()
"Protocol message end-group tag did not match expected tag.");
}

internal static InvalidProtocolBufferException InvalidWireType()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like unused code. Remove it?

@jskeet
Copy link
Contributor

jskeet commented Jul 16, 2015

I'm happy with all but removing the using statement. Will discuss that separately.

@jtattermusch
Copy link
Contributor Author

Please look at #603 to find out some intesting things about the using statement and enumerator.

Assert.IsTrue(enumerator.MoveNext());
Assert.AreEqual("first", enumerator.Current);
}
var enumerator = list.GetEnumerator();
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, having read http://stackoverflow.com/questions/4642665 I see the issue.
I'll have a think about it. Another option could be to use a try/finally block manually, which might fix it.

Will certainly look at whether the mutable struct provides any benefit any more within the runtime - it still would for clients, in normal situations. (The capture here isn't particularly "normal"...)

@jtattermusch
Copy link
Contributor Author

Rebased this one to not contain the fix from #603. Please merge this once happy.

jskeet added a commit that referenced this pull request Jul 16, 2015
@jskeet jskeet merged commit 3bf74a9 into protocolbuffers:csharp-experimental Jul 16, 2015
taoso pushed a commit to taoso/protobuf that referenced this pull request Aug 1, 2018
…type (protocolbuffers#612)

Fix unmarshaling JSON object with escaped string into Struct type.

Fixes protocolbuffers#605
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants