DataServiceRequestOfT.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / DataServiceRequestOfT.cs / 1 / DataServiceRequestOfT.cs

                            //---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  
// typed request object
//  
//--------------------------------------------------------------------- 

namespace System.Data.Services.Client 
{
    using System;
    using System.Collections;
    using System.IO; 
    using System.Linq;
 
    ///  
    /// Holds a Uri and type for the request.
    ///  
    /// The type to construct for the request results
    public sealed class DataServiceRequest : DataServiceRequest
    {
        /// The URI for the request. 
        private readonly Uri requestUri;
 
        /// Create a request for a specific Uri 
        /// The URI for the request.
        public DataServiceRequest(Uri requestUri) 
        {
            Util.CheckArgumentNull(requestUri, "requestUri");
            this.requestUri = requestUri;
        } 

        /// Element Type 
        public override Type ElementType 
        {
            get { return typeof(TElement); } 
        }

        /// The URI for the request.
        public override Uri RequestUri 
        {
            get { return this.requestUri; } 
        } 

        /// enumerable of materialized objects from stream without having to know T 
        /// context
        /// contentType
        /// function to get response stream
        /// see summary 
        internal override IEnumerable Materialize(DataServiceContext context, string contentType, Func response)
        { 
            return Materialize(context, contentType, response); 
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  
// typed request object
//  
//--------------------------------------------------------------------- 

namespace System.Data.Services.Client 
{
    using System;
    using System.Collections;
    using System.IO; 
    using System.Linq;
 
    ///  
    /// Holds a Uri and type for the request.
    ///  
    /// The type to construct for the request results
    public sealed class DataServiceRequest : DataServiceRequest
    {
        /// The URI for the request. 
        private readonly Uri requestUri;
 
        /// Create a request for a specific Uri 
        /// The URI for the request.
        public DataServiceRequest(Uri requestUri) 
        {
            Util.CheckArgumentNull(requestUri, "requestUri");
            this.requestUri = requestUri;
        } 

        /// Element Type 
        public override Type ElementType 
        {
            get { return typeof(TElement); } 
        }

        /// The URI for the request.
        public override Uri RequestUri 
        {
            get { return this.requestUri; } 
        } 

        /// enumerable of materialized objects from stream without having to know T 
        /// context
        /// contentType
        /// function to get response stream
        /// see summary 
        internal override IEnumerable Materialize(DataServiceContext context, string contentType, Func response)
        { 
            return Materialize(context, contentType, response); 
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK