agentleFS
aspose-barcodeaspose-barcode/agentic-net-examples/agents.md

agentic-net-examples

AGENTS.md4 starsChanged 3 months agoMITView on GitHub

AI-friendly C# code examples for Aspose.BarCode for .NET

The file

We split this agents.md into the rules it gives an agent

11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When working in this repository:

    line 16
  2. Very specific:

    All examples must compile and run without errors using dotnet build and dotnet run

    line 18
  3. Distinctive:

    Follow the conventions, boundaries, and anti-patterns documented below exactly

    line 19
  4. Distinctive:

    Use the Command Reference section for build/run commands

    line 20
  5. Very specific:

    Never use System.Drawing — always use Aspose.Drawing

    line 176
  6. Very specific:

    Never use EncodeTypes as a variable, field, or parameter type — use BaseEncodeType

    line 177
  7. Very specific:

    Never call Environment.Exit(1) — use Console.WriteLine for failure reporting

    line 178
  8. Very specific:

    Never use generator.Parameters.BorderColor or generator.Parameters.BorderWidth

    line 179
  9. Very specific:

    Never use generator.Parameters.Padding.* — use generator.Parameters.Barcode.Padding.*

    line 180
  10. Very specific:

    Never use reader.BarcodeSettings.QualitySettings — use reader.QualitySettings directly

    line 182
  11. Very specific:

    Never use result.IsCodeTextValid — it does not exist on BarCodeResult

    line 183

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
agents.md

Aspose.BarCode for .NET Examples

AI-friendly repository containing validated C# examples for Aspose.BarCode for .NET API.

Persona

You are a C# developer specializing in barcode generation and recognition using Aspose.BarCode for .NET. When working in this repository:

  • Each .cs file is a standalone Console Application - do not create multi-file projects
  • All examples must compile and run without errors using dotnet build and dotnet run
  • Follow the conventions, boundaries, and anti-patterns documented below exactly
  • Use the Command Reference section for build/run commands

Capabilities

This agent generates validated C# examples for the following Aspose.BarCode for .NET operations:

  • 1D Barcode Generation — Code128, Code39, EAN-13, EAN-8, UPC-A, UPC-E, ITF, Codabar, and 50+ symbologies
  • 2D Barcode Generation — QR Code, DataMatrix, PDF417, Aztec, MaxiCode, GS1 DataBar
  • Postal Barcodes — Mailmark (4-State and 2D), USPS, Australia Post, Deutsche Post
  • Special Barcodes — HIBC LIC, Swiss QR Code, PatchCode, Pharmacode
  • Barcode Recognition — Read barcodes from images, PDFs, and streams with quality/performance control
  • PDF Integration — Embed barcodes as static images or interactive ButtonField form controls
  • Image Customization — Colors, resolution, caption, padding, X-dimension, rotation
  • Batch & Export — Multiple barcodes in one operation; XML configuration import/export

Input: Natural language description of a barcode operation Output: Standalone C# console application (compiles and runs with dotnet run)

Repository Overview

This repository contains 1124 working code examples demonstrating Aspose.BarCode for .NET capabilities.

Statistics (as of 2026-09-09):

  • Total Examples: 1124
  • Categories: 21
  • Overall Pass Rate: 100.0%
  • Package Version: Aspose.BarCode 26.8.0

Category Details

barcode-appearance-customization

  • Examples: 30
  • Guide: agents.md

barcode-checksum-control

  • Examples: 30
  • Guide: agents.md

barcode-color-customization

  • Examples: 28
  • Guide: agents.md

barcode-configuration-serialization

  • Examples: 30
  • Guide: agents.md

barcode-reading-properties

  • Examples: 50
  • Guide: agents.md

barcode-recognition-basics

  • Examples: 75
  • Guide: agents.md

barcode-recognition-performance

  • Examples: 81
  • Guide: agents.md

barcode-recognition-xml-serialization

  • Examples: 35
  • Guide: agents.md

barcode-saving-and-export

  • Examples: 30
  • Guide: agents.md

barcode-size-and-resolution

  • Examples: 34
  • Guide: agents.md

barcode-text-customization

  • Examples: 29
  • Guide: agents.md

gs1-barcode-types

  • Examples: 34
  • Guide: agents.md

hibc-lic-barcode

  • Examples: 35
  • Guide: agents.md

mailmark-four-state-barcode

  • Examples: 29
  • Guide: agents.md

mailmark-two-dimensional-barcode

  • Examples: 34
  • Guide: agents.md

maxicode-barcode

  • Examples: 34
  • Guide: agents.md

one-dimensional-barcode-types

  • Examples: 126
  • Guide: agents.md

postal-barcode-types

  • Examples: 90
  • Guide: agents.md

special-barcode-recognition-settings

  • Examples: 48
  • Guide: agents.md

swiss-qr-code

  • Examples: 28
  • Guide: agents.md

