Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit efd2cf5

Browse files
committed
Only log missing exports in Debug configuration
1 parent 3d330a8 commit efd2cf5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/GitHub.VisualStudio.16/CompositionServices.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ static TypeCatalog GetCatalog(Assembly assembly)
129129
}
130130
catch (ReflectionTypeLoadException e)
131131
{
132-
Trace.WriteLine(e);
132+
Debug.WriteLine(e);
133133
foreach (var ex in e.LoaderExceptions)
134134
{
135-
Trace.WriteLine(ex);
135+
Debug.WriteLine(ex);
136136
}
137137

138138
types = e.Types.Where(t => t != null).ToArray();
@@ -186,7 +186,7 @@ public TRet GetService<T, TRet>()
186186
return value as TRet;
187187
}
188188

189-
Trace.WriteLine($"Couldn't find service of type {typeof(T)}");
189+
Debug.WriteLine($"Couldn't find service of type {typeof(T)}");
190190
return null;
191191
}
192192

@@ -249,7 +249,7 @@ class OutOfProcSVsServiceProvider : SVsServiceProvider
249249
{
250250
public object GetService(Type serviceType)
251251
{
252-
Console.WriteLine($"GetService: {serviceType}");
252+
Debug.WriteLine($"GetService: {serviceType}");
253253
return null;
254254
}
255255
}
@@ -263,7 +263,7 @@ public override IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> G
263263
var exports = base.GetExports(definition);
264264
if (exports.Count() == 0)
265265
{
266-
Trace.WriteLine($"No exports for {definition}");
266+
Debug.WriteLine($"No exports for {definition}");
267267
}
268268

269269
return exports;

0 commit comments

Comments
 (0)