├── docs
├── Packages
│ ├── Walterlv.Logger
│ │ └── README.md
│ └── Walterlv.NullableAttributes
│ │ └── README.md
└── Tools
│ └── Walterlv.CodeAnalysis.Analyzers
│ └── README.md
├── src
├── Walterlv.Packages.snk
├── Analyzers
│ └── Walterlv.CodeAnalysis.Analyzers
│ │ ├── Analyzers
│ │ └── AutoPropertyAnalyzer.cs
│ │ ├── DiagnosticIds.cs
│ │ ├── DiagnosticUrls.cs
│ │ ├── Properties
│ │ ├── LocalizableStrings.cs
│ │ └── Resources.Designer.cs
│ │ ├── Walterlv.CodeAnalysis.Analyzers.csproj
│ │ └── CodeFixes
│ │ ├── AutoPropertyToOtherCodeFixProvider.cs
│ │ ├── AutoPropertyToNotificationPropertyCodeFixProvider.cs
│ │ ├── AutoPropertyToDependencyPropertyCodeFixProvider.cs
│ │ └── AutoPropertyToAttachedPropertyCodeFixProvider.cs
├── Frameworks
│ └── Walterlv.Windows.Framework
│ │ ├── Walterlv.Windows.Framework.Wpf
│ │ ├── Windows
│ │ │ ├── Navigating
│ │ │ │ ├── INavigationView.cs
│ │ │ │ ├── INavigationViewModel.cs
│ │ │ │ ├── NavigationView.cs
│ │ │ │ ├── NavigationViewModel.cs
│ │ │ │ ├── NavigationItemAttribute.cs
│ │ │ │ └── NavigationItem.cs
│ │ │ └── Input
│ │ │ │ ├── ActionCommand`1.cs
│ │ │ │ └── ActionCommand.cs
│ │ ├── Walterlv.Windows.Framework.Wpf.csproj
│ │ └── ComponentModel
│ │ │ └── BindableObject.cs
│ │ ├── Walterlv.Windows.Framework.WinUI
│ │ └── Walterlv.Windows.Framework.WinUI.csproj
│ │ └── Walterlv.Windows.Framework (Package)
│ │ └── Walterlv.Windows.Framework (Package).csproj
├── Themes
│ └── Walterlv.Themes.FluentDesign
│ │ ├── Effects
│ │ ├── AccentCompositionBorder.cs
│ │ └── WindowAccentCompositor.cs
│ │ ├── Walterlv.Themes.FluentDesign.csproj
│ │ ├── Converters
│ │ └── ColorToBrushConverter.cs
│ │ ├── Core
│ │ └── Dpi.cs
│ │ ├── Controls
│ │ └── ClientAreaBorder.cs
│ │ └── Themes
│ │ └── Window.Universal.xaml.cs
├── Utils
│ ├── Walterlv.Collections
│ │ ├── Concurrent
│ │ │ ├── ReadonlyObservableBagExtensions.cs
│ │ │ ├── ObservableConcurrentBag.cs
│ │ │ └── ReadonlyObservableBag.cs
│ │ ├── Walterlv.Collections.csproj
│ │ ├── Threading
│ │ │ └── AsyncQueue.cs
│ │ ├── CartesianProduct.cs
│ │ └── Generic
│ │ │ └── WeakCollection.cs
│ ├── Walterlv.IO
│ │ ├── Walterlv.IO.csproj
│ │ └── FileNameHelper.cs
│ ├── Walterlv.Console
│ │ ├── Walterlv.Console.csproj
│ │ ├── Utils
│ │ │ └── ConsoleStringExtensions.cs
│ │ └── ConsoleTables
│ │ │ ├── ConsoleTableBuilder.cs
│ │ │ └── ConsoleTableColumnDefinition.cs
│ ├── Walterlv.WeakEvents
│ │ ├── Walterlv.WeakEvents.csproj
│ │ └── WeakEventRelay.cs
│ ├── Walterlv.Logger
│ │ ├── Markdown
│ │ │ ├── IMarkdownDataTemplate.cs
│ │ │ ├── MarkdownDataTemplate.cs
│ │ │ └── MarkdownLogger.cs
│ │ ├── Standard
│ │ │ ├── ConsoleLogger.cs
│ │ │ ├── AsyncConsoleLogger.cs
│ │ │ └── ConsoleLogWriter.cs
│ │ ├── Walterlv.Logger.csproj
│ │ ├── LogLevel.cs
│ │ ├── Core
│ │ │ ├── ActionLogger.cs
│ │ │ ├── TaskFuncLogger.cs
│ │ │ ├── AsyncOutputLogger.AsyncQueue.cs
│ │ │ ├── LogContext.cs
│ │ │ └── OutputLogger.cs
│ │ ├── ILogger.cs
│ │ ├── Composition
│ │ │ └── CompositeLogger.cs
│ │ └── IO
│ │ │ └── TextFileLoggerExtensions.cs
│ ├── Walterlv.Windows
│ │ ├── Walterlv.Windows.csproj
│ │ └── Media
│ │ │ ├── VisualTreeExtensions.cs
│ │ │ └── VisualTreeSearchConditions.cs
│ ├── Walterlv.IO.PackageManagement
│ │ ├── Walterlv.IO.PackageManagement.csproj
│ │ ├── FileMergeStrategy.cs
│ │ ├── DirectoryOverwriteStrategy.cs
│ │ ├── IOResult.cs
│ │ └── FileMergeResolvingInfo.cs
│ ├── Walterlv.Win32
│ │ ├── Walterlv.Win32.csproj
│ │ └── WindowEnumerator.cs
│ ├── Walterlv.Web
│ │ ├── Walterlv.Web.csproj
│ │ └── Core
│ │ │ └── QueryString.cs
│ ├── Walterlv.Environment
│ │ └── Walterlv.Environment.csproj
│ └── Walterlv.Windows.Interop
│ │ ├── Interop
│ │ ├── Win32WindowEventArgs.cs
│ │ └── WpfWin32WindowWrapper.cs
│ │ ├── Walterlv.Windows.Interop.csproj
│ │ └── Media
│ │ └── VisualScalingExtensions.cs
├── Directory.Build.targets
└── Directory.Build.props
├── samples
└── Walterlv.Windows.Sample
│ ├── ViewModels
│ ├── HomeViewModel.cs
│ └── FluentViewModel.cs
│ ├── App.config
│ ├── App.xaml.cs
│ ├── MainViewModel.cs
│ ├── Views
│ ├── HomePage.xaml
│ ├── HomePage.xaml.cs
│ ├── FluentPage.xaml.cs
│ └── FluentPage.xaml
│ ├── MainWindow.xaml.cs
│ ├── Walterlv.Windows.Sample.csproj
│ ├── App.xaml
│ └── Properties
│ └── App.manifest
├── tests
├── Walterlv.Packages.Performance
│ ├── Program.cs
│ └── Walterlv.Packages.Performance.csproj
└── Walterlv.Packages.Tests
│ ├── Walterlv.Packages.Tests.csproj
│ ├── Collections
│ ├── Generic
│ │ └── WeakCollectionTests.cs
│ └── CartesianProductTests.cs
│ └── Logging
│ └── IO
│ ├── AsyncOutputLoggerTest.cs
│ └── TextFileLoggerTests.cs
├── .github
└── workflows
│ ├── nuget-push.yml
│ └── dotnet-build.yml
├── Directory.Build.props
└── .gitattributes
/docs/Packages/Walterlv.Logger/README.md:
--------------------------------------------------------------------------------
1 | # Walterlv.Logger
2 |
--------------------------------------------------------------------------------
/docs/Tools/Walterlv.CodeAnalysis.Analyzers/README.md:
--------------------------------------------------------------------------------
1 | # Walterlv.CodeAnalysis.Analyzers
2 |
--------------------------------------------------------------------------------
/src/Walterlv.Packages.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walterlv/Walterlv.Packages/HEAD/src/Walterlv.Packages.snk
--------------------------------------------------------------------------------
/src/Analyzers/Walterlv.CodeAnalysis.Analyzers/Analyzers/AutoPropertyAnalyzer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walterlv/Walterlv.Packages/HEAD/src/Analyzers/Walterlv.CodeAnalysis.Analyzers/Analyzers/AutoPropertyAnalyzer.cs
--------------------------------------------------------------------------------
/src/Frameworks/Walterlv.Windows.Framework/Walterlv.Windows.Framework.Wpf/Windows/Navigating/INavigationView.cs:
--------------------------------------------------------------------------------
1 | namespace Walterlv.Windows.Navigating
2 | {
3 | public interface INavigationView
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/samples/Walterlv.Windows.Sample/ViewModels/HomeViewModel.cs:
--------------------------------------------------------------------------------
1 | using Walterlv.ComponentModel;
2 |
3 | namespace Walterlv.Windows.Sample.ViewModels
4 | {
5 | public class HomeViewModel : BindableObject
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/Frameworks/Walterlv.Windows.Framework/Walterlv.Windows.Framework.Wpf/Windows/Navigating/INavigationViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Walterlv.Windows.Navigating
2 | {
3 | public interface INavigationViewModel
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/samples/Walterlv.Windows.Sample/ViewModels/FluentViewModel.cs:
--------------------------------------------------------------------------------
1 | using Walterlv.ComponentModel;
2 |
3 | namespace Walterlv.Windows.Sample.ViewModels
4 | {
5 | public class FluentViewModel : BindableObject
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tests/Walterlv.Packages.Performance/Program.cs:
--------------------------------------------------------------------------------
1 | namespace Walterlv.Packages.Performance
2 | {
3 | internal class Program
4 | {
5 | private static void Main(string[] args)
6 | {
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/samples/Walterlv.Windows.Sample/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/Analyzers/Walterlv.CodeAnalysis.Analyzers/DiagnosticIds.cs:
--------------------------------------------------------------------------------
1 | namespace Walterlv.CodeAnalysis
2 | {
3 | internal static class DiagnosticIds
4 | {
5 | // 纯代码生成:WCA001-WCA199
6 | public const string AutoProperty = "WCA001";
7 |
8 | // 代码诊断和生成:WCA201-WCA999
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Analyzers/Walterlv.CodeAnalysis.Analyzers/DiagnosticUrls.cs:
--------------------------------------------------------------------------------
1 | namespace Walterlv.CodeAnalysis
2 | {
3 | internal static class DiagnosticUrls
4 | {
5 | public static string Get(string diagnosticId)
6 | => $"https://github.com/dotnet-campus/dotnetCampus.CommandLine/docs/analyzers/{diagnosticId}.md";
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/Frameworks/Walterlv.Windows.Framework/Walterlv.Windows.Framework.Wpf/Windows/Navigating/NavigationView.cs:
--------------------------------------------------------------------------------
1 | using Walterlv.ComponentModel;
2 |
3 | namespace Walterlv.Windows.Navigating
4 | {
5 | public class NavigationView : BindableObject, INavigationView where TView : new()
6 | {
7 | public NavigationView()
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Analyzers/Walterlv.CodeAnalysis.Analyzers/Properties/LocalizableStrings.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.CodeAnalysis;
2 |
3 | namespace Walterlv.CodeAnalysis.Properties
4 | {
5 | internal static class LocalizableStrings
6 | {
7 | public static LocalizableString Get(string key) => new LocalizableResourceString(key, Resources.ResourceManager, typeof(Resources));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/Frameworks/Walterlv.Windows.Framework/Walterlv.Windows.Framework.Wpf/Windows/Navigating/NavigationViewModel.cs:
--------------------------------------------------------------------------------
1 | using Walterlv.ComponentModel;
2 |
3 | namespace Walterlv.Windows.Navigating
4 | {
5 | public class NavigationViewModel : BindableObject where TViewModel : new()
6 | {
7 | public NavigationViewModel()
8 | {
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Themes/Walterlv.Themes.FluentDesign/Effects/AccentCompositionBorder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 |
9 | namespace Walterlv.Windows.Effects
10 | {
11 | public class AccentCompositionBorder : Decorator
12 | {
13 |
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/samples/Walterlv.Windows.Sample/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace Walterlv.Windows.Sample
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.Collections/Concurrent/ReadonlyObservableBagExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Walterlv.Collections.Concurrent
4 | {
5 | public static class ReadonlyObservableBagExtensions
6 | {
7 | public static ReadonlyObservableBag Select(this ObservableConcurrentBag collection, Func predicate)
8 | {
9 | return new ReadonlyObservableBag(collection, predicate);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.IO/Walterlv.IO.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0;netstandard2.0;net45
5 | Walterlv.IO provides many helpers to manage file or directory path and names.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/Frameworks/Walterlv.Windows.Framework/Walterlv.Windows.Framework.Wpf/Windows/Navigating/NavigationItemAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Walterlv.Windows.Navigating
4 | {
5 | [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
6 | sealed class NavigationItemAttribute : Attribute
7 | {
8 | public string Title { get; }
9 |
10 | public NavigationItemAttribute(string title)
11 | {
12 | Title = title;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.Console/Walterlv.Console.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | This library provide some extensions to help you build better console apps.
6 | Walterlv.ConsoleExtensions
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.Collections/Walterlv.Collections.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0;netstandard2.0;net45
5 | Provide some kinds of unsual collections such as AsyncQueue for async/await pattern, ObservableConcurrentBag for notification in multi-thread situations.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.WeakEvents/Walterlv.WeakEvents.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0;netstandard2.0;net45
5 | This library provide weak event support. You can implement your own event in weak reference, and you can also transform existed CLR events into weak events.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.Logger/Markdown/IMarkdownDataTemplate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Walterlv.Logging.Markdown
5 | {
6 | ///
7 | /// 表示一个 Markdown 转日志表格的数据模板。
8 | ///
9 | ///
10 | public interface IMarkdownDataTemplate
11 | {
12 | ///
13 | /// 指示如何将数据转为 Markdown 表格中的一列。
14 | ///
15 | /// 表格中的列头和此列的转换委托。
16 | IDictionary> ToDictionary();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.Windows/Walterlv.Windows.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0;net45
5 | true
6 | Walterlv.Windows
7 | This is a library for WPF projects. In this version, it provides search across visual tree hierarchies.
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.IO.PackageManagement/Walterlv.IO.PackageManagement.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0;netcoreapp3.0;netstandard2.0;net45
5 | Walterlv.IO.PackageManagement is a tool for you to manage packages. It manage a directory with many versions of sub-directories and a current Junction Point linked to one of them.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.Logger/Standard/ConsoleLogger.cs:
--------------------------------------------------------------------------------
1 | using Walterlv.Logging.Core;
2 |
3 | namespace Walterlv.Logging.Standard
4 | {
5 | ///
6 | /// 提供向控制台输出日志的方法。
7 | ///
8 | public sealed class ConsoleLogger : OutputLogger
9 | {
10 | private readonly ConsoleLogWriter _writer = new ConsoleLogWriter();
11 |
12 | ///
13 | protected override void OnInitialized()
14 | {
15 | }
16 |
17 | ///
18 | protected override void OnLogReceived(in LogContext context) => _writer.Write(context);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.Win32/Walterlv.Win32.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0;netstandard2.0;net45
5 | This library provides Win32 extensions. It deos not contains any Win32 type definitions or any Win32 APIs.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.Web/Walterlv.Web.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0;netstandard2.0;net45
5 | This library provide some extensions for System.Web. It contains query string extensions only in this version.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/samples/Walterlv.Windows.Sample/MainViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.ObjectModel;
2 | using Walterlv.ComponentModel;
3 | using Walterlv.Windows.Navigating;
4 | using Walterlv.Windows.Sample.ViewModels;
5 | using Walterlv.Windows.Sample.Views;
6 |
7 | namespace Walterlv.Windows.Sample
8 | {
9 | public class MainViewModel : BindableObject
10 | {
11 | public ObservableCollection PageItems { get; } = new ObservableCollection
12 | {
13 | NavigationItem.Combine("主页"),
14 | NavigationItem.Combine("Fluent 主题"),
15 | };
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Themes/Walterlv.Themes.FluentDesign/Walterlv.Themes.FluentDesign.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0;net45
5 | true
6 | Walterlv.Windows
7 | Provide fluent design visual styles such as `RevealBrush` for WPF. But you should know that it is simulated so it's not recommended to use it in very large projects.
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.Environment/Walterlv.Environment.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.0;netstandard2.0;net45
5 | Walterlv
6 | Provide information of .NET Framework from the system registry.
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/Utils/Walterlv.Logger/Standard/AsyncConsoleLogger.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Walterlv.Logging.Core;
3 |
4 | namespace Walterlv.Logging.Standard
5 | {
6 | ///
7 | /// 提供向控制台输出日志的方法。
8 | ///
9 | public sealed class AsyncConsoleLogger : AsyncOutputLogger
10 | {
11 | private readonly ConsoleLogWriter _writer = new ConsoleLogWriter();
12 |
13 | ///
14 | protected override Task OnInitializedAsync() => Task.FromResult