diff --git a/EveLib.Core/Converters/CamelCaseToPascalCaseExpandoObjectConverter.cs b/EveLib.Core/Converters/CamelCaseToPascalCaseExpandoObjectConverter.cs index 80f7479..1390f7d 100644 --- a/EveLib.Core/Converters/CamelCaseToPascalCaseExpandoObjectConverter.cs +++ b/EveLib.Core/Converters/CamelCaseToPascalCaseExpandoObjectConverter.cs @@ -1,14 +1,35 @@ -using System; +// *********************************************************************** +// Assembly : EveLib.Core +// Author : larsd +// Created : 04-28-2016 +// +// Last Modified By : larsd +// Last Modified On : 04-29-2016 +// *********************************************************************** +// +// Copyright © 2016 +// +// +// *********************************************************************** +using System; using System.Collections.Generic; using System.Dynamic; using System.Globalization; using Newtonsoft.Json; namespace eZet.EveLib.Core.Converters { + /// + /// Class CamelCaseToPascalCaseExpandoObjectConverter. + /// public class CamelCaseToPascalCaseExpandoObjectConverter : JsonConverter { //CHANGED //the ExpandoObjectConverter needs this internal method so we have to copy it //from JsonReader.cs + /// + /// Determines whether [is primitive token] [the specified token]. + /// + /// The token. + /// true if [is primitive token] [the specified token]; otherwise, false. internal static bool IsPrimitiveToken(JsonToken token) { switch (token) { case JsonToken.Integer: @@ -28,7 +49,7 @@ internal static bool IsPrimitiveToken(JsonToken token) { /// /// Writes the JSON representation of the object. /// - /// The to write to. + /// The to write to. /// The value. /// The calling serializer. public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { @@ -38,7 +59,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// /// Reads the JSON representation of the object. /// - /// The to read from. + /// The to read from. /// Type of the object. /// The existing value of object being read. /// The calling serializer. @@ -47,6 +68,15 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist return ReadValue(reader); } + /// + /// Reads the value. + /// + /// The reader. + /// System.Object. + /// + /// Unexpected end. + /// or + /// private object ReadValue(JsonReader reader) { while (reader.TokenType == JsonToken.Comment) { if (!reader.Read()) @@ -70,6 +100,12 @@ private object ReadValue(JsonReader reader) { } } + /// + /// Reads the list. + /// + /// The reader. + /// System.Object. + /// Unexpected end. private object ReadList(JsonReader reader) { IList list = new List(); @@ -90,6 +126,16 @@ private object ReadList(JsonReader reader) { throw new Exception("Unexpected end."); } + /// + /// Reads the object. + /// + /// The reader. + /// System.Object. + /// + /// Unexpected end. + /// or + /// Unexpected end. + /// private object ReadObject(JsonReader reader) { IDictionary expandoObject = new ExpandoObject(); @@ -121,26 +167,30 @@ private object ReadObject(JsonReader reader) { /// Determines whether this instance can convert the specified object type. /// /// Type of the object. - /// - /// true if this instance can convert the specified object type; otherwise, false. - /// + /// true if this instance can convert the specified object type; otherwise, false. public override bool CanConvert(Type objectType) { return objectType == typeof (DynamicObject) || objectType == typeof(ExpandoObject); } /// - /// Gets a value indicating whether this can write JSON. + /// Gets a value indicating whether this can write JSON. /// - /// - /// true if this can write JSON; otherwise, false. - /// + /// true if this can write JSON; otherwise, false. public override bool CanWrite { get { return false; } } } + /// + /// Class StringExtensions. + /// public static class StringExtensions { + /// + /// To the pascal case. + /// + /// The s. + /// System.String. public static string ToPascalCase(this string s) { if (string.IsNullOrEmpty(s) || !char.IsLower(s[0])) return s; diff --git a/EveLib.Core/Serializers/JsonSerializer.cs b/EveLib.Core/Serializers/JsonSerializer.cs index 133a8c0..db0111e 100644 --- a/EveLib.Core/Serializers/JsonSerializer.cs +++ b/EveLib.Core/Serializers/JsonSerializer.cs @@ -4,7 +4,7 @@ // Created : 08-09-2015 // // Last Modified By : larsd -// Last Modified On : 03-03-2016 +// Last Modified On : 04-29-2016 // *********************************************************************** // // Copyright © 2016 @@ -20,26 +20,33 @@ namespace eZet.EveLib.Core.Serializers { /// - /// JSON serializer + /// JSON serializer /// public sealed class JsonSerializer : ISerializer { /// - /// The _trace + /// The _trace /// private readonly TraceSource _trace = new TraceSource("EveLib"); /// - /// The date format + /// The date format /// public string DateFormat = "yyyy-MM-dd HH:mm:ss"; /// - /// The date format2 + /// The date format2 /// public string DateFormat2 = "yyyy.MM.dd HH:mm:ss"; + /// + /// Gets the settings. + /// + /// The settings. private JsonSerializerSettings Settings { get; } + /// + /// Initializes a new instance of the class. + /// public JsonSerializer() { Settings = new JsonSerializerSettings(); Settings.Converters.Add(new IsoDateTimeConverter { DateTimeFormat = DateFormat }); @@ -47,12 +54,16 @@ public JsonSerializer() { Settings.ContractResolver = new CamelCasePropertyNamesContractResolver(); } + /// + /// Initializes a new instance of the class. + /// + /// The date format. public JsonSerializer(string dateFormat) : this() { DateFormat = dateFormat; } /// - /// Deserializes data. + /// Deserializes data. /// /// Type to deserialize to. /// String of data to deserialize. @@ -65,7 +76,7 @@ T ISerializer.Deserialize(string data) { } /// - /// Serializes the specified entity. + /// Serializes the specified entity. /// /// /// The entity. diff --git a/EveLib.EveCrest/EveCrest.cs b/EveLib.EveCrest/EveCrest.cs index d530825..0b8cc28 100644 --- a/EveLib.EveCrest/EveCrest.cs +++ b/EveLib.EveCrest/EveCrest.cs @@ -678,6 +678,11 @@ public Killmail GetKillmail(long id, string hash) { return GetKillmailAsync(id, hash).Result; } + /// + /// Gets the character stats. + /// + /// The identifier. + /// System.Threading.Tasks.Task<eZet.EveLib.EveCrestModule.Models.CharacterStats>. public Task GetCharacterStats(long id) { var uri = "https://characterstats.tech.ccp.is/v1/" + id + "/"; return getAsync(uri); diff --git a/EveLib.EveCrest/Models/CharacterStats.cs b/EveLib.EveCrest/Models/CharacterStats.cs index b2d7265..97f5240 100644 --- a/EveLib.EveCrest/Models/CharacterStats.cs +++ b/EveLib.EveCrest/Models/CharacterStats.cs @@ -6,7 +6,7 @@ namespace eZet.EveLib.EveCrestModule.Models { public sealed class CharacterStats : CrestResource { public CharacterStats() { - ContentType = "test"; + ContentType = "default"; } [DataMember(Name = "characterID")] diff --git a/EveLib.EveCrest/Models/CollectionResource.cs b/EveLib.EveCrest/Models/CollectionResource.cs index e346dfc..5fc6987 100644 --- a/EveLib.EveCrest/Models/CollectionResource.cs +++ b/EveLib.EveCrest/Models/CollectionResource.cs @@ -59,9 +59,13 @@ public abstract class CollectionResource : CrestResource Next { get; set; } + /// + /// Gets the next resource. + /// + /// The next resource. public CollectionResource NextResource { get; private set; } - /// + /// /// Gets or sets the previous page. /// /// The previous. @@ -253,6 +257,10 @@ IEnumerator IEnumerable.GetEnumerator() { } + /// + /// To the list asynchronous. + /// + /// System.Threading.Tasks.Task<System.Collections.Generic.IList<TItem>>. public async Task> ToListAsync() { return (await AllItemsAsync().ConfigureAwait(false)).ToList(); } diff --git a/EveLib.EveCrest/Models/IQueryParameter.cs b/EveLib.EveCrest/Models/IQueryParameter.cs index ae15fb8..ce43301 100644 --- a/EveLib.EveCrest/Models/IQueryParameter.cs +++ b/EveLib.EveCrest/Models/IQueryParameter.cs @@ -1,4 +1,8 @@ namespace eZet.EveLib.EveCrestModule.Models { + /// + /// Interface IQueryParameter + /// + /// public interface IQueryParameter : ICrestResource { } diff --git a/EveLib.EveCrest/Models/Links/ParameterHref.cs b/EveLib.EveCrest/Models/Links/ParameterHref.cs index 2843d33..9ee2cc0 100644 --- a/EveLib.EveCrest/Models/Links/ParameterHref.cs +++ b/EveLib.EveCrest/Models/Links/ParameterHref.cs @@ -1,5 +1,14 @@ namespace eZet.EveLib.EveCrestModule.Models.Links { + /// + /// Class ParameterHref. + /// + /// + /// The type of the t parameter. public class ParameterHref : Href { + /// + /// Initializes a new instance of the class. + /// + /// The href. public ParameterHref(string href) : base(href) { } diff --git a/EveLib.EveCrest/Models/Resources/ItemType.cs b/EveLib.EveCrest/Models/Resources/ItemType.cs index b070bb6..bf0df82 100644 --- a/EveLib.EveCrest/Models/Resources/ItemType.cs +++ b/EveLib.EveCrest/Models/Resources/ItemType.cs @@ -168,6 +168,10 @@ public class DogmaEffect { public bool IsDefault { get; set; } } + /// + /// Gets the name of the parameter. + /// + /// The name of the parameter. public string ParameterName { get; } } } \ No newline at end of file diff --git a/EveLib.EveCrest/QueryParameters.cs b/EveLib.EveCrest/QueryParameters.cs index 42e3af2..2a16293 100644 --- a/EveLib.EveCrest/QueryParameters.cs +++ b/EveLib.EveCrest/QueryParameters.cs @@ -4,15 +4,26 @@ using eZet.EveLib.EveCrestModule.Models.Resources.Market; namespace eZet.EveLib.EveCrestModule { + /// + /// Class QueryParameters. + /// public static class QueryParameters { + /// + /// The map + /// private static Dictionary map = new Dictionary { {typeof (ItemType), "type"}, {typeof(MarketGroup), "group" } }; + /// + /// Gets the name of the parameter. + /// + /// + /// System.String. public static string GetParameterName() { - return map[typeof (T)]; + return map[typeof(T)]; } } } \ No newline at end of file