Пример #1
0
 public override TaskParameterInfo[] GetTaskParameters()
 {
     TaskParameterInfo[] tpis = new TaskParameterInfo[] {
         new TaskParameterInfo("Url", typeof(string), true, true, true),
         new TaskParameterInfo("RequestXslt", typeof(string), false, true, true),
         new TaskParameterInfo("ResponseXslt", typeof(string), false, true, true),
     };
     return tpis;
 }
Пример #2
0
 public virtual IList<TaskParameterInfo> GetTaskInputParameters()
 {
     List<TaskParameterInfo> lst = new List<TaskParameterInfo>();
     foreach (PropertyInfo pi in GetType().GetProperties())
     {
         object[] attrs = pi.GetCustomAttributes(typeof(TaskParameterAttribute), false);
         if (attrs.Length > 0)
         {
             TaskParameterAttribute tpa = (TaskParameterAttribute) attrs[0];
             if (tpa.IsInput)
             {
                 TaskParameterInfo tpi = new TaskParameterInfo(pi.Name, pi.PropertyType, tpa.Required, tpa.IsInput, tpa.DynamicAllowed);
                 tpi.ParameterType = pi.PropertyType;
                 lst.Add(tpi);
             }
         }
     }
     return lst;
 }