Skip to content

Commit

Permalink
Merge pull request yysun#111 from sharwell/platform-colors-2013
Browse files Browse the repository at this point in the history
Update PlatformColorHelper to handle Visual Studio 2013
  • Loading branch information
yysun committed Dec 21, 2013
2 parents 9e3ec09 + d50daa4 commit c40dedc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions PlatformUI/PlatformColorHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ private object GetResourceKey(string resourceName)

private static PlatformColorHelper LookupPlatformColorHelper(Type wrapperType)
{
// first try to find the Visual Studio 2013 assembly
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
AssemblyName name = assembly.GetName();
if (!name.Name.Equals("Microsoft.VisualStudio.Shell.12.0"))
continue;

Type type = assembly.GetType("Microsoft.VisualStudio.PlatformUI." + wrapperType.Name, false);
if (type == null)
continue;

return new PlatformColorHelper(type);
}

// fall back to the Visual Studio 2012 assembly
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
AssemblyName name = assembly.GetName();
Expand Down

0 comments on commit c40dedc

Please sign in to comment.