private IEnumerable <Instance> getInstances(string path) { var dir = Path.Combine(FS.GetTempPath(), "OpenIDE.CodeEngine"); if (Directory.Exists(dir)) { foreach (var file in Directory.GetFiles(dir, "*.pid")) { var instance = Instance.Get(file, File.ReadAllLines(file)); if (instance != null) { Logger.Write("Found event endpoint instance for: " + instance.Key); yield return(instance); } } } }
private IEnumerable <Instance> getInstances(string path) { var user = System.Security.Principal.WindowsIdentity.GetCurrent().Name.Replace(Path.DirectorySeparatorChar.ToString(), "-"); var filename = string.Format("*.OpenIDE.CodeEngine.{0}.pid", user); var dir = FS.GetTempPath(); if (Directory.Exists(dir)) { foreach (var file in Directory.GetFiles(dir, filename)) { var instance = Instance.Get(file, File.ReadAllLines(file)); if (instance != null) { Logger.Write("Found event endpoint instance for: " + instance.Key); yield return(instance); } } } }