Пример #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;
        }
Пример #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;
 }