public void Add(RegistryDataInfo data) { var exists = _table.FirstOrDefault(p => p.Identifier == data.Identifier); if (exists != null) { _typedClient.RemoveItemFromList(_table, exists); } _typedClient.AddItemToList(_table, data); _typedClient.Save(); }
public static ServiceRegistryMetta ToPlainObject(this RegistryDataInfo data) { if (data.ApiDomain == null) { return(null); } return(new ServiceRegistryMetta { ApiDomain = data.ApiDomain, InterfaceType = data.InterfaceName, InstanceType = data.InstanceName, Protocol = data.Protocol, SerializeMode = data.SerializeMode, IsEnabled = data.IsEnabled, ServerAddress = data.ServerAddress, Attributes = data.AdditionalFields }); }