ObjectTextify 1.0.1
See the version list below for details.
dotnet add package ObjectTextify --version 1.0.1
NuGet\Install-Package ObjectTextify -Version 1.0.1
<PackageReference Include="ObjectTextify" Version="1.0.1" />
<PackageVersion Include="ObjectTextify" Version="1.0.1" />
<PackageReference Include="ObjectTextify" />
paket add ObjectTextify --version 1.0.1
#r "nuget: ObjectTextify, 1.0.1"
#addin nuget:?package=ObjectTextify&version=1.0.1
#tool nuget:?package=ObjectTextify&version=1.0.1
📝 ObjectTextify
ObjectTextify is a C# library designed for serializing objects into plain text with custom formatting options. It provides various attributes to format properties in objects, handle complex structures like tables and nested objects, and support for advanced features such as templates and conditional formatting.
This library is ideal for generating reports, logs, or any text-based output that requires flexibility in formatting object data.
📚 Table of Contents
📦 Installation
You can install ObjectTextify via NuGet:
dotnet add package ObjectTextify
✨ Features
Attribute | Description |
---|---|
AffixAttribute | Adds custom prefix and/or suffix to a property value. |
CaptionAttribute | Adds a label and optional formatting to a property, such as length and separator. |
ColumnAttribute | Specifies the header text and alignment for table columns. |
FixedLengthAttribute | Ensures that a property is formatted to a fixed length, with optional alignment and padding character. |
FormatAttribute | Specifies a custom format string for property values. |
IgnoreAttribute | Prevents a property from being serialized. |
IndentAttribute | Adds indentation to a class or property, useful for nested objects. |
LineBreakAttribute | Adds line breaks before a property or class when serializing. |
SpaceAttribute | Adds space before or after a property value (left, right, or both). |
TableAttribute | Defines how to display an object as a table with optional column dividers and alignment. |
TemplateAttribute | Uses a template string to format the output, with placeholders for properties. |
TitleAttribute | Adds a title to a class or property, with optional length and alignment. |
💡 Examples
var person = new Person
{
Name = "John Doe",
Age = 30,
BirthDate = DateTime.Now
};
var formattedText = TextFormatter.Format(person);
Console.WriteLine(formattedText);
🤝 Contributing
If you'd like to contribute to the ObjectTextify project, feel free to open an issue or submit a pull request.
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
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.