Skip to content

Commit

Permalink
Last bit of comment tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-lethargic committed Feb 20, 2017
1 parent c67d925 commit 3416c68
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 30 deletions.
14 changes: 7 additions & 7 deletions src/GeoJSON.Net/Converters/CrsConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@
namespace GeoJSON.Net.Converters
{
/// <summary>
/// Converts <see cref="ICRSObject" /> types to and from JSON.
/// Converts <see cref="ICRSObject"/> types to and from JSON.
/// </summary>
public class CrsConverter : JsonConverter
{
/// <summary>
/// Determines whether this instance can convert the specified object type.
/// Determines whether this instance can convert the specified object type.
/// </summary>
/// <param name="objectType">Type of the object.</param>
/// <returns>
/// <c>true</c> if this instance can convert the specified object type; otherwise, <c>false</c>.
/// <c>true</c> if this instance can convert the specified object type; otherwise, <c>false</c>.
/// </returns>
public override bool CanConvert(Type objectType)
{
return typeof(ICRSObject).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
}

/// <summary>
/// Reads the JSON representation of the object.
/// Reads the JSON representation of the object.
/// </summary>
/// <param name="reader">The <see cref="T:Newtonsoft.Json.JsonReader" /> to read from.</param>
/// <param name="objectType">Type of the object.</param>
/// <param name="existingValue">The existing value of object being read.</param>
/// <param name="serializer">The calling serializer.</param>
/// <returns>
/// The object value.
/// The object value.
/// </returns>
/// <exception cref="Newtonsoft.Json.JsonReaderException">
/// CRS must be null or a json object
/// CRS must be null or a json object
/// or
/// CRS must have a "type" property
/// CRS must have a "type" property
/// </exception>
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
Expand Down
3 changes: 0 additions & 3 deletions src/GeoJSON.Net/Converters/GeometryConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// <copyright file="GeometryConverter.cs" company="Joerg Battermann">
// Copyright © Joerg Battermann 2014
// </copyright>
// <summary>
// Defines the GeometryConverter type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System;
Expand Down
5 changes: 1 addition & 4 deletions src/GeoJSON.Net/Converters/LineStringConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// <copyright file="PolygonConverter.cs" company="Joerg Battermann">
// Copyright © Joerg Battermann 2014
// </copyright>
// <summary>
// Defines the LineString type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System;
Expand All @@ -16,7 +13,7 @@
namespace GeoJSON.Net.Converters
{
/// <summary>
/// Converter to read and write the <see cref="LineString" /> type.
/// Converter to read and write the <see cref="LineString" /> type.
/// </summary>
public class LineStringConverter : JsonConverter
{
Expand Down
5 changes: 4 additions & 1 deletion src/GeoJSON.Net/Converters/MultiPointConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
namespace GeoJSON.Net.Converters
{
/// <summary>
///
/// Converter to read and write the <see cref="MultiPoint" /> type.
/// </summary>
public class MultiPointConverter : JsonConverter
{
/// <inheritdoc />
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
var points = (List<Point>)value;
Expand All @@ -31,6 +32,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
}
}

/// <inheritdoc />
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
var coordinates = serializer.Deserialize<double[][]>(reader);
Expand Down Expand Up @@ -59,6 +61,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
}
}

/// <inheritdoc />
public override bool CanConvert(Type objectType)
{
return objectType == typeof(MultiPoint);
Expand Down
7 changes: 1 addition & 6 deletions src/GeoJSON.Net/Converters/PointConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@
// <copyright file="PositionConverter.cs" company="Joerg Battermann">
// Copyright © Joerg Battermann 2014
// </copyright>
// <summary>
// Defines the PolygonConverter type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System;
using System.Reflection;
using GeoJSON.Net.Exceptions;
using GeoJSON.Net.Geometry;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace GeoJSON.Net.Converters
{
Expand Down Expand Up @@ -45,7 +40,7 @@ public override bool CanConvert(Type objectType)
/// </returns>
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
double[] coordinates = null;
double[] coordinates;

try
{
Expand Down
15 changes: 6 additions & 9 deletions src/GeoJSON.Net/Converters/PolygonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// <copyright file="PolygonConverter.cs" company="Joerg Battermann">
// Copyright © Joerg Battermann 2014
// </copyright>
// <summary>
// Defines the PolygonConverter type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System;
Expand All @@ -15,33 +12,33 @@
namespace GeoJSON.Net.Converters
{
/// <summary>
/// Converter to read and write the <see cref="Polygon" /> type.
/// Converter to read and write the <see cref="Polygon" /> type.
/// </summary>
public class PolygonConverter : JsonConverter
{
private static readonly LineStringConverter LineStringConverter = new LineStringConverter();

/// <summary>
/// Determines whether this instance can convert the specified object type.
/// Determines whether this instance can convert the specified object type.
/// </summary>
/// <param name="objectType">Type of the object.</param>
/// <returns>
/// <c>true</c> if this instance can convert the specified object type; otherwise, <c>false</c>.
/// <c>true</c> if this instance can convert the specified object type; otherwise, <c>false</c>.
/// </returns>
public override bool CanConvert(Type objectType)
{
return objectType == typeof(Polygon);
}

/// <summary>
/// Reads the JSON representation of the object.
/// Reads the JSON representation of the object.
/// </summary>
/// <param name="reader">The <see cref="T:Newtonsoft.Json.JsonReader" /> to read from.</param>
/// <param name="objectType">Type of the object.</param>
/// <param name="existingValue">The existing value of object being read.</param>
/// <param name="serializer">The calling serializer.</param>
/// <returns>
/// The object value.
/// The object value.
/// </returns>
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
Expand All @@ -58,7 +55,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
}

/// <summary>
/// Writes the JSON representation of the object.
/// Writes the JSON representation of the object.
/// </summary>
/// <param name="writer">The <see cref="T:Newtonsoft.Json.JsonWriter" /> to write to.</param>
/// <param name="value">The value.</param>
Expand Down

0 comments on commit 3416c68

Please sign in to comment.