Esempio n. 1
0
        internal CSharpVBProjectBinder(IServiceProvider serviceProvider, IFileSystem fileSystem, IRuleSetReferenceChecker ruleSetReferenceChecker, ICSharpVBAdditionalFileReferenceChecker additionalFileReferenceChecker, CreateBindingOperationFunc createBindingOperationFunc)
        {
            if (serviceProvider == null)
            {
                throw new ArgumentNullException(nameof(serviceProvider));
            }
            this.fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
            this.ruleSetReferenceChecker        = ruleSetReferenceChecker ?? throw new ArgumentNullException(nameof(ruleSetReferenceChecker));
            this.additionalFileReferenceChecker = additionalFileReferenceChecker ?? throw new ArgumentNullException(nameof(additionalFileReferenceChecker));
            this.createBindingOperationFunc     = createBindingOperationFunc ?? throw new ArgumentNullException(nameof(createBindingOperationFunc));

            ruleSetSerializer = serviceProvider.GetService <IRuleSetSerializer>();
            ruleSetSerializer.AssertLocalServiceIsNotNull();
        }
        internal CSharpVBBindingOperation(IServiceProvider serviceProvider,
                                          Project project,
                                          ICSharpVBBindingConfig cSharpVBBindingConfig,
                                          IFileSystem fileSystem,
                                          IAdditionalFileConflictChecker additionalFileConflictChecker,
                                          IRuleSetReferenceChecker ruleSetReferenceChecker)
        {
            this.serviceProvider               = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider));
            this.initializedProject            = project ?? throw new ArgumentNullException(nameof(project));
            this.cSharpVBBindingConfig         = cSharpVBBindingConfig ?? throw new ArgumentNullException(nameof(cSharpVBBindingConfig));
            this.fileSystem                    = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
            this.additionalFileConflictChecker = additionalFileConflictChecker ?? throw new ArgumentNullException(nameof(additionalFileConflictChecker));
            this.ruleSetReferenceChecker       = ruleSetReferenceChecker ?? throw new ArgumentNullException(nameof(ruleSetReferenceChecker));

            this.sourceControlledFileSystem = this.serviceProvider.GetService <ISourceControlledFileSystem>();
            this.sourceControlledFileSystem.AssertLocalServiceIsNotNull();

            this.ruleSetSerializer = this.serviceProvider.GetService <IRuleSetSerializer>();
            this.ruleSetSerializer.AssertLocalServiceIsNotNull();
        }