ObjectTextify 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ObjectTextify --version 1.0.1
                    
NuGet\Install-Package ObjectTextify -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ObjectTextify" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ObjectTextify" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ObjectTextify" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ObjectTextify --version 1.0.1
                    
#r "nuget: ObjectTextify, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=ObjectTextify&version=1.0.1
                    
Install ObjectTextify as a Cake Addin
#tool nuget:?package=ObjectTextify&version=1.0.1
                    
Install ObjectTextify as a Cake Tool

📝 ObjectTextify

NuGet Downloads Build License Stars

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last updated
1.0.3 136 5/8/2025
1.0.1 133 5/8/2025
1.0.0 145 5/7/2025