forked from OmniSharp/omnisharp-roslyn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rchande/MEFfix
Make MEF work
- Loading branch information
Showing
4 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
15 changes: 12 additions & 3 deletions
15
src/OmniSharp.Abstractions/Mef/ExportIProjectSystemAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
using OmniSharp.Services; | ||
using System; | ||
using System.ComponentModel.Composition; | ||
using System.Composition; | ||
|
||
namespace OmniSharp.Mef | ||
{ | ||
[MetadataAttribute] | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] | ||
public class ExportIProjectSystemAttribute: ExportAttribute | ||
{ | ||
public string Name; | ||
public string Name { get; } | ||
public string Before { get; } | ||
public string After { get; } | ||
|
||
public ExportIProjectSystemAttribute(string name) : base(name, typeof(IProjectSystem)) | ||
public ExportIProjectSystemAttribute(string name, string before="", string after="") : base(typeof(IProjectSystem)) | ||
{ | ||
Name = name; | ||
Before = before; | ||
After = after; | ||
} | ||
} | ||
|
||
public class ProjectSystemMetadata | ||
{ | ||
string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace OmniSharp.Mef | ||
{ | ||
internal interface IOrderableMetadata | ||
{ | ||
[DefaultValue("")] | ||
string After { get; } | ||
[DefaultValue("")] | ||
string Before { get; } | ||
string Name { get; } | ||
} | ||
|
||
class OrderableMetadata | ||
{ | ||
public string After { get; set; } | ||
|
||
public string Before { get; set; } | ||
public string Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters