Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ComparisonViewModel"/> class.
        /// </summary>
        /// <param name="favouritesManager">The favourites manager.</param>
        /// <param name="a">The first gneome to compare.</param>
        /// <param name="b">The optional second genome to compare, can be <see langword="null"/>.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown if <paramref name="favouritesManager"/> or <paramref name="a"/> is <see langword="null"/>.
        /// </exception>
        public ComparisonViewModel(IFavouritesManager favouritesManager, GenomeModel a, GenomeModel b = null)
        {
            Guard.IsNotNull(favouritesManager, nameof(favouritesManager));
            Guard.IsNotNull(a, nameof(a));

            _favouritesManager = favouritesManager;
            Snp = new SnpViewModelCollection(MakeSnpViewModels(a, b));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ShellViewModel"/> class.
        /// </summary>
        /// <param name="kernel">
        /// The application kernel.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when <paramref name="kernel"/> is <see langword="null"/>.
        /// </exception>
        public ShellViewModel(IKernel kernel)
        {
            Guard.IsNotNull(kernel, nameof(kernel));

            _dialogManager     = kernel.Get <IDialogManager>();
            _loader            = kernel.Get <IGenomeModelLoader>();
            _favouritesManager = kernel.Get <IFavouritesManager>();

            DisplayName = "MG.GCompare";
        }