diff options
author | Rodrigo Moya <rodrigo.moya@xamarin.com> | 2019-09-06 14:11:24 +0300 |
---|---|---|
committer | Rodrigo Moya <rodrigo.moya@xamarin.com> | 2019-09-06 15:04:11 +0300 |
commit | f6aef5fd4112412e8ab1e7791383473c202bec80 (patch) | |
tree | 4b5f2927d4cfd77a48a4bcf3252f779d0e9ab124 /main/src/core/MonoDevelop.Ide | |
parent | 7641d9e4e92fda18a399afc573ce3ff863f08c3c (diff) |
[AspNet*] Filter HTTP handlers to viewer role
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/970420
Diffstat (limited to 'main/src/core/MonoDevelop.Ide')
3 files changed, 20 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/DesktopApplication.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/DesktopApplication.cs index d2e17fc957..9d404121a2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/DesktopApplication.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/DesktopApplication.cs @@ -35,6 +35,16 @@ using System.Diagnostics; namespace MonoDevelop.Ide.Desktop { + [Flags] + public enum DesktopApplicationRole + { + None = 0, + Viewer = 1, + Editor = 2, + Shell = 4, + All = Viewer | Editor | Shell + } + public abstract class DesktopApplication { public DesktopApplication (string id, string displayName, bool isDefault) diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs index ca37416e93..a9afb3db20 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs @@ -348,6 +348,11 @@ namespace MonoDevelop.Ide.Desktop return new DesktopApplication[0]; } + public virtual IEnumerable<DesktopApplication> GetApplications (string filename, DesktopApplicationRole role) + { + return GetApplications (filename); + } + public virtual Xwt.Rectangle GetUsableMonitorGeometry (int screenNumber, int monitorNumber) { var screen = Gdk.Display.Default.GetScreen (screenNumber); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs index 66298a19a3..37c4cd60c9 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs @@ -139,6 +139,11 @@ namespace MonoDevelop.Ide return PlatformService.GetApplications (filename); } + public IEnumerable<DesktopApplication> GetApplications (string filename, DesktopApplicationRole role) + { + return PlatformService.GetApplications (filename, role); + } + internal string DefaultMonospaceFont { get { return PlatformService.DefaultMonospaceFont; } } |