private void Field_FieldSelectionChanged(object sender, FieldSelectionChangedEventArgs e) { var reportField = e.ChangedReportField; if (reportField.IsSelected) SelectedFields.Add(new ReportField { DisplayName = reportField.DisplayName, Name = reportField.Name }); else SelectedFields.Remove(SelectedFields.Where((fld) => fld.Name == reportField.Name).FirstOrDefault()); }
public UseBackingFields(IDeclarationFinderProvider declarationFinderProvider, EncapsulateFieldModel model, IIndenter indenter, ICodeBuilder codeBuilder) : base(declarationFinderProvider, model, indenter, codeBuilder) { _fieldsToDeleteAndReplace = SelectedFields.Where(f => f.Declaration.IsDeclaredInList() && !f.Declaration.HasPrivateAccessibility()).ToList(); }