MiniConstructorInfo.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / AddIn / AddIn / System / Addin / MiniReflection / MiniConstructorInfo.cs / 1305376 / MiniConstructorInfo.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
/*============================================================
** 
** Class:  MiniConstructorInfo 
**
** Purpose: Represents a constructor. 
**
===========================================================*/
using System;
using System.Collections.Generic; 
using System.Collections.ObjectModel;
using System.Text; 
using System.AddIn.MiniReflection.MetadataReader; 
using System.Diagnostics.Contracts;
 
namespace System.AddIn.MiniReflection
{
    [Serializable]
    internal sealed class MiniConstructorInfo 
    {
        private MiniParameterInfo[] _parameters; 
 
        public MiniConstructorInfo(MiniParameterInfo[] parameters)
        { 
            System.Diagnostics.Contracts.Contract.Requires(parameters != null);
            _parameters = parameters;
        }
 
        /*
        internal MiniConstructorInfo(System.Reflection.ConstructorInfo ctor) 
        { 
            System.Reflection.ParameterInfo[] parameters = ctor.GetParameters();
            _parameters = new MiniParameterInfo[parameters.Length]; 
            for (int i = 0; i < parameters.Length; i++)
                _parameters[i] = new MiniParameterInfo(new TypeInfo(parameters[i].ParameterType));
        }
         */ 

        public MiniParameterInfo[] GetParameters() 
        { 
            return _parameters;
        } 
    }
}

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