Orc.LicenseManager is a library that makes it very easy to manage licenses for commercial software. It provides client and WPF UI components for license validation, network licensing, and license visualization.
The solution consists of the following projects:
Orc.LicenseManager.Client— Core library with license management, validation, and service abstractions.Orc.LicenseManager.Client.WPF— WPF UI components (views, view models, converters) for license dialogs.Orc.LicenseManager.Server— Server-side license validation support.Orc.LicenseManager.Tests— Unit and integration tests for the client libraries.
These rules are non-negotiable. Violating them causes broken builds, crashes, or downstream breakage.
Files matching *.generated.cs are auto-generated.
- NEVER manually edit these files
This project maintains stable ABI / API. Breaking changes break downstream apps.
| Allowed | Never |
|---|---|
| Add new overloads | Modify existing signatures |
| Add new methods | Remove public APIs |
| Add new classes | Change return types |
Building alone is NOT sufficient. Run tests before claiming completion (see Commands).
Public API snapshot tests (PublicApiFacts) will fail if public API surface changes unexpectedly. Update the .verified.txt snapshots only when an intentional API change has been made and reviewed.
Direct commits to protected branches are a policy violation.
| Repository | Protected Branches |
|---|---|
| Orc.LicenseManager | master |
| Orc.LicenseManager | develop |
Required workflow:
- Create a feature branch FIRST — Use naming convention:
feature/issue-NNNN-description - Make all commits on the feature branch — Never commit directly to protected branches
- Submit a Pull Request — Changes must be reviewed by a human before merging
# CORRECT — Always create a feature branch first
git checkout -b feature/issue-1234-fix-description
# NEVER DO THIS — Policy violation
git checkout develop && git commit # FORBIDDEN
# NEVER DO THIS — Policy violation
git checkout master && git commit # FORBIDDENSingle source of truth for all commands:
| Task | Command |
|---|---|
| Build | dotnet cake --target=build |
| Test | dotnet cake --target=test |
| Build and test | dotnet cake --target=buildandtest |
Orc.LicenseManager.Client => Core license management (platform-independent)
Orc.LicenseManager.Client.WPF => WPF UI layer (views, view models, dialogs)
Orc.LicenseManager.Server => Server-side validation support
Orc.LicenseManager.Tests => Tests for client libraries
| Directory | Editable? | Notes |
|---|---|---|
*.generated.cs |
No | Leave as-is |
src/Orc.LicenseManager.Client/ |
Yes | Core services, models, interfaces |
src/Orc.LicenseManager.Client.WPF/ |
Yes | WPF views, view models, converters |
src/Orc.LicenseManager.Server/ |
Yes | Server-side models and services |
src/Orc.LicenseManager.Tests/ |
Yes | Tests — keep passing |
deployment/ |
No | Deployment / build scripts |
| Namespace | Purpose |
|---|---|
Orc.LicenseManager |
Core services, models, and interfaces |
Orc.LicenseManager (WPF) |
Views, view models, converters, and markup extensions |
- Follow the style used by the .NET Foundation coding guidelines, with the following exceptions:
- Apply
readonlyon class-level private variables that are assigned in the constructor - Use 4 spaces for indentation — tabs do not exist
- Apply
| Anti-Pattern | Why |
|---|---|
| Modifying method signatures | ABI breaking |
Manual edits to *.generated.cs |
Overwritten on regenerate |
| Using default parameters in public APIs | ABI breaking |
| Skipping failing tests | Unacceptable — tests must pass |
dotnet cake --target=testNON-NEGOTIABLE: Tests must PASS before claiming completion.
- Do NOT skip failing tests
- Do NOT claim completion if tests fail
- Do NOT use
SkipExceptionto work around failures
- Use NUnit to write tests
- Create a Facts class for a feature
- Use PascalCase words separated by underscores for test method names (e.g.
Feature_Does_Work)
[Test]
public void Feature_Does_Work()
{
var result = 47 - 5;
Assert.That(result, Is.EqualTo(42));
}The test project includes PublicApiFacts tests that capture the public API surface of each assembly into .verified.txt files. These tests will fail if the public API changes unexpectedly.
- If you intentionally change a public API, update the corresponding
.verified.txtfile undersrc/Orc.LicenseManager.Tests/. - Never modify these files unless an intentional, reviewed API change has been made.
Philosophy: Tests FAIL when wrong, never skip (except missing hardware).
- Establish baseline — What's the known-good state?
- One change at a time — Verify each change before proceeding
- Track changes in a table — Log what you changed and the result
- Platform differences are signals — If X works and Y fails, the difference IS the answer
- Revert if worse — Don't pile fixes on top of failures
| Topic | Document |
|---|---|
| Contributing guidelines | CONTRIBUTING.md |
| Pull request template | PULL_REQUEST_TEMPLATE.md |
| Documentation portal | https://opensource.wildgums.com |