Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Dec 21, 2020
2 parents 74eaa9b + d4c794b commit 7e5ec73
Show file tree
Hide file tree
Showing 150 changed files with 1,694 additions and 1,310 deletions.
2 changes: 1 addition & 1 deletion .build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ protected override void OnBuildInitialized()
.DependsOn(CleanOutput)
.DependsOn(Compile)
.Executes(() => {
// Generate ingore files to prevent chocolatey from generating shims for them
// Generate ignore files to prevent chocolatey from generating shims for them
foreach (var launcher in CurrentBuildOutputDirectory.GlobFiles($"{ProjectName}.InjectorLauncher.*.exe"))
{
using var _ = File.Create(launcher + ".ignore");
Expand Down
16 changes: 16 additions & 0 deletions .build/Configuration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.ComponentModel;
using System.Linq;
using Nuke.Common.Tooling;

[TypeConverter(typeof(TypeConverter<Configuration>))]
public class Configuration : Enumeration
{
public static Configuration Debug = new Configuration { Value = nameof(Debug) };
public static Configuration Release = new Configuration { Value = nameof(Release) };

public static implicit operator string(Configuration configuration)
{
return configuration.Value;
}
}
2 changes: 1 addition & 1 deletion .build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="0.24.11" />
<PackageReference Include="Nuke.Common" Version="5.0.2" />
<PackageDownload Include="GitVersion.Tool" Version="[5.2.4]" />
<PackageDownload Include="Nuget.CommandLine" Version="[5.5.1]" />
<PackageDownload Include="wix" Version="[3.11.2]" />
Expand Down
1 change: 1 addition & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"line-length": false,
"MD024": false,
"MD033": false
}
11 changes: 10 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog for Snoop

## 3.0.1

- ### Bug fixes

- Fixing window finder cursor display when DPI != 100%
- [#203](../../issues/203) - The calling thread cannot access this object because a different thread owns it.
- [#207](../../issues/207) - Exception when trying to snoop application with invalid resource definitions inside ResourceDictionary

## 3.0.0

- ### Bug fixes
Expand Down Expand Up @@ -84,4 +92,5 @@

- ### Improvements

- Added a new triggers tab to view triggers from ControlTemplates and Styles
- Added a new triggers tab to view triggers from ControlTemplates and Styles

1 change: 1 addition & 0 deletions Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PropertyGroup>
<LangVersion>preview</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);NU1503</NoWarn>
</PropertyGroup>

Expand Down
12 changes: 6 additions & 6 deletions Directory.packages.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<ItemGroup>
<PackageVersion Include="CommandLineParser" Version="2.*" />
<PackageVersion Include="CommandLineParser" Version="2.8.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net40'">
Expand All @@ -16,13 +16,13 @@
</ItemGroup>

<ItemGroup Label="Build">
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.*" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />

<PackageVersion Include="JetBrains.Annotations" Version="2020.*" />
<PackageVersion Include="JetBrains.Annotations" Version="2020.3.0" />

<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" version="3.*" />
<PackageVersion Include="StyleCop.Analyzers" version="1.*" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" version="3.8.0" />
<PackageVersion Include="StyleCop.Analyzers" version="1.2.0-beta.312" />

<PackageVersion Include="WpfAnalyzers" version="3.*" />
<PackageVersion Include="WpfAnalyzers" version="3.5.2" />
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ branches:
prevent-increment-of-merged-branch-version: true
track-merge-target: false
is-release-branch: true
increment: Patch
develop:
mode: ContinuousDeployment
tag: alpha
prevent-increment-of-merged-branch-version: true
track-merge-target: true
tracks-release-branches: true
increment: Patch
pull-request:
mode: ContinuousDelivery
ignore:
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ It allows you to spy/browse the visual tree of a running application (without th

## Versions

### [3.0.0](../../tree/develop) (preview)
### [3.0.0](../../releases/tag/v3.0.0)

You can read the [changelog](Changelog.md) for details on what changed in this version.
Please note that this version is not yet finished.
Expand All @@ -36,7 +36,7 @@ Highlights:
- Snooping disabled controls when holding CTRL + SHIFT works now
- Snoop now filters uncommon properties by default
- Snoop is now able to show `MergedDictionaries` from `ResourceDictionary`
- Snoop now has two tracking modes.
- Snoop now has two tracking modes.
- Holding CTRL tries to skip template parts
- Holding CTRL + SHIFT does not skip template parts
- Drastically improved performance of AppChooser.Refresh() (thanks @mikel785)
Expand Down Expand Up @@ -95,8 +95,9 @@ Just open `Snoop.sln` with Visual Studio 2019 (16.7 or later) and build it.
Please note that you need the Visual Studio 2019 C++ payload and in case you are using a later version you also need the VC++ 142 payload.

Requirements:
- Visual Studio 2019 16.7 (including C++ payload)
- .NET Core SDK 3.1.400

- Visual Studio 2019 16.8 (including C++ payload)
- .NET Core SDK 5.0.100

## Contributors

Expand Down
8 changes: 4 additions & 4 deletions Shared/InjectorData.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
public class InjectorData
{
public string FullAssemblyPath { get; set; }
public string FullAssemblyPath { get; set; } = string.Empty;

public string ClassName { get; set; }
public string ClassName { get; set; } = string.Empty;

public string MethodName { get; set; }
public string MethodName { get; set; } = string.Empty;

public string SettingsFile { get; set; }
public string? SettingsFile { get; set; }
}
8 changes: 4 additions & 4 deletions Snoop.Core/Controls/AdornerContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Snoop.Controls
/// </summary>
public class AdornerContainer : Adorner
{
private UIElement child;
private UIElement? child;

static AdornerContainer()
{
Expand All @@ -30,10 +30,10 @@ public AdornerContainer(UIElement adornedElement)

protected override int VisualChildrenCount => this.child is null ? 0 : 1;

protected override Visual GetVisualChild(int index)
protected override Visual? GetVisualChild(int index)
{
if (index == 0
&& this.child != null)
&& this.child is not null)
{
return this.child;
}
Expand All @@ -48,7 +48,7 @@ protected override Size ArrangeOverride(Size finalSize)
return finalSize;
}

public UIElement Child
public UIElement? Child
{
get { return this.child; }

Expand Down
4 changes: 2 additions & 2 deletions Snoop.Core/Controls/Inspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Snoop.Controls

public class Inspector : Grid
{
public PropertyFilter Filter
public PropertyFilter? Filter
{
get { return this.filter; }

Expand All @@ -21,7 +21,7 @@ public PropertyFilter Filter
}
}

private PropertyFilter filter;
private PropertyFilter? filter;

protected virtual void OnFilterChanged()
{
Expand Down
10 changes: 5 additions & 5 deletions Snoop.Core/Controls/Previewer.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace Snoop.Controls

public partial class Previewer
{
public static readonly RoutedCommand MagnifyCommand = new RoutedCommand(nameof(MagnifyCommand), typeof(Previewer));
public static readonly RoutedCommand ScreenshotCommand = new RoutedCommand(nameof(ScreenshotCommand), typeof(Previewer));
public static readonly RoutedCommand MagnifyCommand = new(nameof(MagnifyCommand), typeof(Previewer));
public static readonly RoutedCommand ScreenshotCommand = new(nameof(ScreenshotCommand), typeof(Previewer));

public Previewer()
{
Expand Down Expand Up @@ -44,7 +44,7 @@ public object Target
typeof(object),
typeof(Previewer),
new FrameworkPropertyMetadata(
(object)null,
default,
OnTargetChanged));

/// <summary>
Expand Down Expand Up @@ -121,7 +121,7 @@ private void HandleTargetOrIsActiveChanged()

private void HandleCanMagnify(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = this.Target as Visual != null;
e.CanExecute = this.Target as Visual is not null;
e.Handled = true;
}

Expand All @@ -134,7 +134,7 @@ private void HandleMagnify(object sender, ExecutedRoutedEventArgs e)

private void HandleCanScreenshot(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = this.Target as Visual != null;
e.CanExecute = this.Target as Visual is not null;
e.Handled = true;
}

Expand Down
Loading

0 comments on commit 7e5ec73

Please sign in to comment.