Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }