コード例 #1
0
 void UnloadProjectSystem()
 {
     if (applicationLifetime != null) {
         applicationLifetime.Stopping ();
         applicationLifetime.Dispose ();
         applicationLifetime = null;
         projectSystem.Dispose ();
         projectSystem = null;
         context = null;
     }
 }
コード例 #2
0
        internal void LoadAspNetProjectSystem(Solution solution)
        {
            UnloadProjectSystem ();

            applicationLifetime = new MonoDevelopApplicationLifetime ();
            context = new DnxContext ();
            var factory = new AspNet5ProjectSystemFactory ();
            projectSystem = factory.CreateProjectSystem (solution, applicationLifetime, context);
            projectSystem.Initalize ();
        }
コード例 #3
0
        void LoadDnxProjectSystem(Solution solution)
        {
            UnloadProjectSystem ();

            applicationLifetime = new MonoDevelopApplicationLifetime ();
            context = new DnxContext ();
            var factory = new DnxProjectSystemFactory ();
            projectSystem = factory.CreateProjectSystem (solution, applicationLifetime, context);
            projectSystem.Initalize ();

            if (context.RuntimePath == null) {
                string error = GetRuntimeError (projectSystem);
                throw new ApplicationException (error);
            }
        }
コード例 #4
0
 void UnloadProjectSystem()
 {
     initializeError = String.Empty;
     if (applicationLifetime != null) {
         applicationLifetime.Stopping ();
         applicationLifetime.Dispose ();
         applicationLifetime = null;
         if (projectSystem != null) {
             projectSystem.Dispose ();
             projectSystem = null;
         }
         context = null;
     }
 }
コード例 #5
0
 static string GetRuntimeError(DnxProjectSystem projectSystem)
 {
     if (projectSystem.DnxPaths != null &&
         projectSystem.DnxPaths.RuntimePath != null &&
         projectSystem.DnxPaths.RuntimePath.Error != null) {
         return projectSystem.DnxPaths.RuntimePath.Error.Text;
     }
     return "Unable to find DNX runtime.";
 }