@@ -7,9 +7,7 @@ format that stores data indexed by IP address subnets (IPv4 or IPv6).
7
7
8
8
## Requirements ##
9
9
10
- This library works with .NET Framework version 4.0 and above.
11
-
12
- This library also uses [ Json.NET] ( http://json.codeplex.com/ ) .
10
+ This library works with .NET Framework version 4.5 and above.
13
11
14
12
## Installation ##
15
13
@@ -36,9 +34,11 @@ comparable to loading the file into real memory with the `Memory` mode while
36
34
using significantly less memory.
37
35
38
36
To look up an IP address, pass a ` string ` representing the IP address to the
39
- ` Find ` method on ` Reader ` . This method will return the result as a
40
- ` Newtonsoft.Json.Linq.JToken ` . ` JToken ` objects are used as they provide a
41
- convenient representation of multi-type data structures.
37
+ ` Find<T> ` method on ` Reader ` . This method will return the result as type ` T ` .
38
+ ` T ` may either be a generic collection or a class using the
39
+ ` [MaxMind.Db.Constructor] ` attribute to declare which constructor to use
40
+ during deserialization and the ` [MaxMind.Db.Parameter("name")] ` to map the
41
+ database key ` name ` to a particular constructor parameter.
42
42
43
43
We recommend reusing the ` Reader ` object rather than creating a new one for
44
44
each lookup. The creation of this object is relatively expensive as it must
@@ -50,9 +50,8 @@ read in metadata for the file.
50
50
51
51
using (var reader = new Reader (" GeoIP2-City.mmdb" ))
52
52
{
53
- var response = reader .Find (" 24.24.24.24" );
54
-
55
- Console .WriteLine (response .ToString ());
53
+ var data = reader .Find <Dictionary <string , object >>(" 24.24.24.24" );
54
+ .. .
56
55
}
57
56
```
58
57
@@ -89,6 +88,6 @@ The MaxMind DB Reader API uses [Semantic Versioning](http://semver.org/).
89
88
90
89
## Copyright and License ##
91
90
92
- This software is Copyright (c) 2015 by MaxMind, Inc.
91
+ This software is Copyright (c) 2016 by MaxMind, Inc.
93
92
94
93
This is free software, licensed under the Apache License, Version 2.0.
0 commit comments