# Flowgix.Core F# Sample

This sample demonstrates how to use Flowgix.Core in an F# application. It shows how to create and use plugins, define node types, and work with the graph serialization system.

## Features Demonstrated

- Creating port types (number and text ports)
- Defining node types (addition and text concatenation)
- Creating and registering plugins
- Working with the plugin manager
- Node resolution and execution
- Graph serialization and deserialization

## Project Structure

```
samples/FSharp/
├── Program.fs           # Main sample code
├── FlowgixSample.fsproj # Project file
└── README.md           # This file
```

## Running the Sample

1. Ensure you have .NET 8.0 SDK installed
2. Navigate to the sample directory:
   ```bash
   cd samples/FSharp
   ```
3. Build and run the sample:
   ```bash
   dotnet build
   dotnet run
   ```

## Sample Output

The sample will:
1. Create and register a plugin with two node types
2. Execute an addition node (5 + 3)
3. Execute a text concatenation node ("Hello" + " World")
4. Serialize the graph to JSON
5. Deserialize the graph back from JSON

Expected output will look something like:
```
Addition result: 8
Concatenation result: Hello World

Serialized graph:
{...}

Deserialized graph node count: 2
```

## Key Concepts

- **Port Types**: Define the data types that can flow through nodes
- **Node Types**: Define the behavior and structure of nodes
- **Plugins**: Package node types and port types together
- **Graph Serialization**: Convert graph structures to/from JSON
- **Node Resolution**: Execute nodes and process their data

## Dependencies

- Flowgix.Core
- .NET 8.0 SDK 