public Builder SetTemplates(global::world.template.Templates.Builder builderForValue) { pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); PrepareBuilder(); result.hasTemplates = true; result.templates_ = builderForValue.Build(); return(this); }
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(_rootFieldNames, field_name, global::System.StringComparer.Ordinal); if (field_ordinal >= 0) { tag = _rootFieldTags[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::world.template.Templates.Builder subBuilder = global::world.template.Templates.CreateBuilder(); if (result.hasTemplates) { subBuilder.MergeFrom(Templates); } input.ReadMessage(subBuilder, extensionRegistry); Templates = subBuilder.BuildPartial(); break; } case 18: { global::world.equip.Tables.Builder subBuilder = global::world.equip.Tables.CreateBuilder(); if (result.hasEquipTables) { subBuilder.MergeFrom(EquipTables); } input.ReadMessage(subBuilder, extensionRegistry); EquipTables = subBuilder.BuildPartial(); break; } case 26: { global::world.role.Tables.Builder subBuilder = global::world.role.Tables.CreateBuilder(); if (result.hasRoleTables) { subBuilder.MergeFrom(RoleTables); } input.ReadMessage(subBuilder, extensionRegistry); RoleTables = subBuilder.BuildPartial(); break; } } } if (unknownFields != null) { this.UnknownFields = unknownFields.Build(); } return(this); }