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

            return("Crunchy.Salt.DynamicMethod[" + name + "]");
        }