public ExtractClassViewModel( IUIThreadOperationExecutor uiThreadOperationExecutor, INotificationService notificationService, ImmutableArray <MemberSymbolViewModel> memberViewModels, ImmutableDictionary <ISymbol, Task <ImmutableArray <ISymbol> > > memberToDependentsMap, string defaultTypeName, string defaultNamespace, string languageName, string typeParameterSuffix, ImmutableArray <string> conflictingNames, ISyntaxFactsService syntaxFactsService) { _notificationService = notificationService; MemberSelectionViewModel = new MemberSelectionViewModel( uiThreadOperationExecutor, memberViewModels, memberToDependentsMap, destinationTypeKind: TypeKind.Class); DestinationViewModel = new NewTypeDestinationSelectionViewModel( defaultTypeName, languageName, defaultNamespace, typeParameterSuffix, conflictingNames, syntaxFactsService); }
internal ExtractInterfaceDialogViewModel( ISyntaxFactsService syntaxFactsService, IUIThreadOperationExecutor uiThreadOperationExecutor, INotificationService notificationService, string defaultInterfaceName, List <string> conflictingTypeNames, ImmutableArray <LanguageServices.Utilities.MemberSymbolViewModel> memberViewModels, string defaultNamespace, string generatedNameTypeParameterSuffix, string languageName) { _notificationService = notificationService; MemberSelectionViewModel = new MemberSelectionViewModel( uiThreadOperationExecutor, memberViewModels, dependentsMap: null, destinationTypeKind: TypeKind.Interface, showDependentsButton: false, showPublicButton: false); DestinationViewModel = new NewTypeDestinationSelectionViewModel( defaultInterfaceName, languageName, defaultNamespace, generatedNameTypeParameterSuffix, conflictingTypeNames.ToImmutableArray(), syntaxFactsService); }
internal ExtractInterfaceDialogViewModel( ISyntaxFactsService syntaxFactsService, IGlyphService glyphService, INotificationService notificationService, string defaultInterfaceName, List <ISymbol> extractableMembers, List <string> conflictingTypeNames, string defaultNamespace, string generatedNameTypeParameterSuffix, string languageName ) { _notificationService = notificationService; DestinationViewModel = new NewTypeDestinationSelectionViewModel( defaultInterfaceName, languageName, defaultNamespace, generatedNameTypeParameterSuffix, conflictingTypeNames.ToImmutableArray(), syntaxFactsService ); MemberContainers = extractableMembers .Select(m => new MemberSymbolViewModel(m, glyphService)) .OrderBy(s => s.SymbolName) .ToList(); }