using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Framework.Cli")] // Internal functions used by Framework.Cli assembly.
namespace Framework
{
using Database.dbo;
using Framework.App;
using Framework.Doc;
using Framework.Json;
using Framework.Server;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using System.Web;
public static class UtilFramework
{
///
/// Gets Version. This is the framework version.
///
public static string Version
{
get
{
// dotnet --version
// 5.0.100
// node --version
// v12.18.1
// npm --version
// 6.14.4
// npm run ng -- --version (Application.Website/)
// Angular CLI: 11.0.1
// Semantic versioning. v3.(Changes that break backward compatibility).(Backward compatible new features)(Backward compatible bug fixes) See also: https://docs.npmjs.com/about-semantic-versioning
return "v3.51.100";
}
}
///
/// Gets time and pc name of Ci build. Value is set during build process.
///
internal static string VersionBuild
{
get
{
// See also: method UtilCli.VersionBuild();
// Version tag with commit sha, build pc and time stamp.
return "Build (local)"; /* VersionBuild */
}
}
///
/// Convert markdown text to html.
///
public static string TextMdToHtml(string textMd, CssFrameworkEnum cssFrameworkEnum = CssFrameworkEnum.Bootstrap)
{
var appDoc = new AppDoc();
new MdPage(appDoc.MdDoc, textMd);
appDoc.Parse();
var textHtml = appDoc.HtmlDoc.Render();
if (cssFrameworkEnum == CssFrameworkEnum.Bulma)
{
// See also: https://bulma.io/documentation/elements/image/#arbitrary-ratios-with-any-element
textHtml = textHtml?.Replace("