Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Arc4u 6.1.18.x+) Disambiguate MessageCategory and align their definitions #78

Open
vvdb-architecture opened this issue Sep 7, 2023 · 0 comments

Comments

@vvdb-architecture
Copy link
Contributor

Both namespaces Arc4u.Diagnostics and Arc4u.ServiceModel contain an identically named public type MessageCategory.

In Arc4u.Diagnostics (assembly Arc4u.Standard.Diagnostics), this is defined as:

    /// <summary>
    /// Specifies the different categories of a <see cref="FaultMessage"/>.
    /// </summary>
    [DataContract]
    [Flags]
    public enum MessageCategory : short
    {
        /// <summary>
        /// A message dedicates for IT people.
        /// </summary>
        [EnumMember]
        Technical = 1,
        /// <summary>
        /// A message dedicates for IT and Business people.
        /// </summary>
        [EnumMember]
        Business = 2,

        /// <summary>
        /// For Monitoring purpose.
        /// </summary>
        [EnumMember]
        Monitoring = 4,
    }

In Arc4u.ServiceModel, (assembly Arc4u.Standard) this is defined as:

    /// <summary>
    /// Specifies the different categories of a <see cref="FaultMessage"/>.
    /// </summary>
    [DataContract]
    public enum MessageCategory : short
    {
        /// <summary>
        /// A message dedicates for IT people.
        /// </summary>
        [EnumMember]
        Technical = 0,
        /// <summary>
        /// A message dedicates for IT and Business people.
        /// </summary>
        [EnumMember]
        Business = 1,
    }

We should think about refactoring this and align the definitions, since it can only confuse.

One possibility would be to create a new assembly Arc4u.Standard.Exceptions that would hold what is now in Arc4u.ServiceModel and Arc4u.Exceptions namespaces of the Arc4u.Standard assembly. The Arc4u.Standard.Diagnostics assembly would then depend on this Arc4u.Standard.Exceptions assembly for its MessageCategory definition instead of defining it itself.

@vvdb-architecture vvdb-architecture changed the title Disambiguate MessageCategory and align their definitions (Arc4u 6.1.18.x+) Disambiguate MessageCategory and align their definitions Sep 8, 2023
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

No branches or pull requests

1 participant