-
Notifications
You must be signed in to change notification settings - Fork 294
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ALC): add assembly extension method GetUniqueName (#3285)
* If it is an assembly in ALC, add a cache key condition * refactor: 撤销代码格式化 * refactor: 撤销命名空间格式化 * refactor: 增加 AssemblyExtensions 提高代码复用率 * chore: bump version 8.4.5 --------- Co-authored-by: Argo-AscioTech <[email protected]>
- Loading branch information
1 parent
6a0abbb
commit 3276c05
Showing
5 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Argo Zhang ([email protected]). All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
// Website: https://www.blazor.zone or https://argozhang.github.io/ | ||
|
||
using System.Reflection; | ||
|
||
namespace BootstrapBlazor.Components; | ||
|
||
static class AssemblyExtensions | ||
{ | ||
/// <summary> | ||
/// 获得唯一类型名称方法 | ||
/// </summary> | ||
/// <param name="assembly"></param> | ||
/// <returns></returns> | ||
public static string GetUniqueName(this Assembly assembly) => (assembly.IsCollectible | ||
? $"{assembly.GetHashCode()}" | ||
: $"{assembly.GetName().Name}"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters