Esempio n. 1
0
 internal bool Valid(Segments.SegmentBase segmentBase)
 {
     if(this.SegmentId!=segmentBase.SegmentID)
         return false;
     System.Reflection.PropertyInfo ret=null;
     if(this.Value==null)
         ret = segmentBase.GetType().GetProperties().Where(a => a.Name == this.Field && a.GetValue(segmentBase)==null).FirstOrDefault();
     else
         ret= segmentBase.GetType().GetProperties().Where(a => a.Name == this.Field && this.Value.Equals(a.GetValue(segmentBase))).FirstOrDefault();
     if (ret == null)
         return false;
     return true;        
     
 }