Пример #1
0
 /// <summary>
 /// Determines whether the specified <see cref="StepBuilder" /> is equal to this instance.
 /// </summary>
 /// <param name="other">The <see cref="StepBuilder" /> to compare with this instance.</param>
 /// <returns>
 ///   <c>true</c> if the specified <see cref="StepBuilder" /> is equal to this instance; otherwise, <c>false</c>.
 /// </returns>
 public bool Equals(StepBuilder <TView, TViewModel> other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(base.Equals(other) && _viewType == other._viewType && _viewModelType == other._viewModelType);
 }
Пример #2
0
        /// <summary>
        /// Adds the step.
        /// </summary>
        /// <typeparam name="TPageView">The type of the page view.</typeparam>
        /// <typeparam name="TPageViewModel">The type of the page view model.</typeparam>
        /// <param name="id">The id.</param>
        /// <param name="title">The title.</param>
        /// <param name="parameters">The parameters.</param>
        /// <returns></returns>
        public IMultiStepBuilder AddStep <TPageView, TPageViewModel>(Guid id, string title = null, params ActionContextEntry[] parameters)
            where TPageView : ExtendedContentControl <TPageView, TPageViewModel>, new()
            where TPageViewModel : MultistepContentViewModel <TPageView, TPageViewModel>, new()
        {
            if (string.IsNullOrWhiteSpace(title))
            {
                title = typeof(TPageView).Name;
            }

            var unionedParameters = _parameters.Union(parameters).ToArray();

            var step = new StepBuilder <TPageView, TPageViewModel>(id, title, unionedParameters);

            _steps.Add(step);

            return(this);
        }