Ejemplo n.º 1
0
        public static void Move(string sourcePath, string targetPath)
        {
            string intermediatePath = GetFreshName(sourcePath, Enumerables.Create(sourcePath, targetPath));

            MoveRaw(sourcePath, intermediatePath);
            MoveRaw(intermediatePath, targetPath);
        }
Ejemplo n.º 2
0
        public static T Clamp <T>(this T value, T minimum, T maximum) where T : IComparable <T>
        {
            value = Enumerables.Create(value, minimum).Maximum();
            value = Enumerables.Create(value, maximum).Minimum();

            return(value);
        }
Ejemplo n.º 3
0
        public static bool IsSubSuperScriptCompatible(this string text)
        {
            IEnumerable <char> allowedCharacters = Enumerables.Create(' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '-', '=', '(', ')');

            return(!text.Except(allowedCharacters).Any());
        }