Ejemplo n.º 1
0
 public HEventElement(HName name, params object[] content) :
   base(name, content)
 {
   foreach (object node in content)
   {
     if (node is hevent)
     {
       handler = (hevent)node;
       break;
     }
   }
 }
Ejemplo n.º 2
0
    public static bool IsEventElement(JsonData json, hevent handler, bool isStrongBinding)
    {
      foreach (HAttribute id in handler)
      {
        object jsonId = json.JPath(id.Name.LocalName.Split(new char[] { '-' }, StringSplitOptions.RemoveEmptyEntries));

        //Logger.AddMessage("IsEventElement: {0}, {1}", id, jsonId);
        if (jsonId == null)
          return false;

        if (isStrongBinding)
        {
          if (StringHlp.ToString(id.Value) != StringHlp.ToString(jsonId))
            return false;
        }
      }
      return true;
    }