private void InnerOnUpdateOrCreateNodeMessage(UpdateOrCreateNodeMessage <TResource> message) { if (message.Collection == CollectionNode.Collection) { OnUpdateOrCreateNodeMessage(message); } }
protected override void OnUpdateOrCreateNodeMessage(UpdateOrCreateNodeMessage <StoredProcedure> message) { if (message.IsNewResource) { var item = new StoredProcedureNodeViewModel(this, message.Resource); DispatcherHelper.RunAsync(() => Children.Add(item)); } else { var item = Children.Cast <StoredProcedureNodeViewModel>().FirstOrDefault(i => i.Resource.AltLink == message.OldAltLink); if (item != null) { item.Resource = message.Resource; } } }
protected abstract void OnUpdateOrCreateNodeMessage(UpdateOrCreateNodeMessage <TResource> message);