System.Diagnostics.LogSwitch.LogSwitch C# (CSharp) Method

LogSwitch() public method

public LogSwitch ( String name, String description, LogSwitch parent ) : System
name String
description String
parent LogSwitch
return System
    	public LogSwitch(String name, String description, LogSwitch parent)
    	{
    		if ((name != null) && (parent != null) )
    		{
    			if (name.Length == 0)
    				throw new ArgumentOutOfRangeException ("Name", Environment.GetResourceString("Argument_StringZeroLength"));
    				
    			strName = name;
    			strDescription = description;
    			iLevel = LoggingLevels.ErrorLevel;
    			iOldLevel = iLevel;
    
    			// update the parent switch to reflect this child switch
    			parent.AddChildSwitch (this);
    
    			ParentSwitch = parent;
    
    			ChildSwitch  = null;
    			iNumChildren = 0;
    			iChildArraySize = 0;
    
    			Log.m_Hashtable.Add (strName, this);			
    
    			// Call into the EE to let it know about the creation of
    			// this switch
    			Log.AddLogSwitch (this);
    
    			// update switch count
    			Log.iNumOfSwitches++;
    		}
    		else
    			throw new ArgumentNullException ((name==null ? "name" : "parent"));
    	}
    

Same methods

LogSwitch::LogSwitch ( ) : System
LogSwitch::LogSwitch ( String name, String description ) : System