Esempio n. 1
0
        public void Basic()
        {
            var table = new JsonNameTable();
            var count = 10000;

            foreach ( var propertyName in Enumerable.Range( 1, count )
                                                    .Select( x => "Property" + x ) )
            {
                table.Add( GetBytes( propertyName ), propertyName );
            }

            foreach ( var propertyName in Enumerable.Range( 1, count )
                                                    .Select( x => "Property" + x ) )
            {
                Assert.Equal( propertyName, table.Find( GetBytes( propertyName ) ) );
            }
        }
Esempio n. 2
0
 internal JsonPropertyCollection(JsonNamingStrategy namingStrategy)
 {
     NameTable = new JsonNameTable <TOwner>(namingStrategy);
 }