d8f049f392e3e3e41cde8190e9bc21a706921c15
[platform/core/dotnet/diagnostics.git] /
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3
4 using System.Collections.Generic;
5 using System.Linq;
6 using Microsoft.Diagnostics.NETCore.Client;
7
8 namespace Microsoft.Diagnostics.Monitoring.EventPipe
9 {
10     public sealed class EventPipeProviderSourceConfiguration : MonitoringSourceConfiguration
11     {
12         private readonly IEnumerable<EventPipeProvider> _providers;
13         private readonly int _bufferSizeInMB;
14
15         public EventPipeProviderSourceConfiguration(bool requestRundown = true, int bufferSizeInMB = 256, params EventPipeProvider[] providers)
16         {
17             _providers = providers;
18             RequestRundown = requestRundown;
19             _bufferSizeInMB = bufferSizeInMB;
20         }
21
22         public override IList<EventPipeProvider> GetProviders()
23         {
24             return _providers.ToList();
25         }
26
27         public override int BufferSizeInMB => _bufferSizeInMB;
28     }
29 }