Exemplo n.º 1
0
 public SourcebergHostBuilderBase(ITypeSymbolProvider symbolProvider,
                                  ISourceAddition sourceAddition,
                                  IDiagnosticReporter <THostBuilder> diagnosticReporter)
 {
     _source        = sourceAddition;
     _reporter      = diagnosticReporter;
     SymbolProvider = symbolProvider;
     Resolvable     = symbolProvider.Source.GetAssemblySymbol(typeof(SourcebergAnalyzerAttribute).Assembly) is not null;
 }
Exemplo n.º 2
0
 public MemberComposerFactory(IEnumerable <IConditionResolverProvider> conditions,
                              IEnumerable <IMemberDataFormatterProvider> formatters,
                              ISourceAddition sourceAddition,
                              ITypeSymbolProvider symbolProvider)
 {
     _conditions     = conditions;
     _formatters     = formatters;
     _sourceAddition = sourceAddition;
     _symbolProvider = symbolProvider;
 }
Exemplo n.º 3
0
        public BinaryMemberCompositeBuilder(MemberMetaInfo member,
                                            GeneratingTypeName typeName,
                                            IMemberFormatNamespaceProvider namespaceProvider,
                                            IEnumerable <IBinaryMemberFeatureProvider> featureProviders,
                                            ISourceAddition sourceAddition)
        {
            _member         = member;
            _typeName       = typeName;
            _sourceAddition = sourceAddition;
            _features       = featureProviders.Where(feature => feature.ShouldApply(member))
                              .Select(feature => feature.GetComposingMethods(member, _memberComponents, _throwCollection))
                              .ToList();

            var namespaceInfo = namespaceProvider.GetUsingNamespaces(member);

            _normalNamespaces      = namespaceInfo.WithNamespaces.ToList();
            _prioritizedNamespaces = namespaceInfo.WithPrioritizedNamespaces.ToList();

            Debug.Assert(_member.ReturnType != null);
        }
Exemplo n.º 4
0
 public BinaryMemberCompositeBuilderProvider(IMemberFormatNamespaceProvider namespaceProvider, IEnumerable <IBinaryMemberFeatureProvider> featureProviders, ISourceAddition sourceAddition)
 {
     _namespaceProvider = namespaceProvider;
     _featureProviders  = featureProviders;
     _sourceAddition    = sourceAddition;
 }
 public TypeComposerBuilder(MemberComposerFactory memberFactory, ISourceAddition sourceAddition, ITypeSymbolProvider symbolProvider)
 {
     _memberFactory  = memberFactory;
     _sourceAddition = sourceAddition;
     _symbolSource   = symbolProvider;
 }
 public SourcebergGeneratorHostBuilder(ITypeSymbolProvider symbolProvider,
                                       ISourceAddition sourceAddition,
                                       IDiagnosticReporter <SourcebergGeneratorHostBuilder> diagnosticReporter)
     : base(symbolProvider, sourceAddition, diagnosticReporter)
 {
 }
Exemplo n.º 7
0
 public BinaryTypeCompositeBuilder(NamedTypeMetaInfo type, ISourceAddition sourceAddition, ITypeSymbolProvider symbolProvider)
 {
 }