private void HandleScriptTextChanged(object sender, ScriptTextChangedEventArgs e) { if (e.ScriptText.FilePath.CaseInsensitiveEquals(_program.GetFlagsFilePath().WaitForResult())) { RaiseFlagsFileChanged(); } }
private void HandleScriptTextChanged(object sender, ScriptTextChangedEventArgs e) { if (e.ScriptText.FilePath.CaseInsensitiveEquals(_filePath)) { var types = _program.TypeChecker.CompilerTypeTable.Types; var scriptName = Id.FullScriptName; lock (types) { // We need to remove any structs that are now invalidated: var dirtyKeys = types.Keys.Where(k => ObjectIdentifier.Parse(k).FullScriptName.CaseInsensitiveEquals(scriptName)).ToArray(); foreach (var key in dirtyKeys) { types.Remove(key); } } RaiseScriptFileChanged(); } }