1 Star 0 Fork 0

LDMING/Z.ExtensionMethods

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Module.GetCustomAttribute.cs 2.14 KB
一键复制 编辑 原始数据 按行查看 历史
Jonathan Magnan 提交于 2019-03-27 08:51 +08:00 . Update all copyright
// Description: C# Extension Methods | Enhance the .NET Framework and .NET Core with over 1000 extension methods.
// Website & Documentation: https://csharp-extension.com/
// Issues: https://github.com/zzzprojects/Z.ExtensionMethods/issues
// License (MIT): https://github.com/zzzprojects/Z.ExtensionMethods/blob/master/LICENSE
// More projects: https://zzzprojects.com/
// Copyright ZZZ Projects Inc. All rights reserved.
using System;
using System.Reflection;
public static partial class Extensions
{
/// <summary>
/// Retrieves a custom attribute applied to a module. Parameters specify the module, and the type of the custom
/// attribute to search for.
/// </summary>
/// <param name="element">An object derived from the class that describes a portable executable file.</param>
/// <param name="attributeType">The type, or a base type, of the custom attribute to search for.</param>
/// <returns>
/// A reference to the single custom attribute of type that is applied to , or null if there is no such
/// attribute.
/// </returns>
public static Attribute GetCustomAttribute(this Module element, Type attributeType)
{
return Attribute.GetCustomAttribute(element, attributeType);
}
/// <summary>
/// Retrieves a custom attribute applied to a module. Parameters specify the module, the type of the custom
/// attribute to search for, and an ignored search option.
/// </summary>
/// <param name="element">An object derived from the class that describes a portable executable file.</param>
/// <param name="attributeType">The type, or a base type, of the custom attribute to search for.</param>
/// <param name="inherit">This parameter is ignored, and does not affect the operation of this method.</param>
/// <returns>
/// A reference to the single custom attribute of type that is applied to , or null if there is no such
/// attribute.
/// </returns>
public static Attribute GetCustomAttribute(this Module element, Type attributeType, Boolean inherit)
{
return Attribute.GetCustomAttribute(element, attributeType, inherit);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/ldming/Z.ExtensionMethods.git
git@gitee.com:ldming/Z.ExtensionMethods.git
ldming
Z.ExtensionMethods
Z.ExtensionMethods
master

搜索帮助