public override void Deserialize(GenericReader reader) { base.Deserialize(reader); var version = reader.GetVersion(); switch (version) { case 1: Desc = reader.ReadString(); goto case 0; case 0: { Type = reader.ReadType(); Name = reader.ReadString(); CanIgnore = reader.ReadBool(); States = reader.ReadBlockDictionary( r => { var state = new NotifySettingsState(this, r); return(new KeyValuePair <IAccount, NotifySettingsState>(state.Owner.Account, state)); }); } break; } }
public NotifySettingsState EnsureState(IAccount a) { var s = States.GetValue(a); if (s == null || s.Settings != this) { States[a] = s = new NotifySettingsState(this, a); } return(s); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); reader.GetVersion(); Type = reader.ReadType(); Name = reader.ReadString(); Desc = reader.ReadString(); CanIgnore = reader.ReadBool(); CanAutoClose = reader.ReadBool(); States = reader.ReadBlockDictionary( r => { var state = new NotifySettingsState(this, r); return(new KeyValuePair <IAccount, NotifySettingsState>(state.Owner, state)); }, States); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.GetVersion(); switch (version) { case 1: Desc = reader.ReadString(); goto case 0; case 0: { Type = reader.ReadType(); Name = reader.ReadString(); CanIgnore = reader.ReadBool(); States = reader.ReadBlockDictionary( r => { var state = new NotifySettingsState(this, r); return new KeyValuePair<PlayerMobile, NotifySettingsState>(state.Owner, state); }); } break; } }