fix comments

This commit is contained in:
Jie Luo 2015-05-01 10:35:19 -07:00
parent 41c175e711
commit ea48104cdd
4 changed files with 5 additions and 6 deletions

View File

@ -163,7 +163,7 @@ namespace Google.ProtocolBuffers
}
[Fact]
public void TestSeralizeAndParse()
public void TestSerializeAndParse()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
builder.SetOptionalInt32(1234);

View File

@ -56,13 +56,13 @@ namespace Google.ProtocolBuffers.Descriptors
public enum ProtoSyntax
{
PROTO2,
PROTO3
Proto2,
Proto3
}
public ProtoSyntax Syntax
{
get { return proto.Syntax == "proto3" ? ProtoSyntax.PROTO3 : ProtoSyntax.PROTO2; }
get { return proto.Syntax == "proto3" ? ProtoSyntax.Proto3 : ProtoSyntax.Proto2; }
}
private FileDescriptor(FileDescriptorProto proto, FileDescriptor[] dependencies, DescriptorPool pool, bool allowUnknownDependencies)

View File

@ -68,7 +68,7 @@ namespace Google.ProtocolBuffers.FieldAccess
{
this.descriptor = descriptor;
accessors = new IFieldAccessor<TMessage, TBuilder>[descriptor.Fields.Count];
bool supportFieldPresence = descriptor.File.Syntax == FileDescriptor.ProtoSyntax.PROTO2;
bool supportFieldPresence = descriptor.File.Syntax == FileDescriptor.ProtoSyntax.Proto2;
for (int i = 0; i < accessors.Length; i++)
{
accessors[i] = CreateAccessor(descriptor.Fields[i], propertyNames[i], supportFieldPresence);

View File

@ -43,7 +43,6 @@ namespace Google.ProtocolBuffers.FieldAccess
where TBuilder : IBuilder<TMessage, TBuilder>
{
private readonly Type clrType;
private readonly FieldDescriptor field;
private readonly Func<TMessage, object> getValueDelegate;
private readonly Action<TBuilder, object> setValueDelegate;
private readonly Func<TMessage, bool> hasDelegate;