/// <summary> /// /// </summary> /// <param name="senderKeyName"></param> /// <param name="record"></param> public void StoreSenderKey(SenderKeyName senderKeyName, SenderKeyRecord record) { if (SenderKeysObjectsDic.ContainsKey(senderKeyName)) { SenderKeysObjectsDic.Remove(senderKeyName); } SenderKeysObjectsDic.Add(senderKeyName, new SenderKeysObject() { SenderKeyKeyName = senderKeyName, Record = record.Serialize() }); }
public void StoreSenderKey(SenderKeyName senderKeyName, SenderKeyRecord record) { if (ContainsSenderKey(senderKeyName)) { RemoveSenderKey(senderKeyName); } String senderKeyId = senderKeyName.GetSender().GetName() + " : " + senderKeyName.GetGroupId(); SenderKeysRepository senderKeysRepository = new SenderKeysRepository(); SenderKeys senderKey = new SenderKeys() { Record = record.Serialize(), SenderKeyId = senderKeyId }; senderKeysRepository.Save(senderKey); }