Esempio n. 1
0
        public DefaultBindExtractor(
            ITypeInfoProvider typeInfoProvider,
            CompilationUnitSyntax compilationUnitSyntax
            )
        {
            if (typeInfoProvider is null)
            {
                throw new ArgumentNullException(nameof(typeInfoProvider));
            }

            if (compilationUnitSyntax is null)
            {
                throw new ArgumentNullException(nameof(compilationUnitSyntax));
            }

            _typeInfoProvider      = typeInfoProvider;
            _compilationUnitSyntax = compilationUnitSyntax;
            _semanticModel         = typeInfoProvider.GetSemanticModel(compilationUnitSyntax.SyntaxTree);

            _bindingContainers = new List <IBindingContainer>();
        }