Beispiel #1
0
        public static bool TryFindHalForm(string formName, out HalForm halForm)
        {
            halForm = null;

             Func<HalForm> halFormFunc;
             bool found = Forms.TryGetValue(formName, out halFormFunc);
             if (found)
             {
            halForm = halFormFunc.Invoke();
             }

             return found;
        }
Beispiel #2
0
 private static HalForm CreateHalForm(string selfHref, DefaultTemplate defaultTemplate)
 {
     var template = new Template(defaultTemplate);
      var halForm = new HalForm(new Links(selfHref), template);
      return halForm;
 }