ExeContext.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Configuration / System / Configuration / ExeContext.cs / 1 / ExeContext.cs

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

using System; 
 
namespace System.Configuration
{ 

    // ExeContext
    //
    // Represents the ExeContext that we are running within 
    //
    public sealed class ExeContext 
    { 
        private ConfigurationUserLevel _userContext;
        private string                 _exePath; 

        // Constructor
        //
        // Constructor 
        //
        internal ExeContext( ConfigurationUserLevel userContext, 
                             string                 exePath ) 
        {
            _userContext = userContext; 
            _exePath     = exePath;
        }

        // UserLevel 
        //
        // The ConfigurationUserLevel that we are running within. 
        // 
        // Note: ConfigurationUserLevel.None will be set for machine.config
        //       and the applicationconfig file.  Use IsMachineConfig in 
        //       ConfigurationContext, to determine the difference.
        //
        public ConfigurationUserLevel UserLevel
        { 
            get
            { 
                return _userContext; 
            }
        } 

        // ExePath
        //
        // What is the full path to the exe that we are running for? 
        //
        public string ExePath 
        { 
            get
            { 
                return _exePath;
            }
        }
    } 
}

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

using System; 
 
namespace System.Configuration
{ 

    // ExeContext
    //
    // Represents the ExeContext that we are running within 
    //
    public sealed class ExeContext 
    { 
        private ConfigurationUserLevel _userContext;
        private string                 _exePath; 

        // Constructor
        //
        // Constructor 
        //
        internal ExeContext( ConfigurationUserLevel userContext, 
                             string                 exePath ) 
        {
            _userContext = userContext; 
            _exePath     = exePath;
        }

        // UserLevel 
        //
        // The ConfigurationUserLevel that we are running within. 
        // 
        // Note: ConfigurationUserLevel.None will be set for machine.config
        //       and the applicationconfig file.  Use IsMachineConfig in 
        //       ConfigurationContext, to determine the difference.
        //
        public ConfigurationUserLevel UserLevel
        { 
            get
            { 
                return _userContext; 
            }
        } 

        // ExePath
        //
        // What is the full path to the exe that we are running for? 
        //
        public string ExePath 
        { 
            get
            { 
                return _exePath;
            }
        }
    } 
}

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