Class EntityFieldAttribute
Nombre del espacio: Aspose.Tasks.Attributes Asamblea: Aspose.Tasks.dll (25.4.0)
Representa un atributo para las propiedades de la entidad.
[AttributeUsage(AttributeTargets.Property)]
public class EntityFieldAttribute : Attribute
Inheritance
object ← Attribute ← EntityFieldAttribute
Miembros heredados
Attribute.GetCustomAttributes(MemberInfo, Type) ,y, Attribute.GetCustomAttributes(MemberInfo, Type, bool) ,y, Attribute.GetCustomAttributes(MemberInfo) ,y, Attribute.GetCustomAttributes(MemberInfo, bool) ,y, Attribute.IsDefined(MemberInfo, Type) ,y, Attribute.IsDefined(MemberInfo, Type, bool) ,y, Attribute.GetCustomAttribute(MemberInfo, Type) ,y, Attribute.GetCustomAttribute(MemberInfo, Type, bool) ,y, Attribute.GetCustomAttributes(ParameterInfo) ,y, Attribute.GetCustomAttributes(ParameterInfo, Type) ,y, Attribute.GetCustomAttributes(ParameterInfo, Type, bool) ,y, Attribute.GetCustomAttributes(ParameterInfo, bool) ,y, Attribute.IsDefined(ParameterInfo, Type) ,y, Attribute.IsDefined(ParameterInfo, Type, bool) ,y, Attribute.GetCustomAttribute(ParameterInfo, Type) ,y, Attribute.GetCustomAttribute(ParameterInfo, Type, bool) ,y, Attribute.GetCustomAttributes(Module, Type) ,y, Attribute.GetCustomAttributes(Module) ,y, Attribute.GetCustomAttributes(Module, bool) ,y, Attribute.GetCustomAttributes(Module, Type, bool) ,y, Attribute.IsDefined(Module, Type) ,y, Attribute.IsDefined(Module, Type, bool) ,y, Attribute.GetCustomAttribute(Module, Type) ,y, Attribute.GetCustomAttribute(Module, Type, bool) ,y, Attribute.GetCustomAttributes(Assembly, Type) ,y, Attribute.GetCustomAttributes(Assembly, Type, bool) ,y, Attribute.GetCustomAttributes(Assembly) ,y, Attribute.GetCustomAttributes(Assembly, bool) ,y, Attribute.IsDefined(Assembly, Type) ,y, Attribute.IsDefined(Assembly, Type, bool) ,y, Attribute.GetCustomAttribute(Assembly, Type) ,y, Attribute.GetCustomAttribute(Assembly, Type, bool) ,y, Attribute.Equals(object?) ,y, Attribute.GetHashCode() ,y, Attribute.Match(object?) ,y, Attribute.IsDefaultAttribute() ,y, Attribute.TypeId ,y, object.GetType() ,y, object.MemberwiseClone() ,y, object.ToString() ,y, object.Equals(object?) ,y, object.Equals(object?, object?) ,y, object.ReferenceEquals(object?, object?) ,y, object.GetHashCode()
Examples
Cómo identificar las propiedades utilizando EntityField Los atributos:
var project = new Project("sample.mpp");
foreach (var task in project.SelectAllChildTasks())
{
Console.WriteLine("Task:");
foreach (var propInfo in typeof(Task).GetProperties().Where(propInfo => propInfo.GetCustomAttribute{Attributes.EntityFieldAttribute}() != null))
{
Console.WriteLine(string.Format("{0}: {1}", propInfo.Name, propInfo.GetValue(task)));
}
}
Remarks
Atributos utilizados para Aspose.Tasks.Task, Aspose.Tasks.Resource, Aspose.Tasks.Proyectoy Aspose.Tasks.ResourceAssignment sólo propiedades de la entidad, y simplifica su enumeración.
Constructors
EntityFieldAttribute()
public EntityFieldAttribute()