Skip to content

Conversation

@walterlv
Copy link
Member

@walterlv walterlv commented May 6, 2025

  1. 不再支持 $(DCUseGeneratedLogger) 属性设置,因为会与 ExcludeAssets 冲突且无法解决此冲突;改为完全由 ExcludeAssets 设置
  2. 生成的类(除 ILoggerBridge 外)的命名空间不再跟随项目,而是完全统一;这样做能在使用引用和使用源之间切换时无需修改代码。
  3. 鉴于上述改动(命名空间已经变化),所以顺便让 dotnetCampus 命名空间规范化为 DotNetCampus
  4. 移除 Immutable 相关集合的使用
  5. 升级库

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces breaking API changes by unifying namespaces from dotnetCampus to DotNetCampus, removing legacy configuration properties, and updating documentation accordingly.

  • Removes support for the $(DCUseGeneratedLogger) property and solely relies on ExcludeAssets.
  • Unifies generated class namespaces and standardizes the DotNetCampus naming convention.
  • Updates samples and documentation to reflect the new API and namespace changes.

Reviewed Changes

Copilot reviewed 74 out of 84 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/DotNetCampus.Logger.Analyzer/Diagnostics.cs Updated namespace and diagnostic identifiers to use DotNetCampus.
src/DotNetCampus.Logger.Analyzer/DiagnosticAnalyzers/PartialProgramAnalyzer.cs Adjusted namespace for analyzer consistency.
src/DotNetCampus.Logger.Analyzer/CodeFixeProviders/PartialProgramCodeFixProvider.cs Updated namespace and static import for localized resources.
src/DotNetCampus.Logger.Analyzer/Assets/Templates/AggregateLoggerBridgeLinker.g.cs Revised namespace usages for logger bridge linker.
samples/* Updated usings and namespaces in sample projects and documentation.
Files not reviewed (10)
  • Directory.Build.props: Language not supported
  • Directory.Build.targets: Language not supported
  • DotNetCampus.Logger.sln: Language not supported
  • build/Version.props: Language not supported
  • samples/LoggerSample.InternalsVisibleToProject/LoggerSample.InternalsVisibleToProject.csproj: Language not supported
  • samples/LoggerSample.LoggerDependentLibrary/LoggerSample.LoggerDependentLibrary.csproj: Language not supported
  • samples/LoggerSample.LoggerIndependentLibrary/LoggerSample.LoggerIndependentLibrary.csproj: Language not supported
  • samples/LoggerSample.LoggerIndependentProject/LoggerSample.LoggerIndependentProject.csproj: Language not supported
  • samples/LoggerSample.MainApp/LoggerSample.MainApp.csproj: Language not supported
  • src/DotNetCampus.Logger.Analyzer/DotNetCampus.Logger.Analyzer.csproj: Language not supported
Comments suppressed due to low confidence (2)

src/DotNetCampus.Logger.Analyzer/CodeFixeProviders/PartialProgramCodeFixProvider.cs:12

  • [nitpick] The identifier 'CodeFixeProviders' in the namespace may be a typographical error; consider renaming it to 'CodeFixProviders' for clarity and consistency.
namespace DotNetCampus.Logger.CodeFixeProviders;

src/DotNetCampus.Logger.Analyzer/Diagnostics.cs:74

  • [nitpick] Confirm that using 'Localizations.ResourceManager' instead of a previously defined ResourceManager is intentional, ensuring that resource resolution works as expected.
private static LocalizableString Localize(string key) => new LocalizableResourceString(key, Localizations.ResourceManager, typeof(Localizations));

@walterlv walterlv requested a review from lindexi May 15, 2025 07:37
@lindexi lindexi merged commit 7252ff0 into main May 15, 2025
2 checks passed
@lindexi lindexi deleted the t/walterlv/internals-visible-to branch May 15, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants