Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / class / System / System.Diagnostics / TraceSourceInfo.cs
index 910e90becbee0e75a5ced7d706e395341adc7503..1ed07cdf1db1adbbb0a601defaf7b1740dd36719 100644 (file)
@@ -27,8 +27,6 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-#if NET_2_0
-
 using System;
 using System.Diagnostics;
 
@@ -38,12 +36,21 @@ namespace System.Diagnostics
        {
                string name;
                SourceLevels levels;
-               TraceListenerCollection listeners = new TraceListenerCollection ();
+               TraceListenerCollection listeners;
 
                public TraceSourceInfo (string name, SourceLevels levels)
                {
                        this.name = name;
                        this.levels = levels;
+                       this.listeners = new TraceListenerCollection ();
+               }
+
+               internal TraceSourceInfo (string name, SourceLevels levels, TraceImplSettings settings)
+               {
+                       this.name = name;
+                       this.levels = levels;
+                       this.listeners = new TraceListenerCollection ();
+                       this.listeners.Add (new DefaultTraceListener() { IndentSize = settings.IndentSize });
                }
 
                public string Name {
@@ -60,4 +67,3 @@ namespace System.Diagnostics
        }
 }
 
-#endif