XmiSchema.Core
0.9.1
dotnet add package XmiSchema.Core --version 0.9.1
NuGet\Install-Package XmiSchema.Core -Version 0.9.1
<PackageReference Include="XmiSchema.Core" Version="0.9.1" />
<PackageVersion Include="XmiSchema.Core" Version="0.9.1" />
<PackageReference Include="XmiSchema.Core" />
paket add XmiSchema.Core --version 0.9.1
#r "nuget: XmiSchema.Core, 0.9.1"
#:package XmiSchema.Core@0.9.1
#addin nuget:?package=XmiSchema.Core&version=0.9.1
#tool nuget:?package=XmiSchema.Core&version=0.9.1
XmiSchema Library
Overview
XmiSchema.Core is a .NET 8 class library that models Cross Model Information (XMI) graphs for built-environment data. The package exposes strongly-typed entities (materials, storeys, geometries, relationships) plus the XmiManager helper so downstream projects or NuGet consumers can build, query, and export graph payloads consistently.
Installation
dotnet add package XmiSchema.Core
The package targets .NET 8.0 and ships as a reusable dependency for desktop, web, or service workloads.
Quick Start
using System.Collections.Generic;
using XmiSchema.Core.Enums;
using XmiSchema.Core.Entities;
using XmiSchema.Core.Manager;
using XmiSchema.Core.Models;
using XmiSchema.Core.Parameters;
var manager = new XmiManager();
manager.Models.Add(new XmiModel());
var storey = manager.CreateStorey(0, "Storey-1", "Level 1", "ifc-guid", "LEVEL_1", "Ground floor", 0, 900, "Fx", "Fy", "Fz");
var point = manager.CreatePoint3D(0, "pt-1", "Grid A/1", "pt-guid", "PT_A1", "Column base", 0, 0, 0);
var connection = manager.CreateStructuralPointConnection(0, "pc-1", "Node", "pc-guid", "PC_A1", "Column node", storey, point);
var material = manager.CreateMaterial(0, "mat-1", "Steel", "mat-guid", "MAT_S355", "Sample material", XmiMaterialTypeEnum.Steel, 50, 78.5, "210000", "81000", "0.3", 1.2);
var section = manager.CreateCrossSection(
0,
"sec-1",
"IPE300",
"sec-guid",
"SEC_IPE300",
"Beam section",
material,
XmiShapeEnum.IShape,
new IShapeParameters(0.3, 0.15, 0.02, 0.012, 0.008),
0.0009,
0.00012,
0.00035,
0.045,
0.09,
0.0003,
0.0004,
0.0005,
0.0006,
0.00007);
var curveMember = manager.CreateStructuralCurveMember(0, "cur-1", "Beam A", "cur-guid", "BEAM_A", "Sample beam", section, storey, XmiStructuralCurveMemberTypeEnum.Beam,
new List<XmiStructuralPointConnection> { connection, connection }, new List<XmiSegment> { new("seg-1", "Segment", "seg-guid", "SEG_1", "Segment", 0f, XmiSegmentTypeEnum.Line) },
XmiSystemLineEnum.MiddleMiddle, connection, connection, 5, "1,0,0", "0,1,0", "0,0,1", 0, 0, 0, 0, 0, 0, "Fixed", "Pinned");
var json = manager.BuildJson(0);
Console.WriteLine(json);
For a full runnable sample see tests/Examples/StructuralGraphSample.
Folder Layout
xmi-schema-csharp/
├── IXmiManager.cs / XmiManager.cs # Public orchestration API
├── Models/ # Bases, entities, geometries, relationships, and XmiModel helpers
├── Utils/ # Shared utilities (enum converters, extensions)
├── tests/
│ ├── Unit/XmiSchema.Core.Tests # xUnit project with one fixture per production class
│ └── Examples/StructuralGraphSample # Console sample showing library usage
├── AGENTS.md / PLAN.md / README.md # Contributor docs
└── xmi-schema-Csharp.Core.csproj # Library project file
Each subdirectory within Models/ includes its own README that documents constructor expectations and naming conventions.
Testing & CI
- Local workflow:
Run these commands before every commit or pull request so the xUnit suite (one fixture per production class) stays green. Builders underdotnet restore xmi-schema-Csharp.Core.sln dotnet test xmi-schema-Csharp.Core.sln --configuration Releasetests/Unit/XmiSchema.Core.Tests/Supportprovide deterministic sample models for the tests. - Examples: run
dotnet run --project tests/Examples/StructuralGraphSample/StructuralGraphSample.csprojto see howXmiManagercomposes a graph; treat it as an integration sanity check when touching graph construction logic. - GitHub Actions:
Pull Request Testsrestores, builds, and tests the solution on every pull request targeting any branch.Release Build & Publishruns after pushes tomain, repeats restore/build/test, and then packs/pushes the NuGet package (using the README captured in the.csproj). Both workflows rely on the same commands shown above, so matching them locally avoids surprises in CI.
Contributing
dotnet restore- Update or add XML documentation whenever a public API changes.
- Add or update tests in
tests/Unit/XmiSchema.Core.Testsand ensuredotnet testpasses. - Document new behavior in the relevant README (folder-level or root).
See AGENTS.md for detailed contributor guidelines and the long-term plan in PLAN.md.
License
Distributed under the terms of the project LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
- QuikGraph (>= 2.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.9.1 | 500 | 12/5/2025 | |
| 0.9.0 | 208 | 12/5/2025 | |
| 0.8.0 | 215 | 12/4/2025 | |
| 0.7.0 | 693 | 12/3/2025 | |
| 0.6.0 | 690 | 12/2/2025 | |
| 0.5.1 | 683 | 12/2/2025 | |
| 0.5.0 | 679 | 12/2/2025 | |
| 0.4.0 | 697 | 12/2/2025 | |
| 0.3.0 | 681 | 12/2/2025 | |
| 0.2.19 | 206 | 6/24/2025 | |
| 0.2.18 | 194 | 6/24/2025 | |
| 0.2.17 | 219 | 6/17/2025 | |
| 0.2.16 | 198 | 6/17/2025 | |
| 0.2.15 | 199 | 6/17/2025 | |
| 0.2.14 | 205 | 6/17/2025 | |
| 0.2.13 | 201 | 6/17/2025 | |
| 0.2.12 | 195 | 6/16/2025 | |
| 0.2.11 | 356 | 6/10/2025 | |
| 0.2.10 | 351 | 6/10/2025 | |
| 0.2.9 | 331 | 6/10/2025 |