BudgetAnalyser.Engine.Widgets.Widget.Update C# (CSharp) Метод

Update() публичный абстрактный Метод

Updates the widget with new input.
public abstract Update ( ) : void
Результат void
        public abstract void Update(params object[] input);

Usage Example

        private void UpdateWidget(Widget widget)
        {
            if (widget.Dependencies == null || !widget.Dependencies.Any())
            {
                widget.Update();
                return;
            }

            var parameters = new object[widget.Dependencies.Count()];
            int index = 0;
            foreach (Type dependencyType in widget.Dependencies)
            {
                if (!this.availableDependencies.ContainsKey(dependencyType))
                {
                    // If you get an exception here first check the InitialiseSupportedDependenciesArray method.
                    throw new NotSupportedException(
                        string.Format(
                            CultureInfo.CurrentCulture,
                            "The requested dependency {0} for the widget {1} is not supported.",
                            dependencyType.Name,
                            widget.Name));
                }

                parameters[index++] = this.availableDependencies[dependencyType];
            }

            widget.Update(parameters);
        }
All Usage Examples Of BudgetAnalyser.Engine.Widgets.Widget::Update