static MonoDevelopTemporaryStorageServiceFactory ()
		{
			if (Core.Platform.IsWindows || IsCompatibleMono()) {
				try {
					var asm = Assembly.Load ("Microsoft.CodeAnalysis.Workspaces.Desktop");
					if (asm != null) {
						var type = asm.GetType ("Microsoft.CodeAnalysis.Host.TemporaryStorageServiceFactory");
						if (type != null)
							microsoftFactory = Activator.CreateInstance (type) as IWorkspaceServiceFactory;
					}
				} catch (Exception e) {
					LoggingService.LogWarning ("MonoDevelopTemporaryStorageServiceFactory: Can't load microsoft temporary storage, fallback to default.", e);
				}
			}
		}
示例#2
0
 static MonoDevelopTemporaryStorageServiceFactory()
 {
     if (Core.Platform.IsWindows || IsCompatibleMono())
     {
         try {
             var asm = Assembly.Load("Microsoft.CodeAnalysis.Workspaces.Desktop");
             if (asm != null)
             {
                 var type = asm.GetType("Microsoft.CodeAnalysis.Host.TemporaryStorageServiceFactory");
                 if (type != null)
                 {
                     microsoftFactory = Activator.CreateInstance(type) as IWorkspaceServiceFactory;
                 }
             }
         } catch (Exception e) {
             LoggingService.LogWarning("MonoDevelopTemporaryStorageServiceFactory: Can't load microsoft temporary storage, fallback to default.", e);
         }
     }
 }
示例#3
0
        static MonoDevelopTemporaryStorageServiceFactory()
        {
            // On Mac, the mmap TemporaryStorageServiceFactory crashes the IDE by burning all available file handles
            if (Core.Platform.IsMac)
            {
                return;
            }

            try {
                var asm = Assembly.Load("Microsoft.CodeAnalysis.Workspaces.Desktop");
                if (asm != null)
                {
                    var type = asm.GetType("Microsoft.CodeAnalysis.Host.TemporaryStorageServiceFactory");
                    if (type != null)
                    {
                        microsoftFactory = Activator.CreateInstance(type) as IWorkspaceServiceFactory;
                    }
                }
            } catch (Exception e) {
                LoggingService.LogWarning("Can't load TemporaryStorageServiceFactory, falling back to default.", e);
            }
        }