static public string StyleAsEntity(this string item) { return(item .RegexReplace("([^A-Za-z0-9_]+)", "_") .RegexRemove("(^[0-9_]+|[^A-Za-z0-9_]|[_]+$)") .CoalesceBlank(() => ProgrammingEntityName.GenerateEntityName())); }
static public string GenerateDynamicMethodName(string name) { if (name.IsBlank()) { name = ProgrammingEntityName.GenerateFunctionName(); } return("Crunchy.Salt.DynamicMethod[" + name + "]"); }