An example data contract and service contract/interface that makes use of the enum type.
using System;
using System.Runtime.Serialization;
namespace RocxSoft.DataContracts
{
/// <summary>
/// RefundStatus Data Contract
/// </summary>
[DataContract(Name = "RefundStatus", Namespace = "http://rocxsoft.datacontracts/2008/06")]
public enum RefundStatus
{
[EnumMember()]
FileInvalid = 0,
[EnumMember()]
FileRegistered = 1,
[EnumMember()]
FilePending = 2
}
}
using System;
using System.ServiceModel;
using RocxSoft.DataContracts;
namespace RocxSoft.ServiceContracts
{
/// <summary>
/// Refund Service Contract
/// </summary>
[ServiceContract(Namespace = "http://rocxsoft.servicecontracts/2008/06")]
[ServiceKnownType(typeof(RefundStatus)]
public interface IRefund
{
[OperationContract(Name = "Status")]
RefundStatus Status(Guid refundId);
...
}
}





Does this work with any other data types?
TIA
Posted by: Frank | July 09, 2008 at 02:26 PM
I tried the same code but the enum is not visible at client-side until it is referenced by a service method. Is there any way to expose enum without referring it in service methods?
Posted by: Dhawal | February 23, 2010 at 01:56 PM
Life is just a series of trying to make up your mind. If you've decided to do something, you will get something what you want. Just do it, you are the unique one.
Posted by: Nike Shox CL | June 30, 2010 at 05:36 AM
Thank you for sharing.Every man is his own worst enemy.
Posted by: ugg bailey button | November 02, 2010 at 08:37 PM
I liked your site, you are very interesting to write. Merry Christmas and Happy New Year!
Posted by: Antivirus_man | December 05, 2010 at 06:59 PM
Merry Christmas! I wish you a lot of gifts and luck in the new year.
Posted by: JOBS_frend | December 25, 2010 at 07:11 PM
Interesting site, always a new topic .. good luck in the new 2011. Happy New Year!
Posted by: school_dubl | December 30, 2010 at 08:26 PM
Hi Merry Christmas and Happy New Year, a cool site I like
Posted by: Rental | January 14, 2011 at 05:40 PM
With the new 2011. Year! Congratulations.
Posted by: Rental | January 19, 2011 at 02:58 PM
Hi Merry Christmas and Happy New Year, a cool site I like
Posted by: Hotjobs | January 24, 2011 at 04:04 PM
I certainly enjoyed the way you explore your experience and
knowledge of the subject! Keep up on it. Thanks for sharing the info
Posted by: 10 cent superfecta | February 09, 2011 at 07:06 PM
Start off every day with a smile and get it over with.
Posted by: Nike Jordan Shoe | February 27, 2011 at 07:36 PM
Its very nice to read such a fantastic post like this. I am very much happy that I found this blog. I enjoyed reading every little bit of it.Some interesting and well researched information on cameras. I’ll put a link to this site on my blog. Thanks for sharing.
Posted by: sildenafil citrate | May 18, 2011 at 02:32 AM
I read your post and I found it amazing .Your thought process is wonderful. The way you express yourself is awesome.
Posted by: sildenafil citrate | May 23, 2011 at 04:50 AM
Don't you acknowledge that it's correct time to receive the business loans, which can help you.
Posted by: CarissaPENNINGTON | July 02, 2011 at 07:14 PM
Hi all, fantastic homepage yet just a little slow every time I start reading it, it’s usually my web service, I’m uncertain.
Posted by: Home Security | October 12, 2011 at 02:45 AM
I like the train of thought in your post but I tend to think you would do well to back up your thought process with a very small amount more solid data.
Posted by: Home Security | October 21, 2011 at 12:41 AM
It's quite hard to find a good website. And I am very satisfied to have come here. The publications are doing great and full of good insights. I would be glad to keep on coming back here to check for a new update.
Posted by: Dallas Home Security | October 27, 2011 at 01:47 AM
I'm impressed. You're truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. I'm saving this for future use.
Posted by: Atlanta Home Security | November 01, 2011 at 10:06 PM
Your blog article is very interesting and fanatic, at the same time the blog theme is unique and perfect, great job. To your success, one of the more impressive blogs I've seen. Thanks so much for keeping the internet classy for a change.
Posted by: Atlanta Alarm Monitoring | November 15, 2011 at 12:39 AM
Pop heartthrob Justin Bieber's favorite
CLICK ME
Posted by: Suprashoes | November 17, 2011 at 10:43 PM
onlinewatchstore
Posted by: onlinewatchstore | November 23, 2011 at 12:51 AM
This site is good because they give us a new thing and new ideas and new topic how good all of they are we should appreciate them because of these good thing.
Posted by: Home Security | November 24, 2011 at 01:32 AM