Skip to content

Commit

Permalink
Remove regions (#3366)
Browse files Browse the repository at this point in the history
Co-authored-by: Amaury Levé <amauryleve@microsoft.com>
  • Loading branch information
Evangelink and Evangelink authored Feb 15, 2022
1 parent 07e31ab commit 128056e
Show file tree
Hide file tree
Showing 223 changed files with 0 additions and 2,485 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,15 @@ namespace Microsoft.TestPlatform.Extensions.EventLogCollector;
/// </summary>
internal class CollectorNameValueConfigurationManager
{
#region Private constants
// Configuration XML constants
private const string SettingNameAttributeName = "name";

private const string SettingValueAttributeName = "value";

#endregion

#region Private fields

/// <summary>
/// The name/value pairs loaded from the configuration XML element
/// </summary>

#endregion

#region Constructor

/// <summary>
/// Initializes a new instance of the <see cref="CollectorNameValueConfigurationManager"/> class.
/// Loads the configuration name/value information from the provided XML element into a dictionary
Expand Down Expand Up @@ -88,10 +79,6 @@ public CollectorNameValueConfigurationManager(XmlElement configurationElement)
}
}

#endregion

#region Public properties

internal IDictionary<string, string> NameValuePairs { get; } = new Dictionary<string, string>();

/// <summary>
Expand All @@ -114,5 +101,4 @@ public string this[string name]

set => NameValuePairs[name] = value;
}
#endregion
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ namespace Microsoft.TestPlatform.Extensions.EventLogCollector;
[DataCollectorFriendlyName("Event Log")]
public class EventLogDataCollector : DataCollector
{
#region Constants

/// <summary>
/// The event log file name.
/// </summary>
Expand All @@ -39,10 +37,6 @@ public class EventLogDataCollector : DataCollector
/// </summary>
private const string DefaultUri = @"datacollector://Microsoft/EventLog/2.0";

#endregion

#region Private fields

/// <summary>
/// Event handler delegate for the SessionStart event
/// </summary>
Expand Down Expand Up @@ -98,10 +92,6 @@ public class EventLogDataCollector : DataCollector
/// </summary>
private readonly IDictionary<string, IEventLogContainer> _eventLogContainerMap = new Dictionary<string, IEventLogContainer>();

#endregion

#region Constructor

/// <summary>
/// Initializes a new instance of the <see cref="EventLogDataCollector"/> class.
/// </summary>
Expand All @@ -128,10 +118,6 @@ internal EventLogDataCollector(IFileHelper fileHelper)
_fileHelper = fileHelper;
}

#endregion

#region Internal Fields

internal int MaxEntries { get; private set; }

internal ISet<string> EventSources { get; private set; }
Expand All @@ -145,10 +131,6 @@ internal EventLogDataCollector(IFileHelper fileHelper)
/// </summary>
internal Dictionary<DataCollectionContext, EventLogSessionContext> ContextMap { get; }

#endregion

#region DataCollector Members

/// <summary>
/// Initializes the data collector
/// </summary>
Expand Down Expand Up @@ -197,10 +179,6 @@ public override void Initialize(
events.TestCaseEnd += _testCaseEndEventHandler;
}

#endregion

#region Internal

/// <summary>
/// The write event logs.
/// </summary>
Expand Down Expand Up @@ -297,10 +275,6 @@ internal string WriteEventLogs(List<EventLogEntry> eventLogEntries, int maxLogEn

return eventLogPath;
}
#endregion

#region IDisposable Members

/// <summary>
/// Cleans up resources allocated by the data collector
/// </summary>
Expand All @@ -325,8 +299,6 @@ protected override void Dispose(bool disposing)
RemoveTempEventLogDirs(_eventLogDirectories);
}

#endregion

private static ISet<string> ParseCommaSeparatedList(string commaSeparatedList)
{
ISet<string> strings = new HashSet<string>();
Expand All @@ -339,8 +311,6 @@ private static ISet<string> ParseCommaSeparatedList(string commaSeparatedList)
return strings;
}

#region Event Handlers

private void OnSessionStart(object sender, SessionStartEventArgs e)
{
ValidateArg.NotNull(e, "SessionStartEventArgs");
Expand Down Expand Up @@ -392,10 +362,6 @@ private void OnTestCaseEnd(object sender, TestCaseEndEventArgs e)
WriteCollectedEventLogEntries(e.Context, false, TimeSpan.MaxValue, DateTime.UtcNow);
}

#endregion

#region Private methods

private void RemoveTempEventLogDirs(List<string> tempDirs)
{
if (tempDirs != null)
Expand Down Expand Up @@ -596,5 +562,4 @@ private EventLogSessionContext GetEventLogSessionContext(DataCollectionContext d
return eventLogSessionContext;
}

#endregion
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ namespace Microsoft.TestPlatform.Extensions.EventLogCollector;
/// </summary>
internal static class EventLogXmlWriter
{
#region Public methods

/// <summary>
/// The write event log entries to xml file.
/// </summary>
Expand Down Expand Up @@ -83,4 +81,3 @@ public static void WriteEventLogEntriesToXmlFile(string xmlFilePath, List<EventL
fileHelper.WriteAllTextToFile(xmlFilePath, stringBuilder.ToString());
}
}
#endregion
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@

using System.Runtime.CompilerServices;

#region Test Assemblies

[assembly: InternalsVisibleTo("Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
#endregion
3 changes: 0 additions & 3 deletions src/Microsoft.TestPlatform.Build/Friends.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@

using System.Runtime.CompilerServices;

#region Test Assemblies

[assembly: InternalsVisibleTo("Microsoft.TestPlatform.Build.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]

#endregion
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,6 @@ private void StopTestSession(StopTestSessionPayload payload, ITestRequestManager
});
}

#region IDisposable Support

private bool _disposedValue; // To detect redundant calls

protected virtual void Dispose(bool disposing)
Expand All @@ -584,5 +582,4 @@ public void Dispose()
// Do not change this code. Put cleanup code in Dispose(bool disposing) above.
Dispose(true);
}
#endregion
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ public DesignModeTestEventsRegistrar(IDesignModeClient designModeClient)
_designModeClient = designModeClient;
}

#region ITestDiscoveryEventsRegistrar

public void RegisterDiscoveryEvents(IDiscoveryRequest discoveryRequest)
{
discoveryRequest.OnRawMessageReceived += OnRawMessageReceived;
Expand All @@ -35,10 +33,6 @@ public void UnregisterDiscoveryEvents(IDiscoveryRequest discoveryRequest)
discoveryRequest.OnRawMessageReceived -= OnRawMessageReceived;
}

#endregion

#region ITestRunEventsRegistrar

public void RegisterTestRunEvents(ITestRunRequest testRunRequest)
{
testRunRequest.OnRawMessageReceived += OnRawMessageReceived;
Expand All @@ -49,8 +43,6 @@ public void UnregisterTestRunEvents(ITestRunRequest testRunRequest)
testRunRequest.OnRawMessageReceived -= OnRawMessageReceived;
}

#endregion

/// <summary>
/// RawMessage received handler for getting rawmessages directly from the host
/// </summary>
Expand Down
11 changes: 0 additions & 11 deletions src/Microsoft.TestPlatform.Client/Discovery/DiscoveryRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ public DiscoveryCriteria DiscoveryCriteria
/// </summary>
internal ITestLoggerManager LoggerManager { get; }

#region ITestDiscoveryEventsHandler2 Methods

/// <inheritdoc/>
public void HandleDiscoveryComplete(DiscoveryCompleteEventArgs discoveryCompleteEventArgs, IEnumerable<TestCase> lastChunk)
{
Expand Down Expand Up @@ -419,10 +417,6 @@ private string UpdateRawMessageWithTelemetryInfo(DiscoveryCompletePayload discov
return rawMessage;
}

#endregion

#region IDisposable implementation

/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or
/// resetting unmanaged resources.
Expand Down Expand Up @@ -459,10 +453,6 @@ private void Dispose(bool disposing)
EqtTrace.Info("DiscoveryRequest.Dispose: Completed.");
}

#endregion

#region privates fields

/// <summary>
/// Request Data
/// </summary>
Expand All @@ -488,5 +478,4 @@ private void Dispose(bool disposing)
/// </summary>
private DateTime _discoveryStartTime;

#endregion
}
8 changes: 0 additions & 8 deletions src/Microsoft.TestPlatform.Client/Execution/TestRunRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ internal TestRunRequest(IRequestData requestData, TestRunCriteria testRunCriteri
_requestData = requestData;
}

#region ITestRunRequest

/// <summary>
/// Execute the test run asynchronously
/// </summary>
Expand Down Expand Up @@ -329,10 +327,6 @@ internal ITestLoggerManager LoggerManager
get; private set;
}

#endregion

#region IDisposable implementation

// Summary:
// Performs application-defined tasks associated with freeing, releasing, or
// resetting unmanaged resources.
Expand All @@ -343,8 +337,6 @@ public void Dispose()
GC.SuppressFinalize(this);
}

#endregion

/// <summary>
/// The criteria/config for this test run request.
/// </summary>
Expand Down
7 changes: 0 additions & 7 deletions src/Microsoft.TestPlatform.Client/Friends.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,5 @@

using System.Runtime.CompilerServices;

#region Product Assemblies

#endregion

#region Test Assemblies

[assembly: InternalsVisibleTo("Microsoft.TestPlatform.Client.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]

#endregion
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ internal class DataCollectionAttachmentManager : IDataCollectionAttachmentManage
{
private readonly object _attachmentTaskLock = new();

#region Fields

/// <summary>
/// Default results directory to be used when user didn't specify.
/// </summary>
Expand All @@ -70,10 +68,6 @@ internal class DataCollectionAttachmentManager : IDataCollectionAttachmentManage
/// </summary>
private readonly IFileHelper _fileHelper;

#endregion

#region Constructor

/// <summary>
/// Initializes a new instance of the <see cref="DataCollectionAttachmentManager"/> class.
/// </summary>
Expand All @@ -94,10 +88,6 @@ protected DataCollectionAttachmentManager(IFileHelper fileHelper)
AttachmentSets = new ConcurrentDictionary<DataCollectionContext, ConcurrentDictionary<Uri, AttachmentSet>>();
}

#endregion

#region Properties

/// <summary>
/// Gets the session output directory.
/// </summary>
Expand All @@ -110,10 +100,6 @@ internal ConcurrentDictionary<DataCollectionContext, ConcurrentDictionary<Uri, A
{
get; private set;
}
#endregion

#region public methods

/// <inheritdoc/>
public void Initialize(SessionId id, string outputDirectory, IMessageSink messageSink)
{
Expand Down Expand Up @@ -210,10 +196,6 @@ public void Cancel()
_cancellationTokenSource.Cancel();
}

#endregion

#region private methods

/// <summary>
/// Sanity checks on CopyRequestData
/// </summary>
Expand Down Expand Up @@ -378,5 +360,4 @@ private void LogError(string errorMessage, Uri collectorUri, string collectorFri
_messageSink.SendMessage(args);
}

#endregion
}
Loading

0 comments on commit 128056e

Please sign in to comment.