CoreInterfaces 2026.1.19
dotnet add package CoreInterfaces --version 2026.1.19
NuGet\Install-Package CoreInterfaces -Version 2026.1.19
<PackageReference Include="CoreInterfaces" Version="2026.1.19" />
<PackageVersion Include="CoreInterfaces" Version="2026.1.19" />
<PackageReference Include="CoreInterfaces" />
paket add CoreInterfaces --version 2026.1.19
#r "nuget: CoreInterfaces, 2026.1.19"
#:package CoreInterfaces@2026.1.19
#addin nuget:?package=CoreInterfaces&version=2026.1.19
#tool nuget:?package=CoreInterfaces&version=2026.1.19
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 is compatible. 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
-
net10.0
-
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 |
|---|---|---|
| 2026.1.19 | 74 | 1/17/2026 |
| 2026.1.18 | 47 | 1/17/2026 |
| 2026.1.17 | 53 | 1/17/2026 |
| 2025.11.11 | 298 | 11/11/2025 |
| 2025.10.26 | 161 | 10/26/2025 |
| 2025.10.10 | 107 | 10/10/2025 |
| 2025.8.19 | 193 | 8/19/2025 |
| 2025.7.13 | 247 | 7/14/2025 |
| 2025.6.11 | 343 | 6/11/2025 |
| 2025.5.23 | 180 | 5/23/2025 |
| 2025.5.1 | 211 | 5/1/2025 |
| 2025.4.8 | 231 | 4/6/2025 |
| 2025.4.7 | 199 | 4/6/2025 |
| 2025.4.6 | 294 | 4/6/2025 |
| 2025.3.22 | 213 | 3/22/2025 |
| 2025.3.8 | 195 | 3/9/2025 |
| 2025.2.1 | 244 | 2/1/2025 |
| 2024.11.12 | 195 | 11/12/2024 |
| 2024.10.6 | 165 | 10/4/2024 |
| 2024.7.24 | 197 | 7/24/2024 |