/// <summary> /// Gets a code template. /// </summary> /// <param name="generationType">The type of the class containing the generation logic.</param> /// <param name="hierarchyKind">The hierarchy kind.</param> /// <param name="codeTemplateKind">The code template kind.</param> /// <param name="keyMethodKinds">The key method kinds.</param> /// <param name="codeSnippetKind">Optional code snippet kind. Default is None (not treated as a code snippet).</param> /// <param name="throwIfDoesNotExist">Throw if the code template does not exist.</param> /// <returns> /// The code template corresponding to the specified parameters. /// </returns> public static string GetCodeTemplate( this Type generationType, HierarchyKind hierarchyKind, CodeTemplateKind codeTemplateKind, KeyMethodKinds keyMethodKinds, CodeSnippetKind codeSnippetKind = CodeSnippetKind.None, bool throwIfDoesNotExist = true) { var result = generationType.GetCodeTemplate(hierarchyKind.ToString(), codeTemplateKind, keyMethodKinds, codeSnippetKind, throwIfDoesNotExist); return(result); }