static ElementIcon GetNamespaceIcon(string name, string assemblyName, IncludeWorkflowBuilder include) { if (string.IsNullOrEmpty(assemblyName) || assemblyName == name) { return(new ElementIcon(name, include)); } else if (string.IsNullOrEmpty(name)) { return(new ElementIcon(assemblyName, include)); } else { return(new ElementIcon(assemblyName + AssemblySeparator + name, include)); } }
static ElementIcon GetNamespaceIcon(string ns, Assembly assembly, IncludeWorkflowBuilder include = null) { var name = ns; var assemblyName = assembly.GetName().Name; foreach (var attribute in assembly.GetCustomAttributes <WorkflowNamespaceIconAttribute>()) { if (attribute.Namespace == ns || string.IsNullOrEmpty(attribute.Namespace)) { assemblyName = string.Empty; name = attribute.ResourceName; if (!string.IsNullOrEmpty(attribute.Namespace)) { break; } } } return(GetNamespaceIcon(name, assemblyName, include)); }
public ElementIcon(object workflowElement) : this(workflowElement.GetType()) { includeElement = workflowElement as IncludeWorkflowBuilder; }
private ElementIcon(string name, IncludeWorkflowBuilder include) { includeElement = include; defaultName = name; }