public Validator[] GetValidators(Type type) { if (this.hashOfValidators.Contains(type)) { return(((List <Validator>) this.hashOfValidators[type]).ToArray()); } List <Validator> list = new List <Validator>(); foreach (Validator validator in ComponentDispenser.CreateComponents(type, typeof(ActivityValidatorAttribute))) { list.Add(validator); } this.hashOfValidators[type] = list; return(list.ToArray()); }
public ActivityCodeGenerator[] GetCodeGenerators(Type type) { if (type == null) throw new ArgumentNullException("type"); if (this.hashOfGenerators.Contains(type)) return ((List<ActivityCodeGenerator>)this.hashOfGenerators[type]).ToArray(); List<ActivityCodeGenerator> generators = new List<ActivityCodeGenerator>(); // Return validators for other types such as Bind, XmolDocument, etc. foreach (ActivityCodeGenerator generator in ComponentDispenser.CreateComponents(type, typeof(ActivityCodeGeneratorAttribute))) { generators.Add(generator); } this.hashOfGenerators[type] = generators; return generators.ToArray(); }
public ActivityCodeGenerator[] GetCodeGenerators(Type type) { if (type == null) { throw new ArgumentNullException("type"); } if (this.hashOfGenerators.Contains(type)) { return(((List <ActivityCodeGenerator>) this.hashOfGenerators[type]).ToArray()); } List <ActivityCodeGenerator> list = new List <ActivityCodeGenerator>(); foreach (ActivityCodeGenerator generator in ComponentDispenser.CreateComponents(type, typeof(ActivityCodeGeneratorAttribute))) { list.Add(generator); } this.hashOfGenerators[type] = list; return(list.ToArray()); }
static WorkflowDesignerLoader() { ComponentDispenser.RegisterComponentExtenders(typeof(CustomActivityDesignerAdapter), new IExtenderProvider[] { new CustomActivityPropertyExtender() }); }