public ToolBoxItemFunctionModel( MethodInfo mi, AttributeTuple <DesignElementAttribute, Type> data, DesignerResource resource) : base(data, resource) { this.MethodInfo = mi; }
public ToolBoxItemFunctionModel( MethodInfo mi, AttributeTuple <DesignElementAttribute, Type> data, DesignerResource resource) : base(data, resource) { this.MethodInfo = mi; this.IsSupportJS = mi.HasAttribute <JSCodeMapAttribute>(); }
private static IEnumerable <AttributeTuple <DesignElementAttribute, MethodInfo> > GetFunctionsCore(Type declareType) { return(declareType.GetMethods() .Where(pi => pi.HasAttribute <DXFunctionAttribute>()) .Select(mi => { var attr = Migration(mi.GetAttribute <DXFunctionAttribute>()); var tuple = new AttributeTuple <DesignElementAttribute, MethodInfo>(attr, mi); attr.Category = mi.DeclaringType.GetAttribute <DXModuleAttribute>().DisplayName; return tuple; })); }
// 일반 레이아웃 및 컴포넌트 public ToolBoxItemModel(AttributeTuple <DesignElementAttribute, Type> data, DesignerResource resource) { this.Metadata = data; this.Resource = resource; this.ToolTip = this.Resource.ToolTip; this.Category = Metadata.Attribute.Category; string displayName = Metadata.Attribute.DisplayName; // Default Display Name if (string.IsNullOrEmpty(displayName)) { displayName = Metadata.Element.GetType().Name; } this.Title = displayName; }
public PropertyGridItemModel(AttributeTuple <DesignElementAttribute, PropertyInfo> data, ISetter setter) { this.Metadata = data; this.Setter = setter; }
private int CreatePropertyHash(AttributeTuple <DesignElementAttribute, PropertyInfo> attr) { return($"{attr.Attribute.Key}{attr.Attribute.DisplayName}{attr.Element.PropertyType.MetadataToken}".GetHashCode()); }
public PropertyItem(AttributeTuple <DesignElementAttribute, PropertyInfo> data) { this.Metadata = data.Attribute; this.Property = data.Element.GetDependencyProperty(); }