Skip to content

Conversation

@aberus
Copy link
Contributor

@aberus aberus commented Jan 14, 2026

This PR adds support to use Enum for PrinterCapabilitiesInfo.Builder.SetColorModes method instead of int.

Current way:

var printer = new PrinterInfo.Builder(printerId, "Test printer", PrinterStatus.Idle)
    .SetCapabilities(new PrinterCapabilitiesInfo.Builder(printerId)
        .SetColorModes((int)(PrintColorMode.Color | PrintColorMode.Monochrome), (int)PrintColorMode.Color)
        .Build())
    .Build();

With this PR (and #10688):

var printer = new PrinterInfo.Builder(printerId, "Test printer", PrinterStatus.Idle)
    .SetCapabilities(new PrinterCapabilitiesInfo.Builder(printerId)
        .SetColorModes(PrintColorMode.Color | PrintColorMode.Monochrome, PrintColorMode.Color)
        .Build())
    .Build();
  • Useful description of why the change is necessary.
  • Links to issues fixed
  • Unit tests

@jonathanpeppers
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image Image

@jonathanpeppers jonathanpeppers merged commit b1bd06b into dotnet:main Jan 15, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants