Skip to content

Commit 487c66e

Browse files
committed
syntax highlighting with fencing blocks
1 parent 096a788 commit 487c66e

File tree

6 files changed

+19
-15
lines changed

6 files changed

+19
-15
lines changed

docs/models/geo/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A custom implementation of `IDictionary<T,GeoPoint>`. It uses three SortedSet st
2323

2424
The [graph modeling example](../graph/) uses a GeoSpatialIndex.
2525

26-
{% highlight csharp %}
26+
```csharp
2727
var cheops = new GeoPoint(29.9792345,31.1342019);
2828
var eiffel = new GeoPoint(48.8583701,2.2944813);
2929
ArcDistance d = cheops.DistanceTo(eiffel);
@@ -43,4 +43,4 @@ foreach(var pair in geoIndex.WithinRadius(eiffel, 5))
4343
ArcDistance d = pair.Value;
4444
Console.WriteLine("Distance to {0} is {1}", item, d.ToKilometers());
4545
}
46-
{% endhighlight %}
46+
```

docs/models/graph/index.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GraphModel is a minimal built-in generic graph model similar to Neo4j. The model
1515
### Example
1616
The example demonstrates a twitter graph. Tweets and users are nodes, actions (tweeted, retweeted, followed, favorited) are edges. Querying uses LINQ on the sets of nodes and edges.
1717

18-
{% highlight csharp %}
18+
```csharp
1919
[TestFixture]
2020
public class GraphModelTests
2121
{
@@ -64,16 +64,15 @@ public class GraphModelTests
6464
Assert.AreEqual(node.Id, _user1);
6565
}
6666
}
67-
68-
{% endhighlight %}
67+
```
6968

7069
## Quickgraph
7170
QuickGraph is an open source graph library packed with features. There are multiple graph representations and plenty of algorithms. Visit [QuickGraph on Codeplex](http://http://quickgraph.codeplex.com/) for details.
7271

7372
### Example code
7473
A complete example demonstrating both [GeoSpatial modeling](../geo/) and Quickgraph. [Download VS2013 project](ShortestPath.zip)
7574

76-
{% highlight csharp %}
75+
```csharp
7776
using System;
7877
using System.Collections.Generic;
7978
using System.Linq;
@@ -379,4 +378,4 @@ class Program
379378
flightModel.Connect("LAX", "SEA", 107);
380379
}
381380
}
382-
{% endhighlight %}
381+
```

docs/models/key-value/index.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Each time a specific key is set the version is incremented, starting with 1. Pas
1515
`Get` will throw unless the key exists. The `Node` return type has two fields, `Version` and `Item`. The item is the stored value.
1616

1717
## Example
18-
{% highlight csharp %}
18+
19+
```csharp
1920
var store = Db.For<KeyValueStore>();
2021
store.Set("mykey", "myvalue", 0); //expect key doesn't exist
2122
var node = store.Get("mykey");
@@ -29,12 +30,12 @@ store.Set("mykey", "succeed", 2);
2930
store.Remove("mykey", 2); //FAIL wrong version
3031
store.Remove("mykey");
3132
store.Remove("mykey"); //FAIL, doesn't exist
32-
33+
```
3334
## KeyValueStoreClient
3435
This class wraps a `KeyValueStore` and serializes/deserializes objects to byte array eliminating the need to deploy assemblies with custom types on the remote server.
3536

3637
### Example
37-
{% highlight csharp %}
38+
```csharp
3839
var store = Db.For<KeyValueStore>("mode=remote");
3940
var client = new KeyValueStoreClient(store, new BinaryFormatter());
4041

@@ -48,4 +49,4 @@ player.AddScore(42);
4849

4950
//write back using optimistic concurrency
5051
client.Set(player.Id, player, node.Version);
51-
{% endhighlight %}
52+
```

docs/models/messaging/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ A bus offers pub/sub messaging. A client can Subscribe to a Bus by passing the n
1717
Subscriptions are persistent until `Unsubscribe` is called or the Bus to which it is attached is removed.
1818

1919
## Example code
20-
{% highlight csharp %}
20+
21+
```csharp
2122
var broker = Db.For<MessageBroker>();
2223
broker.CreateQueue("myqueue");
2324
broker.Enqueue("myqueue", new TextMessage("I hate wabbits"));
@@ -43,4 +44,4 @@ Message[] messages = broker.Poll(id, "mybus");
4344
broker.Unsubscribe(id, "mybus");
4445
broker.DeleteQueue("myqueue");
4546
broker.DeleteBus("mybus");
46-
{% endhighlight %}
47+
```

docs/models/other/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Immutable type representing a range of ordered values using upper and lower boun
1717
* `Union(Range<T> other)` - combine overlapping ranges, throw if no overlap
1818

1919
### Example
20+
21+
```csharp
2022
var reservations = new List<Range<DateTime>>();
2123
reservations.Add(new Range(DateTime.Now, DateTime.Now.AddHours(1)));
2224
var conflicts = reservations.Where(r => r.Overlaps(candidate));
25+
```

docs/models/redis/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ OrigoDB is very similar to Redis. Both are in-memory databases that use logging
2727

2828
## Example code
2929

30-
{% highlight csharp %}
30+
```csharp
3131
var redis = Db.For<RedisModel>();
3232
redis.Set("key", "42");
3333
redis.Increment("key");
3434
redis.IncrementBy("key", 4);
3535
string number = redis.Get("key");
36-
{% endhighlight %}
36+
```
3737

3838
### Keys
3939

0 commit comments

Comments
 (0)