Example #1
0
 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));
     }
 }
Example #2
0
        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));
        }
Example #3
0
 public ElementIcon(object workflowElement)
     : this(workflowElement.GetType())
 {
     includeElement = workflowElement as IncludeWorkflowBuilder;
 }
Example #4
0
 private ElementIcon(string name, IncludeWorkflowBuilder include)
 {
     includeElement = include;
     defaultName    = name;
 }