コード例 #1
0
        public async Task GetMiddlewarePipelineAdditions_Returns_On_All_Sources_Processed()
        {
            _lcManager.NotifyExpectedMiddlewareSource();
            _lcManager.NotifyExpectedMiddlewareSource();

            var result = _lcManager.GetMiddlewarePipelineAdditions(_token);
            await Task.Delay(ProcessingAllowanceDelay);

            Assert.False(result.IsCompleted);

            _lcManager.NotifyMiddlewareSourceProcessed();
            await Task.Delay(ProcessingAllowanceDelay);

            Assert.False(result.IsCompleted);

            _lcManager.NotifyMiddlewareSourceProcessed();
            await Task.Delay(ProcessingAllowanceDelay);

            Assert.True(result.IsCompletedSuccessfully);
        }
コード例 #2
0
ファイル: HttpHandlerClassConverter.cs プロジェクト: aws/cta
 public HttpHandlerClassConverter(
     string relativePath,
     string sourceProjectPath,
     SemanticModel sourceFileSemanticModel,
     TypeDeclarationSyntax originalDeclarationSyntax,
     INamedTypeSymbol originalClassSymbol,
     LifecycleManagerService lifecycleManager,
     TaskManagerService taskManager,
     WebFormMetricContext metricsContext)
     : base(relativePath, sourceProjectPath, sourceFileSemanticModel, originalDeclarationSyntax, originalClassSymbol, taskManager)
 {
     _lifecycleManager = lifecycleManager;
     _lifecycleManager.NotifyExpectedMiddlewareSource();
     _metricsContext = metricsContext;
 }
コード例 #3
0
        public GlobalClassConverter(
            string relativePath,
            string sourceProjectPath,
            SemanticModel sourceFileSemanticModel,
            TypeDeclarationSyntax originalDeclarationSyntax,
            INamedTypeSymbol originalClassSymbol,
            LifecycleManagerService lifecycleManager,
            TaskManagerService taskManager,
            WebFormMetricContext metricsContext)
            : base(relativePath, sourceProjectPath, sourceFileSemanticModel, originalDeclarationSyntax, originalClassSymbol, taskManager)
        {
            _lifecycleManager = lifecycleManager;
            _lifecycleManager.NotifyExpectedMiddlewareSource();

            _configureMethodStatements = new List <StatementSyntax>();
            _keepableMethods           = new List <MethodDeclarationSyntax>();
            _endOfClassComments        = new List <string>();
            _metricsContext            = metricsContext;
        }