Click here to Skip to main content
15,885,546 members
Articles / Programming Languages / C#

WS-Enumeration for WCF/WF

Rate me:
Please Sign up or sign in to vote.
4.86/5 (5 votes)
4 Feb 2011CPOL5 min read 25.8K   220   10  
In this article, I describe the design and implementation of a WS-Enumeration for WCF.
//*****************************************************************************
//    Description.....WS-Enumeration Pull Request/Response Message
//                                                 
//    Author..........Sam Safonov, samsaf@gmail.com
//                        
//    Date Created:    24/12/10
//
//    Date        Modified By     Description
//-----------------------------------------------------------------------------
//    24/12/10    Sam Safonov     Initial Revision
//*****************************************************************************
//
#region References
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
using System.ServiceModel;
using System.Runtime.Serialization;
using dc = WSEnumeration.DataContract;
#endregion

namespace WSEnumeration
{
    #region PullRequest
    [MessageContract(IsWrapped = false)]
    public class PullRequest
    {
        #region DataMembers
        dc.Pull _data = null;
        #endregion

        #region Properties
        [MessageBodyMember(Name = WSEnumeration.Pull, Namespace = WSEnumeration.NamespaceUri, Order = 0)]
        public dc.Pull Pull { get { return _data; } set { _data = value; } }
        #endregion

        #region Constructors
        public PullRequest() {}
        public PullRequest(dc.Pull data) { Pull = data; }
        #endregion
    }
    #endregion

    #region PullResponse
    [MessageContract(IsWrapped = false)]
    public class PullResponse
    {
        #region DataMembers
        dc.PullResponse _data = null;
        #endregion

        #region Properties
        [MessageBodyMember(Name = WSEnumeration.PullResponse, Namespace = WSEnumeration.NamespaceUri, Order = 0 )]
        public dc.PullResponse Response { get { return _data; } set { _data = value; } }
        #endregion

        #region Constructors
        public PullResponse() {}
        public PullResponse(dc.PullResponse data) { Response = data; }
        #endregion
    }
    #endregion
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Russian Federation Russian Federation
I have Master degree in Particle Physics. During my last several years I work as software developer.

Primary Interests
- c#, c++, php, java.
- scientific programming

Comments and Discussions