Skip to content

Review serviceClass.ContainingNamespace in Service Generator code #4291

Description

@bernardnormier

serviceClass.ContainingNamespace can be an empty string (e.g., when the service type is in the global namespace), which would generate invalid code: namespace ;. Guard with !string.IsNullOrEmpty(...) here, and/or represent the global namespace as null when building ServiceClass.

        if (!string.IsNullOrEmpty(serviceClass.ContainingNamespace))

Originally posted by @Copilot in #4289 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions