Skip to content

Commit

Permalink
Merge pull request #52 from davkean/Cleanup2
Browse files Browse the repository at this point in the history
Cleanup2
  • Loading branch information
davkean committed Nov 12, 2021
2 parents 06c20ca + 48f60b8 commit 453e220
Show file tree
Hide file tree
Showing 109 changed files with 219 additions and 192 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ csharp_preserve_single_line_blocks = true
# Code block
csharp_prefer_braces = false:none

# Microsoft.CodeAnalysis.VisualBasic.CodeStyle/Microsoft.CodeAnalysis.CSharp.CodeStyle
dotnet_diagnostic.IDE0073.severity = error # Enforce file header
file_header_template = -----------------------------------------------------------------------\nCopyright (c) David Kean. All rights reserved.\n-----------------------------------------------------------------------

[src/*Tests/**/*.cs]
# We allow usage of "var" inside tests as it reduces churn as we remove/rename types
csharp_style_var_for_built_in_types = true:none
Expand Down
3 changes: 2 additions & 1 deletion src/AudioSwitcher/ApplicationModel/AudioSwitcherApp.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
Expand Down
3 changes: 2 additions & 1 deletion src/AudioSwitcher/ApplicationModel/IApplication.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.Drawing;

Expand Down
3 changes: 1 addition & 2 deletions src/AudioSwitcher/ApplicationModel/IStartupService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------
using System;

namespace AudioSwitcher.ApplicationModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System.ComponentModel.Composition;
using AudioSwitcher.Presentation;
using AudioSwitcher.UI.Presenters;
Expand Down
3 changes: 2 additions & 1 deletion src/AudioSwitcher/ApplicationModel/SaveSettingsService.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.ComponentModel;
using System.ComponentModel.Composition;
Expand Down
6 changes: 5 additions & 1 deletion src/AudioSwitcher/Audio/AudioDevice.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

/*
LICENSE
-------
Copyright (C) 2007 Ray Molenkamp
Expand Down
6 changes: 5 additions & 1 deletion src/AudioSwitcher/Audio/AudioDeviceCollection.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System.Collections;
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System.Collections;
/*
LICENSE
-------
Expand Down
3 changes: 2 additions & 1 deletion src/AudioSwitcher/Audio/AudioDeviceEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;

namespace AudioSwitcher.Audio
Expand Down
4 changes: 3 additions & 1 deletion src/AudioSwitcher/Audio/AudioDeviceKind.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

namespace AudioSwitcher.Audio
{
Expand Down
3 changes: 2 additions & 1 deletion src/AudioSwitcher/Audio/AudioDeviceManager.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

// This source file was altered for use in AudioSwitcher.
/*
LICENSE
Expand Down
4 changes: 2 additions & 2 deletions src/AudioSwitcher/Audio/AudioDeviceRemovedEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using AudioSwitcher.Audio;

namespace AudioSwitcher.Audio
{
Expand Down
6 changes: 3 additions & 3 deletions src/AudioSwitcher/Audio/AudioDeviceRole.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

namespace AudioSwitcher.Audio
{
Expand Down
6 changes: 5 additions & 1 deletion src/AudioSwitcher/Audio/AudioDeviceState.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

/*
LICENSE
-------
Copyright (C) 2007 Ray Molenkamp
Expand Down
3 changes: 1 addition & 2 deletions src/AudioSwitcher/Audio/AudioDeviceStateEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------
using System;

namespace AudioSwitcher.Audio
{
Expand Down
3 changes: 1 addition & 2 deletions src/AudioSwitcher/Audio/DefaultAudioDeviceEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------
using System;

namespace AudioSwitcher.Audio
{
Expand Down
5 changes: 3 additions & 2 deletions src/AudioSwitcher/Audio/InputSwitcherService.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.ComponentModel.Composition;

using AudioSwitcher.ApplicationModel;
using AudioSwitcher.Audio;

namespace AudioSwitcher.Audio
{
Expand Down
9 changes: 5 additions & 4 deletions src/AudioSwitcher/Audio/Interop/MMAudio/Blob.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

/*
LICENSE
-------
Copyright (C) 2007 Ray Molenkamp
Expand All @@ -21,9 +25,6 @@
*/
// Adapted for AudioSwitcher
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace AudioSwitcher.Audio.Interop
{
Expand Down
8 changes: 5 additions & 3 deletions src/AudioSwitcher/Audio/Interop/MMAudio/ClsCtx.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Text;
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;

namespace AudioSwitcher.Audio.Interop
{
Expand Down
4 changes: 2 additions & 2 deletions src/AudioSwitcher/Audio/Interop/MMAudio/IMMDevice.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.Runtime.InteropServices;
using AudioSwitcher.Audio;

namespace AudioSwitcher.Audio.Interop
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.Runtime.InteropServices;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.Runtime.InteropServices;
using AudioSwitcher.Audio;

namespace AudioSwitcher.Audio.Interop
{
Expand Down
9 changes: 5 additions & 4 deletions src/AudioSwitcher/Audio/Interop/MMAudio/IMMEndpoint.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.Runtime.InteropServices;
using AudioSwitcher.Audio;

namespace AudioSwitcher.Audio.Interop
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.Runtime.InteropServices;
using AudioSwitcher.Audio;

namespace AudioSwitcher.Audio.Interop
{
Expand Down
4 changes: 2 additions & 2 deletions src/AudioSwitcher/Audio/Interop/MMAudio/IPolicyConfig2.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System.Runtime.InteropServices;
using AudioSwitcher.Audio;

namespace AudioSwitcher.Audio.Interop
{
Expand Down
4 changes: 2 additions & 2 deletions src/AudioSwitcher/Audio/Interop/MMAudio/IPolicyConfig3.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System.Runtime.InteropServices;
using AudioSwitcher.Audio;

namespace AudioSwitcher.Audio.Interop
{
Expand Down
4 changes: 2 additions & 2 deletions src/AudioSwitcher/Audio/Interop/MMAudio/IPropertyStore.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.Runtime.InteropServices;
using AudioSwitcher.Audio;

namespace AudioSwitcher.Audio.Interop
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.Runtime.InteropServices;

Expand Down
3 changes: 2 additions & 1 deletion src/AudioSwitcher/Audio/Interop/MMAudio/PolicyConfig.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;
using System.Runtime.InteropServices;

Expand Down
8 changes: 5 additions & 3 deletions src/AudioSwitcher/Audio/Interop/MMAudio/PropVariant.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

/*
LICENSE
-------
Copyright (C) 2007 Ray Molenkamp
Expand All @@ -21,9 +25,7 @@
*/
// adapted for use in AudioSwitcher
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;

namespace AudioSwitcher.Audio.Interop
Expand Down
3 changes: 2 additions & 1 deletion src/AudioSwitcher/Audio/Interop/MMAudio/PropertyKey.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

using System;

namespace AudioSwitcher.Audio
Expand Down
5 changes: 2 additions & 3 deletions src/AudioSwitcher/Audio/Interop/MMAudio/PropertyKeys.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

/*
LICENSE
-------
Expand All @@ -23,8 +24,6 @@
3. This notice may not be removed or altered from any source distribution.
*/
using System;
using System.Collections.Generic;
using System.Text;

namespace AudioSwitcher.Audio
{
Expand Down
8 changes: 3 additions & 5 deletions src/AudioSwitcher/Audio/Interop/MMAudio/PropertyStore.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// -----------------------------------------------------------------------
// Copyright (c) David Kean.
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------
// This source file was altered for use in AudioSwitcher.

/*
LICENSE
-------
Expand All @@ -23,10 +23,8 @@
misrepresented as being the original source code.
3. This notice may not be removed or altered from any source distribution.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

using AudioSwitcher.Audio.Interop;

namespace AudioSwitcher.Audio
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/*
// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------

/*
LICENSE
-------
Copyright (C) 2007 Ray Molenkamp
Expand All @@ -22,9 +26,6 @@
// modified from Ray Molenkamp's original


using System;
using System.Collections.Generic;
using System.Text;
using AudioSwitcher.Audio.Interop;

namespace AudioSwitcher.Audio
Expand Down
Loading

0 comments on commit 453e220

Please sign in to comment.