/// <summary>
        /// Adds a <see cref="ParameterTypeRowViewModel"/>
        /// </summary>
        /// <param name="parameterType">
        /// The associated <see cref="ParameterType"/> for which the row is to be added.
        /// </param>
        private void AddParameterTypeRowViewModel(ParameterType parameterType)
        {
            var row = new ParameterTypeRowViewModel(parameterType, this.Session, this);

            if (this.FavoriteParameterTypeIids != null)
            {
                row.SetFavoriteStatus(this.FavoriteParameterTypeIids.Contains(row.Thing.Iid));
            }

            this.ParameterTypes.Add(row);
        }
Пример #2
0
 /// <summary>
 /// Adds a <see cref="ParameterTypeRowViewModel"/>
 /// </summary>
 /// <param name="parameterType">
 /// The associated <see cref="ParameterType"/> for which the row is to be added.
 /// </param>
 private void AddParameterTypeRowViewModel(ParameterType parameterType)
 {
     var row = new ParameterTypeRowViewModel(parameterType, this.Session, this);
     this.ParameterTypes.Add(row);
 }
 /// <summary>
 /// Toggles the favorite status of the thing on the server.
 /// </summary>
 /// <param name="row">The row.</param>
 private void ToggleFavorite(ParameterTypeRowViewModel row)
 {
     Task.Run(() => this.favoritesService.ToggleFavorite <ParameterType>(this.Session, row.Thing));
 }