I added a custom attribute to an enum that I was using as part of a web service. When I add the web service as a service reference to a win forms application the custom attributes do not appear in the service reference proxy objects although the enum type itself does appear. I've looked all over and haven't found anything close to a solution.
Am I trying to do something that is not possible?
Server side code: public enum ServiceEnum { [ServiceEnumTest("Boat")]item1, [ServiceEnumTest("Plane")]item2, [ServiceEnumTest("Bicycle")]item3, [ServiceEnumTest("Car")]item4, item5 }
Client side proxy generated code:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="ServiceEnum", Namespace="http://tempuri.org/")]
public enum ServiceEnum : int {
[System.Runtime.Serialization.EnumMemberAttribute()]
item1 = 0,
[System.Runtime.Serialization.EnumMemberAttribute()]
item2 = 1,
[System.Runtime.Serialization.EnumMemberAttribute()]
item3 = 2,
[System.Runtime.Serialization.EnumMemberAttribute()]
item4 = 3,
[System.Runtime.Serialization.EnumMemberAttribute()]
item5 = 4,
}