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; }
private static HalForm CreateHalForm(string selfHref, DefaultTemplate defaultTemplate) { var template = new Template(defaultTemplate); var halForm = new HalForm(new Links(selfHref), template); return halForm; }