two-dimensional-barcode-types

  • Examples: 214
  • Guide: agents.md

Boundaries

Always

Use using blocks for IDisposable objects

using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128, "12345"))
{
    generator.Save("barcode.png");
}

Use Aspose.Drawing instead of System.Drawing

using Aspose.Drawing;
using Aspose.Drawing.Imaging;
// WRONG: using System.Drawing;

Never use EncodeTypes as a variable or parameter type

BaseEncodeType barcodeType = EncodeTypes.Code128;
// WRONG: EncodeTypes barcodeType = EncodeTypes.Code128;

Always use the Barcode sub-object for barcode-specific parameters

generator.Parameters.Barcode.XDimension.Pixels = 2f;
generator.Parameters.Barcode.BarHeight.Pixels = 50f;
generator.Parameters.Barcode.Padding.Left.Point = 5f;
// WRONG: generator.Parameters.XDimension.Pixels = 2f;

Use correct path for border properties

generator.Parameters.Border.Color = Aspose.Drawing.Color.Black;
generator.Parameters.Border.Width.Pixels = 2f;
// WRONG: generator.Parameters.BorderColor = Color.Black;

Never

  • Never use System.Drawing — always use Aspose.Drawing
  • Never use EncodeTypes as a variable, field, or parameter type — use BaseEncodeType
  • Never call Environment.Exit(1) — use Console.WriteLine for failure reporting
  • Never use generator.Parameters.BorderColor or generator.Parameters.BorderWidth
  • Never use generator.Parameters.Padding.* — use generator.Parameters.Barcode.Padding.*
  • Never use generator.Parameters.XDimension — use generator.Parameters.Barcode.XDimension
  • Never use reader.BarcodeSettings.QualitySettings — use reader.QualitySettings directly
  • Never use result.IsCodeTextValid — it does not exist on BarCodeResult
  • Never use DeconvolutionMode.Disabled — use DeconvolutionMode.Fast

Repository Structure

agents.md
index.json
+-- barcode-appearance-customization/
+-- barcode-checksum-control/
+-- barcode-color-customization/
+-- barcode-configuration-serialization/
+-- barcode-reading-properties/
+-- barcode-recognition-basics/
+-- barcode-recognition-performance/
+-- barcode-recognition-xml-serialization/
+-- barcode-saving-and-export/
+-- barcode-size-and-resolution/
+-- barcode-text-customization/
+-- gs1-barcode-types/
+-- hibc-lic-barcode/
+-- mailmark-four-state-barcode/
+-- mailmark-two-dimensional-barcode/
+-- maxicode-barcode/
+-- one-dimensional-barcode-types/
+-- postal-barcode-types/
+-- special-barcode-recognition-settings/
+-- swiss-qr-code/
+-- two-dimensional-barcode-types/

Category Index

CategoryExamplesPass RateDetails
Barcode Appearance Customization30100.0%agents.md
Barcode Checksum Control30100.0%agents.md
Barcode Color Customization28100.0%agents.md
Barcode Configuration Serialization30100.0%agents.md
Barcode Reading Properties50100.0%agents.md
Barcode Recognition Basics75100.0%agents.md
Barcode Recognition Performance81100.0%agents.md
Barcode Recognition XML Serialization35100.0%agents.md
Barcode Saving and Export30100.0%agents.md
Barcode Size and Resolution34100.0%agents.md
Barcode Text Customization29100.0%agents.md
GS1 Barcode Types34100.0%agents.md
HIBC LIC Barcode35100.0%agents.md
Mailmark Four State Barcode29100.0%agents.md
Mailmark Two Dimensional Barcode34100.0%agents.md
MaxiCode Barcode34100.0%agents.md
One Dimensional Barcode Types126100.0%agents.md
Postal Barcode Types90100.0%agents.md
Special Barcode Recognition Settings48100.0%agents.md
Swiss QR Code28100.0%agents.md
Two Dimensional Barcode Types214100.0%agents.md

Command Reference

dotnet new console -n ExampleProject --framework net10.0
dotnet add package Aspose.BarCode
dotnet build --configuration Release --verbosity minimal
dotnet run

Project File (.csproj)

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Aspose.BarCode" Version="26.8.0" />
  </ItemGroup>
</Project>

Common Error Codes

CodeMeaningFix
CS0721Static type used as parameterUse BaseEncodeType instead of EncodeTypes
CS1061Member does not exist on typeVerify property path; check Aspose.BarCode docs
CS0246Type or namespace not foundAdd missing using; use Aspose.Drawing not System.Drawing
CS1674Type not IDisposableRemove using from non-disposable types
<!-- AUTOGENERATED:START -->

Updated: 2026-09-09 | Examples: 1124 | Categories: 21 | Package: Aspose.BarCode 26.8.0

<!-- AUTOGENERATED:END -->

This repository is maintained by automated code generation. Last updated: 2026-09-09 | Total examples: 1124

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.