コード例 #1
0
        public override void LoadFromNewProjectInformation(INewProjectInformation info)
        {
            if (info == null ||
                (!(info is LoadProjectWizard.LoadExistingNHibernateProjectInfo) &&
                 !(info is LoadProjectWizard.LoadExistingDatabaseInfo)))
            {
                return;
            }
            ArchAngel.Providers.EntityModel.UI.IUserInteractor userInteractor = EntityProviderInfo.UserInteractor;

            if (info is LoadProjectWizard.LoadExistingDatabaseInfo)
            {
                ProjectOrigin = ProjectType.FromExistingDatabase;
                var newProjectInfo = (LoadProjectWizard.LoadExistingDatabaseInfo)info;
                newProjectInfo.RunCustomNewProjectLogic(this, userInteractor);
            }
            else if (info is LoadProjectWizard.LoadExistingNHibernateProjectInfo)
            {
                ProjectOrigin = ProjectType.FromExistingVisualStudioProject;
                var newProjectInfo = (LoadProjectWizard.LoadExistingNHibernateProjectInfo)info;
                newProjectInfo.RunCustomNewProjectLogic(this, userInteractor);
            }
            else
            {
                throw new NotImplementedException("Not handled yet.");
            }
            //EntityProviderInfo.LoadFromNewProjectInformation(info);
        }
コード例 #2
0
        public override void LoadFromNewProjectInformation(INewProjectInformation info)
        {
            if (info == null || info is TemplateSpecifiedNewProjectInformation == false)
            {
                return;
            }

            // At the moment, only NHibernate Helper has an inherited version of TemplateSpecifiedNewProjectInformation.
            // If we ever add inherit from TemplateSpecifiedNewProjectInformation in the Entity Provider,
            // then we'll need to re-think this code below:
            if (info.GetType() != typeof(TemplateSpecifiedNewProjectInformation))
            {
                return;
            }

            IUserInteractor userInteractor = customUserInteractor ?? editModelScreen;

            var newProjectInfo = (TemplateSpecifiedNewProjectInformation)info;

            newProjectInfo.RunCustomNewProjectLogic(this, userInteractor);
        }
コード例 #3
0
 public void InitProjectFromProjectWizardInformation(INewProjectInformation information)
 {
     CurrentProject.InitProjectFromProjectWizardInformation(information);
 }
コード例 #4
0
ファイル: ProviderInfo.cs プロジェクト: uQr/Visual-NHibernate
 public override void LoadFromNewProjectInformation(INewProjectInformation info)
 {
 }
コード例 #5
0
 public override void LoadFromNewProjectInformation(INewProjectInformation info)
 {
 }
コード例 #6
0
 public void InitProjectFromProjectWizardInformation(INewProjectInformation information)
 {
     CurrentProject.InitProjectFromProjectWizardInformation(information);
 }
コード例 #7
0
ファイル: ProviderInfo.cs プロジェクト: uQr/Visual-NHibernate
        public override void LoadFromNewProjectInformation(INewProjectInformation info)
        {
            if (info == null || info is TemplateSpecifiedNewProjectInformation == false) return;

            // At the moment, only NHibernate Helper has an inherited version of TemplateSpecifiedNewProjectInformation.
            // If we ever add inherit from TemplateSpecifiedNewProjectInformation in the Entity Provider,
            // then we'll need to re-think this code below:
            if (info.GetType() != typeof(TemplateSpecifiedNewProjectInformation))
                return;

            IUserInteractor userInteractor = customUserInteractor ?? editModelScreen;

            var newProjectInfo = (TemplateSpecifiedNewProjectInformation)info;
            newProjectInfo.RunCustomNewProjectLogic(this, userInteractor);
        }
コード例 #8
0
 public abstract void LoadFromNewProjectInformation(INewProjectInformation info);
コード例 #9
0
ファイル: ProviderInfo.cs プロジェクト: uQr/Visual-NHibernate
 public abstract void LoadFromNewProjectInformation(INewProjectInformation info);
コード例 #10
0
ファイル: ProviderInfo.cs プロジェクト: uQr/Visual-NHibernate
        public override void LoadFromNewProjectInformation(INewProjectInformation info)
        {
            if (info == null ||
                (!(info is LoadProjectWizard.LoadExistingNHibernateProjectInfo) &&
                !(info is LoadProjectWizard.LoadExistingDatabaseInfo)))
            {
                return;
            }
            ArchAngel.Providers.EntityModel.UI.IUserInteractor userInteractor = EntityProviderInfo.UserInteractor;

            if (info is LoadProjectWizard.LoadExistingDatabaseInfo)
            {
                ProjectOrigin = ProjectType.FromExistingDatabase;
                var newProjectInfo = (LoadProjectWizard.LoadExistingDatabaseInfo)info;
                newProjectInfo.RunCustomNewProjectLogic(this, userInteractor);
            }
            else if (info is LoadProjectWizard.LoadExistingNHibernateProjectInfo)
            {
                ProjectOrigin = ProjectType.FromExistingVisualStudioProject;
                var newProjectInfo = (LoadProjectWizard.LoadExistingNHibernateProjectInfo)info;
                newProjectInfo.RunCustomNewProjectLogic(this, userInteractor);
            }
            else
            {
                throw new NotImplementedException("Not handled yet.");
            }
            //EntityProviderInfo.LoadFromNewProjectInformation(info);
        }
コード例 #11
0
 public void InitProjectFromProjectWizardInformation(INewProjectInformation information)
 {
     FillProviders(information);
 }
コード例 #12
0
        public void FillProviders(INewProjectInformation info)
        {
            if (info == null) return;

            foreach (var provider in _Providers.Where(p => p.GetType().FullName == info.ValidProviderType.FullName))
            {
                provider.LoadFromNewProjectInformation(info);
            }
        }