Пример #1
0
 public void Decamelize()
 {
     Assert.That(Humanizer.Decamelize("FooBar"),
                 Is.EqualTo("foo-bar"));
     Assert.That(Humanizer.Decamelize("fooBar"),
                 Is.EqualTo("foo-bar"));
 }
Пример #2
0
        // -- Static methods ---------------------------------------------------------------------

        public static void PreInitialize( )
        {
            foreach (EName name in System.Enum.GetValues(typeof(EName)))
            {
                var namestring = name.ToString( );
                if ((int)name >= (int)EName.SchemeNames)
                {
                    namestring = Humanizer.Decamelize(namestring);
                }
                var nameindex = (int)name;
                int hashIndex = GetStrigHash(name.ToString( )) & HashTableIndexMask;
                Names.Add(new NameEntry(namestring, NamesHash[hashIndex]));
                NamesHash[hashIndex] = nameindex;
                MemorySizeForNames  += namestring.Length;
            }
            Initialized = true;
        }