Exemple #1
0
 private void AddControlResponse(PageExample example, String eventParameter, KeyValuePair<string, Dictionary<string, string>> updateControl)
 {
     var controlResponse = new ControlResponse();
     controlResponse.ControlId = updateControl.Key;
     var resultValue = new List<PropertyResponse>();
     var updatePropertyList = updateControl.Value;
     AddPropertyResponse(example, eventParameter,
         updateControl, resultValue, updatePropertyList);
     controlResponse.AddPropertyResponses(resultValue);
     example.Response.AddControlResponse(controlResponse);
 }
Exemple #2
0
 public void AddControlResponse(ControlResponse response)
 {
     DoWriteOperateion(delegate()
     {
         var control = m_ControlResponses.FirstOrDefault(c => c.ControlId == response.ControlId);
         if (control != null)
         {
             foreach (var item in response.PropertyResponses)
             {
                 var old = control.PropertyResponses.FirstOrDefault(p => p.Name == item.Name);
                 if (old != null)
                 {
                     control.DeletePropertyResponse(old);
                 }
                 control.AddPropertyResponse(item);
             }
         }
         else
         {
             m_ControlResponses.Add(response);
         }
     });
 }
 public object Clone()
 {
     var result = new ControlResponse();
     result.ControlId = ControlId;
     DoReadOperation(delegate()
     {
         result.AddPropertyResponses(m_PropertyResponse);
     });
     return result;
 }
 public static ControlResponse TransformToPropertyEvaluataion(ControlEvaluataion control)
 {
     var result = new ControlResponse();
     result.ControlId = control.ControlId;
     return result;
 }