/*************************************/ /**** Public Methods ****/ /*************************************/ public virtual void SetItem(object item, bool sendNotification = true, bool updateOriginal = true) { if (item == null) { return; } if (updateOriginal) { m_OriginalItem = item; } SelectedItem = FromGeneric(item as dynamic); List <ParamInfo> oldInputs = InputParams.ToList(); List <ParamInfo> oldOutputs = OutputParams.ToList(); SetComponentDetails(); SetInputs(); SetOutputs(); SetInputSelectionMenu(); SetOutputSelectionMenu(); CompileMethod(); CompileInputGetters(); CompileOutputSetters(); if (sendNotification) { MarkAsModified(new CallerUpdate { Cause = CallerUpdateCause.ItemSelected, ComponentUpdate = new ComponentUpdate { Name = Name, Description = Description }, InputUpdates = InputParams.Changes(oldInputs).Where(x => x.Param.IsSelected).ToList(), OutputUpdates = OutputParams.Changes(oldOutputs).Where(x => x.Param.IsSelected).ToList() }); } }