コード例 #1
0
 public static object Field(this CoreWorkItem workItem, CoreField fieldRef, Func <object, Field, object> checker)
 {
     if (!workItem.WorkItem.Fields.Contains((int)fieldRef))
     {
         return(null);
     }
     return((checker == null) ? workItem.WorkItem.Fields[fieldRef].Value : checker(workItem.WorkItem.Fields[fieldRef].Value, workItem.WorkItem.Fields[fieldRef]));
 }
コード例 #2
0
 public static object Field(this CoreWorkItem workItem, string fieldName, Func <object, Field, object> checker)
 {
     if (!workItem.WorkItem.Fields.Contains(fieldName))
     {
         return(null);
     }
     return((checker == null) ? workItem.WorkItem.Fields[fieldName].Value : checker(workItem.WorkItem.Fields[fieldName].Value, workItem.WorkItem.Fields[fieldName]));
 }
コード例 #3
0
 public static object Field(this CoreWorkItem workItem, CoreField fieldRef)
 {
     if (!workItem.WorkItem.Fields.Contains((int)fieldRef))
     {
         return(null);
     }
     return(workItem.WorkItem.Fields[fieldRef].Value);
 }
コード例 #4
0
 // WorkItem class
 public static object Field(this CoreWorkItem workItem, string fieldName)
 {
     if (!workItem.WorkItem.Fields.Contains(fieldName))
     {
         return(null);
     }
     return(workItem.WorkItem.Fields[fieldName].Value);
 }
コード例 #5
0
 public static string FieldAsString(this CoreWorkItem workItem, CoreField fieldRef, Func <object, Field, object> checker)
 {
     return((workItem.Field(fieldRef, checker) ?? string.Empty).ToString());
 }
コード例 #6
0
 public static string FieldAsString(this CoreWorkItem workItem, CoreField fieldRef)
 {
     return((workItem.Field(fieldRef) ?? string.Empty).ToString());
 }
コード例 #7
0
 public static string FieldAsString(this CoreWorkItem workItem, string fieldName)
 {
     return((workItem.Field(fieldName) ?? string.Empty).ToString());
 }
コード例 #8
0
        public static T Field <T>(this CoreWorkItem workItem, CoreField fieldRef)        // where T : class
        {
            object value = Field(workItem, fieldRef);

            return(WorkItemExtender.ValueAs <T>(value));
        }
コード例 #9
0
        public static T Field <T>(this CoreWorkItem workItem, string fieldName)        // where T : class
        {
            object value = Field(workItem, fieldName);

            return(WorkItemExtender.ValueAs <T>(value));
        }