public ServerModel(StringManager stringManager, Ide.Config config, IServiceProvider serviceProvider) { Contract.Requires(stringManager != null); Contract.Requires(config != null); Contract.Requires(serviceProvider != null); ServiceProvider = serviceProvider; var client = new NitraClient(stringManager); client.Send(new ClientMessage.CheckVersion(M.Constants.AssemblyVersionGuid)); var responseMap = client.ResponseMap; responseMap[-1] = Response; _config = config; Client = client; var builder = ImmutableHashSet.CreateBuilder <string>(StringComparer.OrdinalIgnoreCase); foreach (var lang in config.Languages) { builder.UnionWith(lang.Extensions); } Extensions = builder.ToImmutable(); }
private static M.Config ConvertConfig(Ide.Config config) { var ps = config.ProjectSupport; var projectSupport = new M.ProjectSupport(ps.Caption, ps.TypeFullName, ps.Path); var languages = config.Languages.Select(x => new M.LanguageInfo(x.Name, x.Path, new M.DynamicExtensionInfo[0])).ToArray(); var msgConfig = new M.Config(projectSupport, languages, new string[0]); return(msgConfig); }
public Server(StringManager stringManager, Ide.Config config, IServiceProvider serviceProvider) { Contract.Requires(ServiceProvider != null); ServiceProvider = serviceProvider; var client = new NitraClient(stringManager); client.Send(new ClientMessage.CheckVersion(M.Constants.AssemblyVersionGuid)); var responseMap = client.ResponseMap; responseMap[-1] = Response; _config = config; Client = client; }
public Server(StringManager stringManager, Ide.Config config, IServiceProvider serviceProvider) { Contract.Requires(ServiceProvider != null); ServiceProvider = serviceProvider; var client = new NitraClient(stringManager); client.Send(new ClientMessage.CheckVersion(M.Constants.AssemblyVersionGuid)); var responseMap = client.ResponseMap; responseMap[-1] = Response; _config = config; Client = client; var builder = ImmutableHashSet.CreateBuilder<string>(StringComparer.OrdinalIgnoreCase); foreach (var lang in config.Languages) builder.UnionWith(lang.Extensions); Extensions = builder.ToImmutable(); }
protected override void Initialize() { base.Initialize(); var assembly = "XXProjectSupportAssemblyXX"; if (string.IsNullOrEmpty(assembly)) return; var assemblyFullPath = Path.Combine(VsUtils.GetPlaginPath(), @"Languages\XXProjectSupportAssemblyXX"); var projectSupport = new ProjectSupport("XXProjectSupportXX", "XXProjectSupportClassXX", Path.Combine(VsUtils.GetPlaginPath(), assemblyFullPath)); var languages = new [] { new LanguageInfo("XXLanguageFullNameXX", Path.Combine(VsUtils.GetPlaginPath(), @"Languages\XXProjectSupportAssemblyXX")) }; var config = new Config(projectSupport, languages); NitraCommonPackage.AddProjectType(config); }
protected override void Initialize() { base.Initialize(); var assembly = "XXProjectSupportAssemblyXX"; if (string.IsNullOrEmpty(assembly)) return; var assemblyFullPath = Path.Combine(VsUtils.GetPlaginPath(), @"Languages\XXProjectSupportAssemblyXX"); var projectSupport = new ProjectSupport("XXProjectSupportXX", "XXProjectSupportClassXX", Path.Combine(VsUtils.GetPlaginPath(), assemblyFullPath)); var path = Path.Combine(VsUtils.GetPlaginPath(), @"Languages\XXProjectSupportAssemblyXX"); var extensions = ImmutableHashSet.Create<string>(StringComparer.OrdinalIgnoreCase, XXFileExtensionsXX); var languages = new [] { new LanguageInfo("XXLanguageFullNameXX", path, extensions) }; var config = new Config(projectSupport, languages); NitraCommonPackage.AddProjectType(config); }
public static void AddProjectType(Config config) { Configs.Add(config); }