private void BindingFilesTrackerOnFileUpdated(BindingFileInfo bindingFileInfo)
        {
            bool isChanged = false;

            List <IStepDefinitionBinding> bindings;

            if (bindingSuggestions.TryGetValue(bindingFileInfo, out bindings))
            {
                bindings.ForEach(RemoveBinding);
                bindings.Clear();
                isChanged = true;
            }
            else
            {
                bindings = new List <IStepDefinitionBinding>();
                bindingSuggestions.Add(bindingFileInfo, bindings);
            }

            if (!bindingFileInfo.IsError && bindingFileInfo.StepBindings.Any())
            {
                bindings.AddRange(bindingFileInfo.StepBindings);
                bindings.ForEach(AddBinding);
                isChanged = true;
            }

            if (isChanged)
            {
                FireBindingsChanged();
            }
        }
Exemple #2
0
        private void BindingFilesTrackerOnFileRemoved(BindingFileInfo bindingFileInfo)
        {
            List <StepBinding> bindings;

            if (bindingSuggestions.TryGetValue(bindingFileInfo, out bindings))
            {
                bindings.ForEach(RemoveBinding);
                bindingSuggestions.Remove(bindingFileInfo);
            }
        }
Exemple #3
0
        private void BindingFilesTrackerOnFileUpdated(BindingFileInfo bindingFileInfo)
        {
            List <StepBinding> bindings;

            if (bindingSuggestions.TryGetValue(bindingFileInfo, out bindings))
            {
                bindings.ForEach(RemoveBinding);
                bindings.Clear();
            }
            else
            {
                bindings = new List <StepBinding>();
                bindingSuggestions.Add(bindingFileInfo, bindings);
            }

            if (bindingFileInfo.StepBindings.Any())
            {
                bindings.AddRange(bindingFileInfo.StepBindings);
                bindings.ForEach(AddBinding);
            }
        }