WebServiceParameterData.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / xsp / System / Web / Extensions / Script / Services / WebServiceParameterData.cs / 1 / WebServiceParameterData.cs

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

using System.Reflection; 
 
namespace System.Web.Script.Services {
    internal class WebServiceParameterData { 
        private ParameterInfo _param;
        private int _index;     // Index of the parameter in the method
        private string _paramName;
        private Type _paramType; 

        internal WebServiceParameterData(ParameterInfo param, int index) { 
            _param = param; 
            _index = index;
        } 

        // This constructor is only used by indigo
        internal WebServiceParameterData(string paramName, Type paramType, int index) {
            _paramName = paramName; 
            _paramType = paramType;
            _index = index; 
 
        }
 
        internal int Index {
            get { return _index; }
        }
 
        internal ParameterInfo ParameterInfo {
            get { return _param; } 
        } 

        internal string ParameterName { 
            get {
                if (_param != null) {
                    return _param.Name;
                } 
                else {
                    return _paramName; 
                } 
            }
        } 

        internal Type ParameterType {
            get {
                if (_param != null) { 
                    return _param.ParameterType;
                } 
                else { 
                    return _paramType;
                } 
            }
        }

    } 
}

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

using System.Reflection; 
 
namespace System.Web.Script.Services {
    internal class WebServiceParameterData { 
        private ParameterInfo _param;
        private int _index;     // Index of the parameter in the method
        private string _paramName;
        private Type _paramType; 

        internal WebServiceParameterData(ParameterInfo param, int index) { 
            _param = param; 
            _index = index;
        } 

        // This constructor is only used by indigo
        internal WebServiceParameterData(string paramName, Type paramType, int index) {
            _paramName = paramName; 
            _paramType = paramType;
            _index = index; 
 
        }
 
        internal int Index {
            get { return _index; }
        }
 
        internal ParameterInfo ParameterInfo {
            get { return _param; } 
        } 

        internal string ParameterName { 
            get {
                if (_param != null) {
                    return _param.Name;
                } 
                else {
                    return _paramName; 
                } 
            }
        } 

        internal Type ParameterType {
            get {
                if (_param != null) { 
                    return _param.ParameterType;
                } 
                else { 
                    return _paramType;
                } 
            }
        }

    } 
}

// 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