https://github.com/deanthecoder/dtc.core
Core C# library (used by many deanthecoder repos)
https://github.com/deanthecoder/dtc.core
csharp framework utility-library
Last synced: about 8 hours ago
JSON representation
Core C# library (used by many deanthecoder repos)
- Host: GitHub
- URL: https://github.com/deanthecoder/dtc.core
- Owner: deanthecoder
- License: mit
- Created: 2024-09-06T17:58:55.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-06-28T16:51:56.000Z (3 days ago)
- Last Synced: 2026-06-28T18:22:14.036Z (3 days ago)
- Topics: csharp, framework, utility-library
- Language: C#
- Homepage:
- Size: 212 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://twitter.com/deanthecoder)
# DTC.Core - C# Core Library
**DTC.Core** is a reusable C# library built for .NET, designed primarily for use with [Avalonia UI](https://avaloniaui.net/) applications. It contains a collection of utility classes, commands, extensions, converters, and more to simplify common tasks and promote code reuse across different projects.
## Project Overview
This library provides a range of useful functionalities, from file commands and data converters to extensions for various .NET types. It helps streamline operations such as file handling, data conversion, and UI-related tasks.
The core components of this library include:
- **Commands**: Reusable command patterns for actions such as file open/save.
- **Converters**: Converters to simplify data transformations (e.g., Markdown to UI elements).
- **Extensions**: Helper methods that extend the capabilities of core .NET types like `String`, `FileInfo`, and `Enumerable`.
- **UI Components**: Avalonia-specific components for handling dialogs and dispatching events.
- **Utilities**: General-purpose utilities like a logger, disposable resources, and periodic actions.
### Key Files and Directories
- **Commands**:
Contains command patterns like `FileOpenCommand`, `FileSaveCommand`, and `RelayCommand`. These commands follow the MVVM pattern and are designed to be reusable across different projects.
- **Converters**:
Includes converters like `FileInfoToLeafNameConverter` and `MarkdownToInlinesConverter` that are designed to simplify UI bindings in Avalonia applications.
- **Markdown**:
The `DTC.Core.Markdown` namespace exposes `ConsoleMarkdown.Write(...)`, which allows Markdown to be written into a stream suitable for reading in the text console.
- **Extensions**:
Provides extension methods for core .NET types such as `StringExtensions`, `FileInfoExtensions`, and `EnumerableExtensions` to make common operations more concise and readable.
- **UI**:
Avalonia-specific UI components, including dialog services (`DialogService`) and message dialogs (`MessageDialog.axaml`). These components help with displaying dialogs and managing UI interactions.
- **Validators**:
Contains custom validation attributes, such as `HexStringAttribute` for validating hexadecimal strings.
## License
This project is licensed under the MIT License. See the LICENSE file for details.