MandalaConsulting.Objects
0.0.8
See the version list below for details.
dotnet add package MandalaConsulting.Objects --version 0.0.8
NuGet\Install-Package MandalaConsulting.Objects -Version 0.0.8
<PackageReference Include="MandalaConsulting.Objects" Version="0.0.8" />
<PackageVersion Include="MandalaConsulting.Objects" Version="0.0.8" />
<PackageReference Include="MandalaConsulting.Objects" />
paket add MandalaConsulting.Objects --version 0.0.8
#r "nuget: MandalaConsulting.Objects, 0.0.8"
#:package MandalaConsulting.Objects@0.0.8
#addin nuget:?package=MandalaConsulting.Objects&version=0.0.8
#tool nuget:?package=MandalaConsulting.Objects&version=0.0.8
MandalaConsulting.Objects
Overview
The MandalaConsulting.Objects library provides a simple and reusable framework for encapsulating response data objects in .NET applications. It includes pre-built classes like ResponseData
to standardize the structure of API responses or other object-oriented data exchange patterns.
Features
- Lightweight: A minimal library designed for quick integration.
- Reusability: Provides standardized object structures for data exchange.
- Flexibility: Easily adaptable for a wide variety of use cases.
Installation
Simply include the library in your .NET project. Ensure that you reference the MandalaConsulting.Objects
namespace in your code.
Usage
Import the Namespace
using MandalaConsulting.Objects;
ResponseData Class
The ResponseData
class is a flexible container for passing structured data between layers or systems.
Constructors
Default Constructor
ResponseData responseData = new ResponseData();
Parameterized Constructor
ResponseData responseData = new ResponseData("Success", someData, null);
Properties
Data
: Contains the main payload (e.g., result of an operation).Error
: Stores error details, if any.message
: Holds a status message or description.
Example Usage
var response = new ResponseData
{
message = "Operation completed successfully",
Data = new { Id = 1, Name = "John Doe" },
Error = null
};
// Access properties
Console.WriteLine(response.message); // Output: Operation completed successfully
Console.WriteLine(response.Data); // Output: { Id = 1, Name = "John Doe" }
Requirements
- .NET Framework or .NET Core
- No additional dependencies required.
License
This project is copyrighted © 2023 Mandala Consulting, LLC.
All Rights Reserved.
Author
Created by Alexander Fields
For inquiries, please contact Mandala Consulting.
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
- MongoDB.Bson (>= 2.29.0)
- MongoDB.Driver (>= 2.29.0)
- MongoDB.Driver.Core (>= 2.29.0)
- MongoDB.Driver.GridFS (>= 2.29.0)
- MongoDB.Libmongocrypt (>= 1.12.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.