CoreInterfaces 2025.10.26
dotnet add package CoreInterfaces --version 2025.10.26
NuGet\Install-Package CoreInterfaces -Version 2025.10.26
<PackageReference Include="CoreInterfaces" Version="2025.10.26" />
<PackageVersion Include="CoreInterfaces" Version="2025.10.26" />
<PackageReference Include="CoreInterfaces" />
paket add CoreInterfaces --version 2025.10.26
#r "nuget: CoreInterfaces, 2025.10.26"
#:package CoreInterfaces@2025.10.26
#addin nuget:?package=CoreInterfaces&version=2025.10.26
#tool nuget:?package=CoreInterfaces&version=2025.10.26
Core Interfaces for DeveloperKit
CoreInterfaces is a foundational library that provides common abstractions and standard contracts for .NET applications, enabling consistent implementation patterns across the DeveloperKit ecosystem.
✨ Features
- Standardized Response Objects: Consistent patterns for API responses and process results
- Form Controls: Base interfaces for UI components and forms
- State Management: Interfaces for managing read-only and mutable states
- Web API Support: Standardized response formats for web APIs
- Type Safety: Strongly-typed interfaces with generic support
- Dependency Injection: First-class support for .NET Core DI
🚀 Getting Started
Prerequisites
- .NET Standard 2.0+ or .NET 6.0+
- Visual Studio 2022 or VS Code with C# Dev Kit (recommended)
Installation
dotnet add package DevKit.CoreInterfaces
🛠 Core Components
Response Interfaces
IProcessResponse<T>
Standard response object for operation results with success/failure state and messages.
public interface IProcessResponse<T>
{
T Data { get; set; }
ProcessResult ProcessResult { get; set; }
string SuccessMessage { get; set; }
string ErrorMessage { get; set; }
}
IWebApiResponse<T>
Standardized response format for Web API endpoints.
public interface IWebApiResponse<T>
{
bool Success { get; set; }
string Message { get; set; }
T Data { get; set; }
List<string> Errors { get; set; }
}
Form Controls
IForm
Base interface for form controls.
public interface IForm
{
void Clear();
void LoadData(object data);
bool Validate();
}
IPrincipal
Interface for principal UI components.
State Management
IReadOnly
Interface for read-only state management.
public interface IReadOnly
{
bool IsReadOnly { get; set; }
void SetReadOnly(bool readOnly);
}
💻 Usage Examples
Creating a Standard API Response
public IWebApiResponse<User> GetUser(int userId)
{
try
{
var user = _userRepository.GetById(userId);
if (user == null)
{
return new WebApiResponse<User>
{
Success = false,
Message = "User not found",
Errors = new List<string> { $"User with ID {userId} not found" }
};
}
return new WebApiResponse<User>
{
Success = true,
Data = user,
Message = "User retrieved successfully"
};
}
catch (Exception ex)
{
_logger.LogError(ex, "Error retrieving user {UserId}", userId);
return new WebApiResponse<User>
{
Success = false,
Message = "An error occurred while retrieving the user",
Errors = new List<string> { ex.Message }
};
}
}
Implementing a Read-Only Form
public class UserDetailsForm : IForm, IReadOnly
{
private TextBox _nameTextBox;
private TextBox _emailTextBox;
private bool _isReadOnly;
public bool IsReadOnly
{
get => _isReadOnly;
set
{
_isReadOnly = value;
UpdateReadOnlyState();
}
}
public void Clear()
{
_nameTextBox.Text = string.Empty;
_emailTextBox.Text = string.Empty;
}
public void LoadData(object data)
{
if (data is User user)
{
_nameTextBox.Text = user.Name;
_emailTextBox.Text = user.Email;
}
}
public bool Validate()
{
// Validation logic here
return true;
}
private void UpdateReadOnlyState()
{
_nameTextBox.ReadOnly = _isReadOnly;
_emailTextBox.ReadOnly = _isReadOnly;
}
}
📚 API Reference
Enums
ProcessResult
Success: Operation completed successfullyWarning: Operation completed with warningsError: Operation failed with errorsValidationError: Operation failed due to validation errors
Interfaces
| Interface | Description |
|---|---|
IForm |
Base interface for form controls |
IPrincipal |
Interface for principal UI components |
IReadOnly |
Manages read-only state |
IProcessResponse<T> |
Standard response for operations |
IWebApiResponse<T> |
Standard response for Web APIs |
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please read our contributing guidelines for details on our code of conduct and the process for submitting pull requests.
📫 Support
For support, please open an issue in our issue tracker.
<div align="center"> Made with ❤️ by the DeveloperKit Team </div> // Implementación de IWebApiResponse public class WebApiResponse<T> : IWebApiResponse<T> { public T Data { get; set; } public bool IsSuccessful { get; set; } public string SuccessMessage { get; set; } public string ErrorMessage { get; set; } }
// Uso de IForm public class MyForm : IForm { public Type Form { get; set; } }
// Uso de IReadOnly public class MyReadOnlyComponent : IReadOnly { public bool ReadOnly { get; set; } public bool IgnoreReadOnly { get; set; } }
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 is compatible. 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. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
-
net6.0
-
net8.0
-
net9.0
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CoreInterfaces:
| Package | Downloads |
|---|---|
|
CoreControlesUsuario
CoreControlesUsuario es una biblioteca de extensiones y componentes personalizados para DevExpress WinForms. Proporciona herramientas optimizadas para el desarrollo de aplicaciones Windows Forms, incluyendo extensiones para GridControl, LookUpEdit y otros controles populares de DevExpress. Compatible con .NET 9.0 y Windows Forms. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2025.10.26 | 73 | 10/26/2025 | |
| 2025.10.10 | 68 | 10/10/2025 | |
| 2025.8.19 | 152 | 8/19/2025 | |
| 2025.7.13 | 190 | 7/14/2025 | |
| 2025.6.11 | 308 | 6/11/2025 | |
| 2025.5.23 | 140 | 5/23/2025 | |
| 2025.5.1 | 181 | 5/1/2025 | |
| 2025.4.8 | 200 | 4/6/2025 | |
| 2025.4.7 | 169 | 4/6/2025 | |
| 2025.4.6 | 230 | 4/6/2025 | |
| 2025.3.22 | 180 | 3/22/2025 | |
| 2025.3.8 | 155 | 3/9/2025 | |
| 2025.2.1 | 209 | 2/1/2025 | |
| 2024.11.12 | 166 | 11/12/2024 | |
| 2024.10.6 | 137 | 10/4/2024 | |
| 2024.7.24 | 167 | 7/24/2024 | |
| 2023.11.30 | 308 | 12/11/2023 | |
| 2023.11.25 | 145 | 11/27/2023 | |
| 2023.11.15 | 132 | 11/16/2023 | |
| 2023.11.11 | 116 | 11/12/2023 | |
| 2023.8.14 | 210 | 8/14/2023 | |
| 2023.8.9 | 182 | 8/9/2023 | |
| 2023.5.20 | 213 | 5/16/2023 | |
| 2023.5.14 | 203 | 5/8/2023 | |
| 2023.3.12 | 284 | 3/13/2023 | |
| 2023.2.27 | 325 | 2/27/2023 | |
| 2023.2.26 | 358 | 2/27/2023 | |
| 2023.2.18 | 303 | 2/19/2023 | |
| 2023.2.11 | 322 | 2/11/2023 | |
| 2023.1.26 | 376 | 1/27/2023 | |
| 2023.1.24 | 373 | 1/24/2023 | |
| 2023.1.17 | 375 | 1/17/2023 | |
| 2023.1.16 | 355 | 1/16/2023 | |
| 2023.1.8 | 401 | 1/8/2023 | |
| 2023.1.7 | 373 | 1/7/2023 | |
| 2022.12.30 | 380 | 12/30/2022 | |
| 2022.12.6 | 375 | 12/5/2022 | |
| 2022.12.5 | 368 | 12/5/2022 | |
| 2022.10.21 | 481 | 10/22/2022 | |
| 2022.10.11 | 498 | 10/12/2022 | |
| 2022.10.10 | 475 | 10/11/2022 | |
| 2022.10.5 | 469 | 10/6/2022 | |
| 2022.10.4 | 636 | 10/5/2022 | |
| 2022.1.7 | 448 | 1/7/2023 |