public static CommunitiesSettings FromRPC(this SGSettings rpcSettings) { return(new CommunitiesSettings { Properties = rpcSettings.Properties, AllowedActions = ConvertAllowableActions(rpcSettings.AllowedActions) }); }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { Id = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Map) { { Title = new Dictionary <string, string>(); TMap _map0 = iprot.ReadMapBegin(); for (int _i1 = 0; _i1 < _map0.Count; ++_i1) { string _key2; string _val3; _key2 = iprot.ReadString(); _val3 = iprot.ReadString(); Title[_key2] = _val3; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Map) { { GroupDescription = new Dictionary <string, string>(); TMap _map4 = iprot.ReadMapBegin(); for (int _i5 = 0; _i5 < _map4.Count; ++_i5) { string _key6; string _val7; _key6 = iprot.ReadString(); _val7 = iprot.ReadString(); GroupDescription[_key6] = _val7; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { AvatarUrl = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I64) { CreatedAt = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.I64) { UpdatedAt = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.String) { CreatedBy = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Struct) { Settings = new SGSettings(); Settings.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.I32) { FollowersCount = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Bool) { IsFollower = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.I32) { MembersCount = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.Struct) { Membership = new SGMembershipInfo(); Membership.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { Id = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Map) { { Title = new Dictionary <string, string>(); TMap _map15 = iprot.ReadMapBegin(); for (int _i16 = 0; _i16 < _map15.Count; ++_i16) { string _key17; string _val18; _key17 = iprot.ReadString(); _val18 = iprot.ReadString(); Title[_key17] = _val18; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Map) { { TopicDescription = new Dictionary <string, string>(); TMap _map19 = iprot.ReadMapBegin(); for (int _i20 = 0; _i20 < _map19.Count; ++_i20) { string _key21; string _val22; _key21 = iprot.ReadString(); _val22 = iprot.ReadString(); TopicDescription[_key21] = _val22; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { AvatarUrl = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I64) { CreatedAt = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { CreatedBy = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.I64) { UpdatedAt = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Struct) { Settings = new SGSettings(); Settings.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.I32) { FollowersCount = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Bool) { IsFollower = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }