public AssemblyQualifiedTypeName(FullTypeName typeName, string assemblyName) { this.AssemblyName = assemblyName; this.TypeName = typeName; }
public AssemblyQualifiedTypeName(ITypeDefinition typeDefinition) { this.AssemblyName = typeDefinition.ParentAssembly.AssemblyName; this.TypeName = typeDefinition.FullTypeName; }
/// <summary> /// Gets the attribute of the specified attribute type (or derived attribute types). /// </summary> /// <param name="entity">The entity on which the attributes are declared.</param> /// <param name="attributeType">The attribute type to look for.</param> /// <param name="inherit"> /// Specifies whether attributes inherited from base classes and base members (if the given <paramref name="entity"/> in an <c>override</c>) /// should be returned. The default is <c>true</c>. /// </param> /// <returns> /// Returns the attribute that was found; or <c>null</c> if none was found. /// If inherit is true, an from the entity itself will be returned if possible; /// and the base entity will only be searched if none exists. /// </returns> public static IAttribute GetAttribute(this IEntity entity, FullTypeName attributeType, bool inherit = true) { return(GetAttributes(entity, attributeType, inherit).FirstOrDefault()); }