Skip to content

Commit

Permalink
housekeeping: add global usings (#3585)
Browse files Browse the repository at this point in the history
change files to be stored in platform specific format
  • Loading branch information
glennawatson authored Jul 14, 2023
1 parent becafc9 commit 178abac
Show file tree
Hide file tree
Showing 398 changed files with 212 additions and 1,417 deletions.
6 changes: 3 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* text=auto

# Text files that should be normalized to LF in odb.
*.cs text eol=lf diff=csharp
*.cs text diff=csharp
*.xaml text
*.config text
*.c text
Expand Down Expand Up @@ -35,8 +35,8 @@
*.pdb binary
*.sdf binary
*.7z binary
# Generated file should just use CRLF, it's fiiine
SolutionInfo.cs text eol=crlf diff=csharp

# lfs files
*.mht filter=lfs diff=lfs merge=lfs -text
*.ppam filter=lfs diff=lfs merge=lfs -text
*.wmv filter=lfs diff=lfs merge=lfs -text
Expand Down
4 changes: 4 additions & 0 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
<None Include="$(MSBuildThisFileDirectory)..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup Condition="$(MSBuildProjectName.Contains('Fody')) != 'true'">
<Compile Include="$(MSBuildThisFileDirectory)GlobalUsings.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="all" />
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.507" PrivateAssets="all" />
Expand Down
20 changes: 20 additions & 0 deletions src/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) 2023 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

global using global::Splat;
global using global::System;
global using global::System.Collections.Generic;
global using global::System.ComponentModel;
global using global::System.Diagnostics.CodeAnalysis;
global using global::System.Linq;
global using global::System.Linq.Expressions;
global using global::System.Reactive;
global using global::System.Reactive.Concurrency;
global using global::System.Reactive.Disposables;
global using global::System.Reactive.Linq;
global using global::System.Reactive.Subjects;
global using global::System.Reactive.Threading.Tasks;
global using global::System.Threading;
global using global::System.Threading.Tasks;
3 changes: 2 additions & 1 deletion src/ReactiveUI.AndroidSupport/ControlFetcherMixin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using Android.Views;

using static ReactiveUI.ControlFetcherMixin;

using Fragment = Android.Support.V4.App.Fragment;

namespace ReactiveUI.AndroidSupport;
Expand Down
7 changes: 1 addition & 6 deletions src/ReactiveUI.AndroidSupport/ReactiveAppCompatActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reactive.Threading.Tasks;
using System.Threading.Tasks;

using Android.App;
using Android.Content;
using Android.Runtime;
Expand Down
4 changes: 0 additions & 4 deletions src/ReactiveUI.AndroidSupport/ReactiveDialogFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;

namespace ReactiveUI.AndroidSupport;

Expand Down
4 changes: 0 additions & 4 deletions src/ReactiveUI.AndroidSupport/ReactiveFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;

namespace ReactiveUI.AndroidSupport;

Expand Down
7 changes: 1 addition & 6 deletions src/ReactiveUI.AndroidSupport/ReactiveFragmentActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reactive.Threading.Tasks;
using System.Threading.Tasks;

using Android.App;
using Android.Content;
using Android.Support.V4.App;
Expand Down
7 changes: 3 additions & 4 deletions src/ReactiveUI.AndroidSupport/ReactivePagerAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics.CodeAnalysis;
using System.Linq;

using Android.Support.V4.View;
using Android.Views;

using DynamicData;
using DynamicData.Binding;
using Splat;

using Object = Java.Lang.Object;

namespace ReactiveUI.AndroidSupport;
Expand Down
5 changes: 1 addition & 4 deletions src/ReactiveUI.AndroidSupport/ReactivePreferenceFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;

using Android.Runtime;
using Android.Support.V7.Preferences;

Expand Down
5 changes: 2 additions & 3 deletions src/ReactiveUI.AndroidSupport/ReactiveRecyclerViewAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics.CodeAnalysis;
using System.Linq;

using Android.Support.V7.Widget;
using Android.Views;

using DynamicData;
using DynamicData.Binding;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reflection;
using System.Runtime.Serialization;

using Android.Support.V7.Widget;
using Android.Views;

Expand Down
3 changes: 2 additions & 1 deletion src/ReactiveUI.AndroidX/ControlFetcherMixin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using Android.Views;

using static ReactiveUI.ControlFetcherMixin;

using Fragment = AndroidX.Fragment.App.Fragment;

namespace ReactiveUI.AndroidX;
Expand Down
8 changes: 2 additions & 6 deletions src/ReactiveUI.AndroidX/ReactiveAppCompatActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reactive.Threading.Tasks;
using System.Threading.Tasks;

using Android.App;
using Android.Content;
using Android.Runtime;

using AndroidX.AppCompat.App;

namespace ReactiveUI.AndroidX;
Expand Down
4 changes: 0 additions & 4 deletions src/ReactiveUI.AndroidX/ReactiveDialogFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;

namespace ReactiveUI.AndroidX;

Expand Down
4 changes: 0 additions & 4 deletions src/ReactiveUI.AndroidX/ReactiveFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;

namespace ReactiveUI.AndroidX;

Expand Down
8 changes: 2 additions & 6 deletions src/ReactiveUI.AndroidX/ReactiveFragmentActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reactive.Threading.Tasks;
using System.Threading.Tasks;

using Android.App;
using Android.Content;

using AndroidX.Fragment.App;

namespace ReactiveUI.AndroidX;
Expand Down
8 changes: 4 additions & 4 deletions src/ReactiveUI.AndroidX/ReactivePagerAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics.CodeAnalysis;
using System.Linq;

using Android.Views;

using AndroidX.ViewPager.Widget;

using DynamicData;
using DynamicData.Binding;
using Splat;

using Object = Java.Lang.Object;

namespace ReactiveUI.AndroidX;
Expand Down
6 changes: 2 additions & 4 deletions src/ReactiveUI.AndroidX/ReactivePreferenceFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;

using Android.Runtime;

using AndroidX.Preference;

namespace ReactiveUI.AndroidX;
Expand Down
5 changes: 2 additions & 3 deletions src/ReactiveUI.AndroidX/ReactiveRecyclerViewAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics.CodeAnalysis;
using System.Linq;

using AndroidX.RecyclerView.Widget;

using DynamicData;
using DynamicData.Binding;

Expand Down
7 changes: 2 additions & 5 deletions src/ReactiveUI.AndroidX/ReactiveRecyclerViewViewHolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reflection;
using System.Runtime.Serialization;

using Android.Views;

using AndroidX.RecyclerView.Widget;

namespace ReactiveUI.AndroidX;
Expand Down
7 changes: 1 addition & 6 deletions src/ReactiveUI.Blazor/ReactiveComponentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Runtime.CompilerServices;

using Microsoft.AspNetCore.Components;

namespace ReactiveUI.Blazor;
Expand Down
7 changes: 1 addition & 6 deletions src/ReactiveUI.Blazor/ReactiveInjectableComponentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Runtime.CompilerServices;

using Microsoft.AspNetCore.Components;

namespace ReactiveUI.Blazor;
Expand Down
6 changes: 1 addition & 5 deletions src/ReactiveUI.Blazor/ReactiveLayoutComponentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Runtime.CompilerServices;

using Microsoft.AspNetCore.Components;

namespace ReactiveUI.Blazor;
Expand Down
2 changes: 0 additions & 2 deletions src/ReactiveUI.Blazor/Registrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System;
using System.Reactive.Concurrency;
using System.Reactive.PlatformServices;

namespace ReactiveUI.Blazor;
Expand Down
Loading

0 comments on commit 178abac

Please sign in to comment.