# corewcf/corewcf architecture

> Architecture diagram of the GitHub repository corewcf/corewcf, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/corewcf/corewcf
- Repository: https://github.com/corewcf/corewcf

## Overview

CoreWCF ports the service side of WCF to .NET Core, letting existing WCF services move to the platform. The principal workflow is configuring a service and its endpoints, accepting a request over a selected transport, decoding and dispatching it to service operations, and returning a response. The repository also includes security, Web HTTP, and message-broker transports. The graph combines documented product scope with the sampled configuration and framing code; dashed edges mark runtime connections not directly shown in the excerpts.

Main entry points: [`src/CoreWCF.Primitives/src/CoreWCF/Dispatcher/ServiceDispatcher.cs`](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Dispatcher/ServiceDispatcher.cs) (Service dispatcher), [`src/CoreWCF.Primitives/src/CoreWCF/Configuration/IServiceBuilder.cs`](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Configuration/IServiceBuilder.cs) (Service builder), [`src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ConfigurationManagerServiceModelOptions.cs`](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ConfigurationManagerServiceModelOptions.cs) (XML configuration), [`src/CoreWCF.Primitives/src/CoreWCF/Channels/Binding.cs`](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Channels/Binding.cs) (Bindings and elements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Service setup"]
  node_config["XML configuration"]
  node_builder["Service builder<br/>[IServiceBuilder.cs]"]
  node_bindings["Bindings and elements<br/>[Binding.cs]"]
end

subgraph group_runtime["Service runtime"]
  node_dispatcher["Service dispatcher"]
  node_framing["Framing handler"]
  node_diagnostics["Diagnostics"]
end

subgraph group_transports["Transports"]
  node_http["HTTP transport"]
  node_webhttp["Web HTTP"]
  node_nettcp["NetTcp hosting"]
  node_namedpipe["Named pipes"]
  node_kafka["Kafka transport"]
  node_rabbitmq["RabbitMQ transport"]
  node_msmq["MSMQ support"]
end

subgraph group_security["Security and protocols"]
  node_securityheaders["Message security"]
  node_sessiontokens["Session tokens"]
end

node_developer(("Service developer"))

node_developer -.->|"configures service"| node_builder
node_config -->|"configures endpoints"| node_builder
node_config -->|"creates bindings"| node_bindings
node_builder -.->|"registers services"| node_dispatcher
node_bindings -.->|"builds channels"| node_dispatcher
node_http -.->|"dispatches requests"| node_dispatcher
node_webhttp -.->|"converts query values"| node_dispatcher
node_nettcp -->|"sets up framing"| node_framing
node_framing -->|"builds dispatcher"| node_dispatcher
node_namedpipe -.->|"serves requests"| node_dispatcher
node_kafka -.->|"delivers messages"| node_dispatcher
node_rabbitmq -.->|"transports messages"| node_dispatcher
node_msmq -.->|"receives messages"| node_dispatcher
node_dispatcher -.->|"checks message security"| node_securityheaders
node_securityheaders -.->|"uses session tokens"| node_sessiontokens
node_dispatcher -.->|"reports errors"| node_diagnostics

click node_config "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ConfigurationManagerServiceModelOptions.cs"
click node_builder "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Configuration/IServiceBuilder.cs"
click node_bindings "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Channels/Binding.cs"
click node_dispatcher "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Dispatcher/ServiceDispatcher.cs"
click node_framing "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.NetFramingBase/src/CoreWCF/Channels/Framing/NetMessageFramingConnectionHandler.cs"
click node_diagnostics "https://github.com/corewcf/corewcf/blob/main/src/Common/src/CoreWCF/DiagnosticUtility.cs"
click node_http "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Http/src/CoreWCF/Channels/HttpTransportServiceBuilder.cs"
click node_webhttp "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.WebHttp/src/CoreWCF/Dispatcher/QueryStringConverter.cs"
click node_nettcp "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.NetTcp/src/CoreWCF/Configuration/ServiceModelWebHostBuilderExtensions.cs"
click node_namedpipe "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.NetNamedPipe/src/CoreWCF/Channels/NamedPipeTransportManager.cs"
click node_kafka "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Kafka/src/CoreWCF/Channels/KafkaTransportPump.cs"
click node_rabbitmq "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.RabbitMQ.Client/src/CoreWCF/ServiceModel/Channels/RabbitMqOutputChannel.cs"
click node_msmq "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.MSMQ/src/CoreWCF/Channels/MsmqReceiveContext.cs"
click node_securityheaders "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Security/LaxModeSecurityHeaderElementInferenceEngine.cs"
click node_sessiontokens "https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Tokens/SessionSecurityTokenHandler.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config,node_builder,node_bindings toneBlue
class node_dispatcher,node_framing,node_diagnostics toneAmber
class node_http,node_webhttp,node_nettcp,node_namedpipe,node_kafka,node_rabbitmq,node_msmq toneMint
class node_securityheaders,node_sessiontokens toneRose
class node_developer toneIndigo
```

## Components

### Service setup

- [XML configuration](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ConfigurationManagerServiceModelOptions.cs): `src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ConfigurationManagerServiceModelOptions.cs`
- [Service builder](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Configuration/IServiceBuilder.cs): `src/CoreWCF.Primitives/src/CoreWCF/Configuration/IServiceBuilder.cs`
- [Bindings and elements](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Channels/Binding.cs): `src/CoreWCF.Primitives/src/CoreWCF/Channels/Binding.cs`

### Service runtime

- [Service dispatcher](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Dispatcher/ServiceDispatcher.cs): `src/CoreWCF.Primitives/src/CoreWCF/Dispatcher/ServiceDispatcher.cs`
- [Framing handler](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.NetFramingBase/src/CoreWCF/Channels/Framing/NetMessageFramingConnectionHandler.cs): `src/CoreWCF.NetFramingBase/src/CoreWCF/Channels/Framing/NetMessageFramingConnectionHandler.cs`
- [Diagnostics](https://github.com/corewcf/corewcf/blob/main/src/Common/src/CoreWCF/DiagnosticUtility.cs): `src/Common/src/CoreWCF/DiagnosticUtility.cs`

### Transports

- [HTTP transport](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Http/src/CoreWCF/Channels/HttpTransportServiceBuilder.cs): `src/CoreWCF.Http/src/CoreWCF/Channels/HttpTransportServiceBuilder.cs`
- [Web HTTP](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.WebHttp/src/CoreWCF/Dispatcher/QueryStringConverter.cs): `src/CoreWCF.WebHttp/src/CoreWCF/Dispatcher/QueryStringConverter.cs`
- [NetTcp hosting](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.NetTcp/src/CoreWCF/Configuration/ServiceModelWebHostBuilderExtensions.cs): `src/CoreWCF.NetTcp/src/CoreWCF/Configuration/ServiceModelWebHostBuilderExtensions.cs`
- [Named pipes](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.NetNamedPipe/src/CoreWCF/Channels/NamedPipeTransportManager.cs): `src/CoreWCF.NetNamedPipe/src/CoreWCF/Channels/NamedPipeTransportManager.cs`
- [Kafka transport](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Kafka/src/CoreWCF/Channels/KafkaTransportPump.cs): `src/CoreWCF.Kafka/src/CoreWCF/Channels/KafkaTransportPump.cs`
- [RabbitMQ transport](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.RabbitMQ.Client/src/CoreWCF/ServiceModel/Channels/RabbitMqOutputChannel.cs): `src/CoreWCF.RabbitMQ.Client/src/CoreWCF/ServiceModel/Channels/RabbitMqOutputChannel.cs`
- [MSMQ support](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.MSMQ/src/CoreWCF/Channels/MsmqReceiveContext.cs): `src/CoreWCF.MSMQ/src/CoreWCF/Channels/MsmqReceiveContext.cs`

### Security and protocols

- [Message security](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/Security/LaxModeSecurityHeaderElementInferenceEngine.cs): `src/CoreWCF.Primitives/src/CoreWCF/Security/LaxModeSecurityHeaderElementInferenceEngine.cs`
- [Session tokens](https://github.com/corewcf/corewcf/blob/main/src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Tokens/SessionSecurityTokenHandler.cs): `src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Tokens/SessionSecurityTokenHandler.cs`

### Other components

- **Service developer**

## Connections

- Service developer → Service builder: configures service (evidence: `README.md`)
- XML configuration → Service builder: configures endpoints (evidence: `src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ConfigurationManagerServiceModelOptions.cs`)
- XML configuration → Bindings and elements: creates bindings (evidence: `src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ConfigurationManagerServiceModelOptions.cs`)
- Service builder → Service dispatcher: registers services
- Bindings and elements → Service dispatcher: builds channels
- HTTP transport → Service dispatcher: dispatches requests
- Web HTTP → Service dispatcher: converts query values
- NetTcp hosting → Framing handler: sets up framing (evidence: `src/CoreWCF.NetTcp/src/CoreWCF/Configuration/ServiceModelWebHostBuilderExtensions.cs`)
- Framing handler → Service dispatcher: builds dispatcher (evidence: `src/CoreWCF.NetFramingBase/src/CoreWCF/Channels/Framing/NetMessageFramingConnectionHandler.cs`)
- Named pipes → Service dispatcher: serves requests
- Kafka transport → Service dispatcher: delivers messages
- RabbitMQ transport → Service dispatcher: transports messages
- MSMQ support → Service dispatcher: receives messages
- Service dispatcher → Message security: checks message security
- Message security → Session tokens: uses session tokens
- Service dispatcher → Diagnostics: reports errors
