Ejemplo n.º 1
0
 public Builder SetOrder(global::Futu.OpenApi.Pb.TrdCommon.Order.Builder builderForValue)
 {
     pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
     PrepareBuilder();
     result.hasOrder = true;
     result.order_   = builderForValue.Build();
     return(this);
 }
Ejemplo n.º 2
0
                public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry)
                {
                    PrepareBuilder();
                    pb::UnknownFieldSet.Builder unknownFields = null;
                    uint   tag;
                    string field_name;

                    while (input.ReadTag(out tag, out field_name))
                    {
                        if (tag == 0 && field_name != null)
                        {
                            int field_ordinal = global::System.Array.BinarySearch(_s2CFieldNames, field_name, global::System.StringComparer.Ordinal);
                            if (field_ordinal >= 0)
                            {
                                tag = _s2CFieldTags[field_ordinal];
                            }
                            else
                            {
                                if (unknownFields == null)
                                {
                                    unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                                }
                                ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                                continue;
                            }
                        }
                        switch (tag)
                        {
                        case 0: {
                            throw pb::InvalidProtocolBufferException.InvalidTag();
                        }

                        default: {
                            if (pb::WireFormat.IsEndGroupTag(tag))
                            {
                                if (unknownFields != null)
                                {
                                    this.UnknownFields = unknownFields.Build();
                                }
                                return(this);
                            }
                            if (unknownFields == null)
                            {
                                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
                            }
                            ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
                            break;
                        }

                        case 10: {
                            global::Futu.OpenApi.Pb.TrdCommon.TrdHeader.Builder subBuilder = global::Futu.OpenApi.Pb.TrdCommon.TrdHeader.CreateBuilder();
                            if (result.hasHeader)
                            {
                                subBuilder.MergeFrom(Header);
                            }
                            input.ReadMessage(subBuilder, extensionRegistry);
                            Header = subBuilder.BuildPartial();
                            break;
                        }

                        case 18: {
                            global::Futu.OpenApi.Pb.TrdCommon.Order.Builder subBuilder = global::Futu.OpenApi.Pb.TrdCommon.Order.CreateBuilder();
                            if (result.hasOrder)
                            {
                                subBuilder.MergeFrom(Order);
                            }
                            input.ReadMessage(subBuilder, extensionRegistry);
                            Order = subBuilder.BuildPartial();
                            break;
                        }
                        }
                    }

                    if (unknownFields != null)
                    {
                        this.UnknownFields = unknownFields.Build();
                    }
                    return(this);
                }