Fix typos, punctuation, etc. in XML doc comments

* Simple stuff: typos and missing punctuation and line breaks.

 * Sometimes, two method overloads have quite different documentation.
   Rephrase these to make them more similar.

 * Minor rephrasings like in a previous commit (e.g. "...how output
   should be formatted", "initializes a new instance of...").

 * Obvious incorrect type references in comments. These appear mostly
   in `Utilities/LinqBridge.cs` (nullable vs non-nullable).

 * Remove factually incorrect statement about exceptions thrown.

 * Remove comments for explicitly implemented interface methods.
This commit is contained in:
stakx
2016-12-18 01:01:46 +01:00
parent 5456067b11
commit 2e6d2ecd4c
24 changed files with 138 additions and 217 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ using Newtonsoft.Json.Linq;
namespace Newtonsoft.Json.Bson
{
/// <summary>
/// Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
/// Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
/// </summary>
public class BsonReader : JsonReader
{
+1 -1
View File
@@ -38,7 +38,7 @@ using System.Globalization;
namespace Newtonsoft.Json.Bson
{
/// <summary>
/// Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
/// Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data.
/// </summary>
public class BsonWriter : JsonWriter
{
+18 -18
View File
@@ -534,7 +534,7 @@ namespace Newtonsoft.Json
/// Serializes the specified object to a JSON string using formatting.
/// </summary>
/// <param name="value">The object to serialize.</param>
/// <param name="formatting">Indicates how the output is formatted.</param>
/// <param name="formatting">Indicates how the output should be formatted.</param>
/// <returns>
/// A JSON string representation of the object.
/// </returns>
@@ -547,7 +547,7 @@ namespace Newtonsoft.Json
/// Serializes the specified object to a JSON string using a collection of <see cref="JsonConverter"/>.
/// </summary>
/// <param name="value">The object to serialize.</param>
/// <param name="converters">A collection converters used while serializing.</param>
/// <param name="converters">A collection of converters used while serializing.</param>
/// <returns>A JSON string representation of the object.</returns>
public static string SerializeObject(object value, params JsonConverter[] converters)
{
@@ -562,8 +562,8 @@ namespace Newtonsoft.Json
/// Serializes the specified object to a JSON string using formatting and a collection of <see cref="JsonConverter"/>.
/// </summary>
/// <param name="value">The object to serialize.</param>
/// <param name="formatting">Indicates how the output is formatted.</param>
/// <param name="converters">A collection converters used while serializing.</param>
/// <param name="formatting">Indicates how the output should be formatted.</param>
/// <param name="converters">A collection of converters used while serializing.</param>
/// <returns>A JSON string representation of the object.</returns>
public static string SerializeObject(object value, Formatting formatting, params JsonConverter[] converters)
{
@@ -613,7 +613,7 @@ namespace Newtonsoft.Json
/// Serializes the specified object to a JSON string using formatting and <see cref="JsonSerializerSettings"/>.
/// </summary>
/// <param name="value">The object to serialize.</param>
/// <param name="formatting">Indicates how the output is formatted.</param>
/// <param name="formatting">Indicates how the output should be formatted.</param>
/// <param name="settings">The <see cref="JsonSerializerSettings"/> used to serialize the object.
/// If this is null, default serialization settings will be used.</param>
/// <returns>
@@ -628,7 +628,7 @@ namespace Newtonsoft.Json
/// Serializes the specified object to a JSON string using a type, formatting and <see cref="JsonSerializerSettings"/>.
/// </summary>
/// <param name="value">The object to serialize.</param>
/// <param name="formatting">Indicates how the output is formatted.</param>
/// <param name="formatting">Indicates how the output should be formatted.</param>
/// <param name="settings">The <see cref="JsonSerializerSettings"/> used to serialize the object.
/// If this is null, default serialization settings will be used.</param>
/// <param name="type">
@@ -668,7 +668,7 @@ namespace Newtonsoft.Json
/// </summary>
/// <param name="value">The object to serialize.</param>
/// <returns>
/// A task that represents the asynchronous serialize operation. The value of the <c>TResult</c> parameter contains a JSON string representation of the object.
/// A task that represents the asynchronous serialization operation. The value of the <c>TResult</c> parameter contains a JSON string representation of the object.
/// </returns>
[ObsoleteAttribute("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.SerializeObject(value))")]
public static Task<string> SerializeObjectAsync(object value)
@@ -681,9 +681,9 @@ namespace Newtonsoft.Json
/// Serialization will happen on a new thread.
/// </summary>
/// <param name="value">The object to serialize.</param>
/// <param name="formatting">Indicates how the output is formatted.</param>
/// <param name="formatting">Indicates how the output should be formatted.</param>
/// <returns>
/// A task that represents the asynchronous serialize operation. The value of the <c>TResult</c> parameter contains a JSON string representation of the object.
/// A task that represents the asynchronous serialization operation. The value of the <c>TResult</c> parameter contains a JSON string representation of the object.
/// </returns>
[ObsoleteAttribute("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.SerializeObject(value, formatting))")]
public static Task<string> SerializeObjectAsync(object value, Formatting formatting)
@@ -696,11 +696,11 @@ namespace Newtonsoft.Json
/// Serialization will happen on a new thread.
/// </summary>
/// <param name="value">The object to serialize.</param>
/// <param name="formatting">Indicates how the output is formatted.</param>
/// <param name="formatting">Indicates how the output should be formatted.</param>
/// <param name="settings">The <see cref="JsonSerializerSettings"/> used to serialize the object.
/// If this is null, default serialization settings will be used.</param>
/// <returns>
/// A task that represents the asynchronous serialize operation. The value of the <c>TResult</c> parameter contains a JSON string representation of the object.
/// A task that represents the asynchronous serialization operation. The value of the <c>TResult</c> parameter contains a JSON string representation of the object.
/// </returns>
[ObsoleteAttribute("SerializeObjectAsync is obsolete. Use the Task.Factory.StartNew method to serialize JSON asynchronously: Task.Factory.StartNew(() => JsonConvert.SerializeObject(value, formatting, settings))")]
public static Task<string> SerializeObjectAsync(object value, Formatting formatting, JsonSerializerSettings settings)
@@ -980,7 +980,7 @@ namespace Newtonsoft.Json
/// If this is null, default serialization settings will be used.
/// </param>
/// <returns>
/// A task that represents the asynchronous populate operation.
/// A task that represents the asynchronous population operation.
/// </returns>
[ObsoleteAttribute("PopulateObjectAsync is obsolete. Use the Task.Factory.StartNew method to populate an object with JSON values asynchronously: Task.Factory.StartNew(() => JsonConvert.PopulateObject(value, target, settings))")]
public static Task PopulateObjectAsync(string value, object target, JsonSerializerSettings settings)
@@ -1033,7 +1033,7 @@ namespace Newtonsoft.Json
/// Deserializes the <see cref="XmlNode"/> from a JSON string.
/// </summary>
/// <param name="value">The JSON string.</param>
/// <returns>The deserialized XmlNode</returns>
/// <returns>The deserialized XmlNode.</returns>
public static XmlDocument DeserializeXmlNode(string value)
{
return DeserializeXmlNode(value, null);
@@ -1044,7 +1044,7 @@ namespace Newtonsoft.Json
/// </summary>
/// <param name="value">The JSON string.</param>
/// <param name="deserializeRootElementName">The name of the root element to append when deserializing.</param>
/// <returns>The deserialized XmlNode</returns>
/// <returns>The deserialized XmlNode.</returns>
public static XmlDocument DeserializeXmlNode(string value, string deserializeRootElementName)
{
return DeserializeXmlNode(value, deserializeRootElementName, false);
@@ -1060,7 +1060,7 @@ namespace Newtonsoft.Json
/// A flag to indicate whether to write the Json.NET array attribute.
/// This attribute helps preserve arrays when converting the written XML back to JSON.
/// </param>
/// <returns>The deserialized XmlNode</returns>
/// <returns>The deserialized XmlNode.</returns>
public static XmlDocument DeserializeXmlNode(string value, string deserializeRootElementName, bool writeArrayAttribute)
{
XmlNodeConverter converter = new XmlNodeConverter();
@@ -1111,7 +1111,7 @@ namespace Newtonsoft.Json
/// Deserializes the <see cref="XNode"/> from a JSON string.
/// </summary>
/// <param name="value">The JSON string.</param>
/// <returns>The deserialized XNode</returns>
/// <returns>The deserialized XNode.</returns>
public static XDocument DeserializeXNode(string value)
{
return DeserializeXNode(value, null);
@@ -1122,7 +1122,7 @@ namespace Newtonsoft.Json
/// </summary>
/// <param name="value">The JSON string.</param>
/// <param name="deserializeRootElementName">The name of the root element to append when deserializing.</param>
/// <returns>The deserialized XNode</returns>
/// <returns>The deserialized XNode.</returns>
public static XDocument DeserializeXNode(string value, string deserializeRootElementName)
{
return DeserializeXNode(value, deserializeRootElementName, false);
@@ -1138,7 +1138,7 @@ namespace Newtonsoft.Json
/// A flag to indicate whether to write the Json.NET array attribute.
/// This attribute helps preserve arrays when converting the written XML back to JSON.
/// </param>
/// <returns>The deserialized XNode</returns>
/// <returns>The deserialized XNode.</returns>
public static XDocument DeserializeXNode(string value, string deserializeRootElementName, bool writeArrayAttribute)
{
XmlNodeConverter converter = new XmlNodeConverter();
+2 -2
View File
@@ -74,8 +74,8 @@ namespace Newtonsoft.Json
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0). </exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null.</exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0).</exception>
public JsonException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
+2 -2
View File
@@ -606,9 +606,9 @@ namespace Newtonsoft.Json
}
/// <summary>
/// Reads the next JSON token from the stream as a <see cref="Nullable{Decimal}"/>.
/// Reads the next JSON token from the stream as a <see cref="Nullable{Double}"/>.
/// </summary>
/// <returns>A <see cref="Nullable{Decimal}"/>. This method will return <c>null</c> at the end of an array.</returns>
/// <returns>A <see cref="Nullable{Double}"/>. This method will return <c>null</c> at the end of an array.</returns>
public virtual double? ReadAsDouble()
{
JsonToken t = GetContentToken();
+2 -2
View File
@@ -90,8 +90,8 @@ namespace Newtonsoft.Json
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0). </exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null.</exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0).</exception>
public JsonReaderException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
@@ -72,8 +72,8 @@ namespace Newtonsoft.Json
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0). </exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null.</exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0).</exception>
public JsonSerializationException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
@@ -88,7 +88,7 @@ namespace Newtonsoft.Json
internal MetadataPropertyHandling? _metadataPropertyHandling;
/// <summary>
/// Gets or sets how reference loops (e.g. a class referencing itself) is handled.
/// Gets or sets how reference loops (e.g. a class referencing itself) are handled.
/// </summary>
/// <value>Reference loop handling.</value>
public ReferenceLoopHandling ReferenceLoopHandling
+1 -1
View File
@@ -75,7 +75,7 @@ namespace Newtonsoft.Json
/// <summary>
/// Initializes a new instance of the <see cref="JsonTextReader"/> class with the specified <see cref="TextReader"/>.
/// </summary>
/// <param name="reader">The <c>TextReader</c> containing the XML data to read.</param>
/// <param name="reader">The <c>TextReader</c> containing the JSON data to read.</param>
public JsonTextReader(TextReader reader)
{
if (reader == null)
+1 -1
View File
@@ -143,7 +143,7 @@ namespace Newtonsoft.Json
}
/// <summary>
/// Creates an instance of the <c>JsonTextWriter</c> class using the specified <see cref="TextWriter"/>.
/// Initializes a new instance of the <c>JsonTextWriter</c> class using the specified <see cref="TextWriter"/>.
/// </summary>
/// <param name="textWriter">The <c>TextWriter</c> to write to.</param>
public JsonTextWriter(TextWriter textWriter)
+2 -2
View File
@@ -78,8 +78,8 @@ namespace Newtonsoft.Json
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0). </exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null.</exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0).</exception>
public JsonWriterException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
+2 -2
View File
@@ -189,7 +189,7 @@ namespace Newtonsoft.Json.Linq
/// Creates a <see cref="JArray"/> from an object.
/// </summary>
/// <param name="o">The object that will be used to create <see cref="JArray"/>.</param>
/// <returns>A <see cref="JArray"/> with the values of the specified object</returns>
/// <returns>A <see cref="JArray"/> with the values of the specified object.</returns>
public new static JArray FromObject(object o)
{
return FromObject(o, JsonSerializer.CreateDefault());
@@ -200,7 +200,7 @@ namespace Newtonsoft.Json.Linq
/// </summary>
/// <param name="o">The object that will be used to create <see cref="JArray"/>.</param>
/// <param name="jsonSerializer">The <see cref="JsonSerializer"/> that will be used to read the object.</param>
/// <returns>A <see cref="JArray"/> with the values of the specified object</returns>
/// <returns>A <see cref="JArray"/> with the values of the specified object.</returns>
public new static JArray FromObject(object o, JsonSerializer jsonSerializer)
{
JToken token = FromObjectInternal(o, jsonSerializer);
+3 -3
View File
@@ -685,16 +685,16 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Creates an <see cref="JsonWriter"/> that can be used to add tokens to the <see cref="JToken"/>.
/// Creates a <see cref="JsonWriter"/> that can be used to add tokens to the <see cref="JToken"/>.
/// </summary>
/// <returns>An <see cref="JsonWriter"/> that is ready to have content written to it.</returns>
/// <returns>A <see cref="JsonWriter"/> that is ready to have content written to it.</returns>
public JsonWriter CreateWriter()
{
return new JTokenWriter(this);
}
/// <summary>
/// Replaces the children nodes of this token with the specified content.
/// Replaces the child nodes of this token with the specified content.
/// </summary>
/// <param name="content">The content.</param>
public void ReplaceAll(object content)
+8 -84
View File
@@ -270,9 +270,9 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Gets an <see cref="JEnumerable{JToken}"/> of this object's property values.
/// Gets a <see cref="JEnumerable{JToken}"/> of this object's property values.
/// </summary>
/// <returns>An <see cref="JEnumerable{JToken}"/> of this object's property values.</returns>
/// <returns>A <see cref="JEnumerable{JToken}"/> of this object's property values.</returns>
public JEnumerable<JToken> PropertyValues()
{
return new JEnumerable<JToken>(Properties().Select(p => p.Value));
@@ -343,7 +343,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Loads an <see cref="JObject"/> from a <see cref="JsonReader"/>.
/// Loads a <see cref="JObject"/> from a <see cref="JsonReader"/>.
/// </summary>
/// <param name="reader">A <see cref="JsonReader"/> that will be read for the content of the <see cref="JObject"/>.</param>
/// <returns>A <see cref="JObject"/> that contains the JSON that was read from the specified <see cref="JsonReader"/>.</returns>
@@ -356,7 +356,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Loads an <see cref="JObject"/> from a <see cref="JsonReader"/>.
/// Loads a <see cref="JObject"/> from a <see cref="JsonReader"/>.
/// </summary>
/// <param name="reader">A <see cref="JsonReader"/> that will be read for the content of the <see cref="JObject"/>.</param>
/// <param name="settings">The <see cref="JsonLoadSettings"/> used to load the JSON.
@@ -440,7 +440,7 @@ namespace Newtonsoft.Json.Linq
/// Creates a <see cref="JObject"/> from an object.
/// </summary>
/// <param name="o">The object that will be used to create <see cref="JObject"/>.</param>
/// <returns>A <see cref="JObject"/> with the values of the specified object</returns>
/// <returns>A <see cref="JObject"/> with the values of the specified object.</returns>
public new static JObject FromObject(object o)
{
return FromObject(o, JsonSerializer.CreateDefault());
@@ -451,7 +451,7 @@ namespace Newtonsoft.Json.Linq
/// </summary>
/// <param name="o">The object that will be used to create <see cref="JObject"/>.</param>
/// <param name="jsonSerializer">The <see cref="JsonSerializer"/> that will be used to read the object.</param>
/// <returns>A <see cref="JObject"/> with the values of the specified object</returns>
/// <returns>A <see cref="JObject"/> with the values of the specified object.</returns>
public new static JObject FromObject(object o, JsonSerializer jsonSerializer)
{
JToken token = FromObjectInternal(o, jsonSerializer);
@@ -583,7 +583,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Tries the get value.
/// Tries to get the <see cref="Newtonsoft.Json.Linq.JToken"/> with the specified property name.
/// </summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="value">The value.</param>
@@ -683,7 +683,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Returns an enumerator that iterates through the collection.
/// Returns an enumerator that can be used to iterate through the collection.
/// </summary>
/// <returns>
/// A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection.
@@ -720,24 +720,11 @@ namespace Newtonsoft.Json.Linq
// include custom type descriptor on JObject rather than use a provider because the properties are specific to a type
#region ICustomTypeDescriptor
/// <summary>
/// Returns the properties for this instance of a component.
/// </summary>
/// <returns>
/// A <see cref="T:System.ComponentModel.PropertyDescriptorCollection"/> that represents the properties for this component instance.
/// </returns>
PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties()
{
return ((ICustomTypeDescriptor)this).GetProperties(null);
}
/// <summary>
/// Returns the properties for this instance of a component using the attribute array as a filter.
/// </summary>
/// <param name="attributes">An array of type <see cref="T:System.Attribute"/> that is used as a filter.</param>
/// <returns>
/// A <see cref="T:System.ComponentModel.PropertyDescriptorCollection"/> that represents the filtered properties for this component instance.
/// </returns>
PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties(Attribute[] attributes)
{
PropertyDescriptorCollection descriptors = new PropertyDescriptorCollection(null);
@@ -750,114 +737,51 @@ namespace Newtonsoft.Json.Linq
return descriptors;
}
/// <summary>
/// Returns a collection of custom attributes for this instance of a component.
/// </summary>
/// <returns>
/// An <see cref="T:System.ComponentModel.AttributeCollection"/> containing the attributes for this object.
/// </returns>
AttributeCollection ICustomTypeDescriptor.GetAttributes()
{
return AttributeCollection.Empty;
}
/// <summary>
/// Returns the class name of this instance of a component.
/// </summary>
/// <returns>
/// The class name of the object, or null if the class does not have a name.
/// </returns>
string ICustomTypeDescriptor.GetClassName()
{
return null;
}
/// <summary>
/// Returns the name of this instance of a component.
/// </summary>
/// <returns>
/// The name of the object, or null if the object does not have a name.
/// </returns>
string ICustomTypeDescriptor.GetComponentName()
{
return null;
}
/// <summary>
/// Returns a type converter for this instance of a component.
/// </summary>
/// <returns>
/// A <see cref="T:System.ComponentModel.TypeConverter"/> that is the converter for this object, or null if there is no <see cref="T:System.ComponentModel.TypeConverter"/> for this object.
/// </returns>
TypeConverter ICustomTypeDescriptor.GetConverter()
{
return new TypeConverter();
}
/// <summary>
/// Returns the default event for this instance of a component.
/// </summary>
/// <returns>
/// An <see cref="T:System.ComponentModel.EventDescriptor"/> that represents the default event for this object, or null if this object does not have events.
/// </returns>
EventDescriptor ICustomTypeDescriptor.GetDefaultEvent()
{
return null;
}
/// <summary>
/// Returns the default property for this instance of a component.
/// </summary>
/// <returns>
/// A <see cref="T:System.ComponentModel.PropertyDescriptor"/> that represents the default property for this object, or null if this object does not have properties.
/// </returns>
PropertyDescriptor ICustomTypeDescriptor.GetDefaultProperty()
{
return null;
}
/// <summary>
/// Returns an editor of the specified type for this instance of a component.
/// </summary>
/// <param name="editorBaseType">A <see cref="T:System.Type"/> that represents the editor for this object.</param>
/// <returns>
/// An <see cref="T:System.Object"/> of the specified type that is the editor for this object, or null if the editor cannot be found.
/// </returns>
object ICustomTypeDescriptor.GetEditor(Type editorBaseType)
{
return null;
}
/// <summary>
/// Returns the events for this instance of a component using the specified attribute array as a filter.
/// </summary>
/// <param name="attributes">An array of type <see cref="T:System.Attribute"/> that is used as a filter.</param>
/// <returns>
/// An <see cref="T:System.ComponentModel.EventDescriptorCollection"/> that represents the filtered events for this component instance.
/// </returns>
EventDescriptorCollection ICustomTypeDescriptor.GetEvents(Attribute[] attributes)
{
return EventDescriptorCollection.Empty;
}
/// <summary>
/// Returns the events for this instance of a component.
/// </summary>
/// <returns>
/// An <see cref="T:System.ComponentModel.EventDescriptorCollection"/> that represents the events for this component instance.
/// </returns>
EventDescriptorCollection ICustomTypeDescriptor.GetEvents()
{
return EventDescriptorCollection.Empty;
}
/// <summary>
/// Returns an object that contains the property described by the specified property descriptor.
/// </summary>
/// <param name="pd">A <see cref="T:System.ComponentModel.PropertyDescriptor"/> that represents the property whose owner is to be found.</param>
/// <returns>
/// An <see cref="T:System.Object"/> that represents the owner of the specified property.
/// </returns>
object ICustomTypeDescriptor.GetPropertyOwner(PropertyDescriptor pd)
{
return null;
+1 -1
View File
@@ -361,7 +361,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Loads an <see cref="JProperty"/> from a <see cref="JsonReader"/>.
/// Loads a <see cref="JProperty"/> from a <see cref="JsonReader"/>.
/// </summary>
/// <param name="reader">A <see cref="JsonReader"/> that will be read for the content of the <see cref="JProperty"/>.</param>
/// <returns>A <see cref="JProperty"/> that contains the JSON that was read from the specified <see cref="JsonReader"/>.</returns>
@@ -66,8 +66,7 @@ namespace Newtonsoft.Json.Linq
/// <returns>
/// The value of a property for a given component.
/// </returns>
/// <param name="component">The component with the property for which to retrieve the value.
/// </param>
/// <param name="component">The component with the property for which to retrieve the value.</param>
public override object GetValue(object component)
{
JToken token = CastInstance(component)[Name];
@@ -78,8 +77,7 @@ namespace Newtonsoft.Json.Linq
/// <summary>
/// When overridden in a derived class, resets the value for this property of the component to the default value.
/// </summary>
/// <param name="component">The component with the property value that is to be reset to the default value.
/// </param>
/// <param name="component">The component with the property value that is to be reset to the default value.</param>
public override void ResetValue(object component)
{
}
@@ -87,9 +85,8 @@ namespace Newtonsoft.Json.Linq
/// <summary>
/// When overridden in a derived class, sets the value of the component to a different value.
/// </summary>
/// <param name="component">The component with the property value that is to be set.
/// </param><param name="value">The new value.
/// </param>
/// <param name="component">The component with the property value that is to be set.</param>
/// <param name="value">The new value.</param>
public override void SetValue(object component, object value)
{
JToken token = (value is JToken) ? (JToken)value : new JValue(value);
@@ -113,7 +110,10 @@ namespace Newtonsoft.Json.Linq
/// When overridden in a derived class, gets the type of the component this property is bound to.
/// </summary>
/// <returns>
/// A <see cref="T:System.Type"/> that represents the type of component this property is bound to. When the <see cref="M:System.ComponentModel.PropertyDescriptor.GetValue(System.Object)"/> or <see cref="M:System.ComponentModel.PropertyDescriptor.SetValue(System.Object,System.Object)"/> methods are invoked, the object specified might be an instance of this type.
/// A <see cref="T:System.Type"/> that represents the type of component this property is bound to.
/// When the <see cref="M:System.ComponentModel.PropertyDescriptor.GetValue(System.Object)"/> or
/// <see cref="M:System.ComponentModel.PropertyDescriptor.SetValue(System.Object,System.Object)"/>
/// methods are invoked, the object specified might be an instance of this type.
/// </returns>
public override Type ComponentType
{
+16 -16
View File
@@ -428,7 +428,7 @@ namespace Newtonsoft.Json.Linq
/// <summary>
/// Returns the JSON for this token using the given formatting and converters.
/// </summary>
/// <param name="formatting">Indicates how the output is formatted.</param>
/// <param name="formatting">Indicates how the output should be formatted.</param>
/// <param name="converters">A collection of <see cref="JsonConverter"/> which will be used when writing the token.</param>
/// <returns>The JSON for this token using the given formatting and converters.</returns>
public string ToString(Formatting formatting, params JsonConverter[] converters)
@@ -1358,7 +1358,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Performs an explicit conversion from <see cref="Newtonsoft.Json.Linq.JToken"/> to <see cref="System.Guid"/>.
/// Performs an explicit conversion from <see cref="Newtonsoft.Json.Linq.JToken"/> to <see cref="Nullable{Guid}"/>.
/// </summary>
/// <param name="value">The value.</param>
/// <returns>The result of the conversion.</returns>
@@ -1405,7 +1405,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Performs an explicit conversion from <see cref="Newtonsoft.Json.Linq.JToken"/> to <see cref="System.TimeSpan"/>.
/// Performs an explicit conversion from <see cref="Newtonsoft.Json.Linq.JToken"/> to <see cref="Nullable{TimeSpan}"/>.
/// </summary>
/// <param name="value">The value.</param>
/// <returns>The result of the conversion.</returns>
@@ -1870,9 +1870,9 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Creates an <see cref="JsonReader"/> for this token.
/// Creates a <see cref="JsonReader"/> for this token.
/// </summary>
/// <returns>An <see cref="JsonReader"/> that can be used to read this token and its descendants.</returns>
/// <returns>A <see cref="JsonReader"/> that can be used to read this token and its descendants.</returns>
public JsonReader CreateReader()
{
return new JTokenReader(this);
@@ -1915,7 +1915,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Creates the specified .NET type from the <see cref="JToken"/>.
/// Creates an instance of the specified .NET type from the <see cref="JToken"/>.
/// </summary>
/// <typeparam name="T">The object type that the token will be deserialized to.</typeparam>
/// <returns>The new object created from the JSON value.</returns>
@@ -1925,7 +1925,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Creates the specified .NET type from the <see cref="JToken"/>.
/// Creates an instance of the specified .NET type from the <see cref="JToken"/>.
/// </summary>
/// <param name="objectType">The object type that the token will be deserialized to.</param>
/// <returns>The new object created from the JSON value.</returns>
@@ -2048,7 +2048,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Creates the specified .NET type from the <see cref="JToken"/> using the specified <see cref="JsonSerializer"/>.
/// Creates an instance of the specified .NET type from the <see cref="JToken"/> using the specified <see cref="JsonSerializer"/>.
/// </summary>
/// <typeparam name="T">The object type that the token will be deserialized to.</typeparam>
/// <param name="jsonSerializer">The <see cref="JsonSerializer"/> that will be used when creating the object.</param>
@@ -2059,7 +2059,7 @@ namespace Newtonsoft.Json.Linq
}
/// <summary>
/// Creates the specified .NET type from the <see cref="JToken"/> using the specified <see cref="JsonSerializer"/>.
/// Creates an instance of the specified .NET type from the <see cref="JToken"/> using the specified <see cref="JsonSerializer"/>.
/// </summary>
/// <param name="objectType">The object type that the token will be deserialized to.</param>
/// <param name="jsonSerializer">The <see cref="JsonSerializer"/> that will be used when creating the object.</param>
@@ -2077,9 +2077,9 @@ namespace Newtonsoft.Json.Linq
/// <summary>
/// Creates a <see cref="JToken"/> from a <see cref="JsonReader"/>.
/// </summary>
/// <param name="reader">An <see cref="JsonReader"/> positioned at the token to read into this <see cref="JToken"/>.</param>
/// <param name="reader">A <see cref="JsonReader"/> positioned at the token to read into this <see cref="JToken"/>.</param>
/// <returns>
/// An <see cref="JToken"/> that contains the token and its descendant tokens
/// A <see cref="JToken"/> that contains the token and its descendant tokens
/// that were read from the reader. The runtime type of the token is determined
/// by the token type of the first token encountered in the reader.
/// </returns>
@@ -2188,11 +2188,11 @@ namespace Newtonsoft.Json.Linq
/// <summary>
/// Creates a <see cref="JToken"/> from a <see cref="JsonReader"/>.
/// </summary>
/// <param name="reader">An <see cref="JsonReader"/> positioned at the token to read into this <see cref="JToken"/>.</param>
/// <param name="reader">A <see cref="JsonReader"/> positioned at the token to read into this <see cref="JToken"/>.</param>
/// <param name="settings">The <see cref="JsonLoadSettings"/> used to load the JSON.
/// If this is null, default load settings will be used.</param>
/// <returns>
/// An <see cref="JToken"/> that contains the token and its descendant tokens
/// A <see cref="JToken"/> that contains the token and its descendant tokens
/// that were read from the reader. The runtime type of the token is determined
/// by the token type of the first token encountered in the reader.
/// </returns>
@@ -2204,9 +2204,9 @@ namespace Newtonsoft.Json.Linq
/// <summary>
/// Creates a <see cref="JToken"/> from a <see cref="JsonReader"/>.
/// </summary>
/// <param name="reader">An <see cref="JsonReader"/> positioned at the token to read into this <see cref="JToken"/>.</param>
/// <param name="reader">A <see cref="JsonReader"/> positioned at the token to read into this <see cref="JToken"/>.</param>
/// <returns>
/// An <see cref="JToken"/> that contains the token and its descendant tokens
/// A <see cref="JToken"/> that contains the token and its descendant tokens
/// that were read from the reader. The runtime type of the token is determined
/// by the token type of the first token encountered in the reader.
/// </returns>
@@ -2505,7 +2505,7 @@ namespace Newtonsoft.Json.Linq
/// Gets a collection of annotations of the specified type for this <see cref="JToken"/>.
/// </summary>
/// <typeparam name="T">The type of the annotations to retrieve.</typeparam>
/// <returns>An <see cref="IEnumerable{T}"/> that contains the annotations for this <see cref="JToken"/>.</returns>
/// <returns>An <see cref="IEnumerable{T}"/> that contains the annotations for this <see cref="JToken"/>.</returns>
public IEnumerable<T> Annotations<T>() where T : class
{
if (_annotations == null)
+1 -4
View File
@@ -869,9 +869,6 @@ namespace Newtonsoft.Json.Linq
/// <returns>
/// <c>true</c> if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>; otherwise, <c>false</c>.
/// </returns>
/// <exception cref="T:System.NullReferenceException">
/// The <paramref name="obj"/> parameter is null.
/// </exception>
public override bool Equals(object obj)
{
if (obj == null)
@@ -1079,7 +1076,7 @@ namespace Newtonsoft.Json.Linq
/// This instance is greater than <paramref name="obj"/>.
/// </returns>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="obj"/> is not the same type as this instance.
/// <paramref name="obj"/> is not of the same type as this instance.
/// </exception>
public int CompareTo(JValue obj)
{
+9 -9
View File
@@ -59,7 +59,7 @@ namespace Newtonsoft.Json.Schema
public bool? Required { get; set; }
/// <summary>
/// Gets or sets whether the object is read only.
/// Gets or sets whether the object is read-only.
/// </summary>
public bool? ReadOnly { get; set; }
@@ -103,9 +103,9 @@ namespace Newtonsoft.Json.Schema
public int? MaximumLength { get; set; }
/// <summary>
/// Gets or sets a number that the value should be divisble by.
/// Gets or sets a number that the value should be divisible by.
/// </summary>
/// <value>A number that the value should be divisble by.</value>
/// <value>A number that the value should be divisible by.</value>
public double? DivisibleBy { get; set; }
/// <summary>
@@ -288,21 +288,21 @@ namespace Newtonsoft.Json.Schema
}
/// <summary>
/// Load a <see cref="JsonSchema"/> from a string that contains schema JSON.
/// Load a <see cref="JsonSchema"/> from a string that contains JSON Schema.
/// </summary>
/// <param name="json">A <see cref="String"/> that contains JSON.</param>
/// <returns>A <see cref="JsonSchema"/> populated from the string that contains JSON.</returns>
/// <param name="json">A <see cref="String"/> that contains JSON Schema.</param>
/// <returns>A <see cref="JsonSchema"/> populated from the string that contains JSON Schema.</returns>
public static JsonSchema Parse(string json)
{
return Parse(json, new JsonSchemaResolver());
}
/// <summary>
/// Parses the specified json.
/// Load a <see cref="JsonSchema"/> from a string that contains JSON Schema using the specified <see cref="JsonSchemaResolver"/>.
/// </summary>
/// <param name="json">The json.</param>
/// <param name="json">A <see cref="String"/> that contains JSON Schema.</param>
/// <param name="resolver">The resolver.</param>
/// <returns>A <see cref="JsonSchema"/> populated from the string that contains JSON.</returns>
/// <returns>A <see cref="JsonSchema"/> populated from the string that contains JSON Schema.</returns>
public static JsonSchema Parse(string json, JsonSchemaResolver resolver)
{
ValidationUtils.ArgumentNotNull(json, nameof(json));
@@ -94,8 +94,8 @@ namespace Newtonsoft.Json.Schema
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0). </exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null.</exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0).</exception>
public JsonSchemaException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
@@ -302,7 +302,7 @@ namespace Newtonsoft.Json.Serialization
public Func<object> DefaultCreator { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the default creator is non public.
/// Gets or sets a value indicating whether the default creator is non-public.
/// </summary>
/// <value><c>true</c> if the default object creator is non-public; otherwise, <c>false</c>.</value>
public bool DefaultCreatorNonPublic { get; set; }
@@ -235,9 +235,9 @@ namespace Newtonsoft.Json.Serialization
public TypeNameHandling? TypeNameHandling { get; set; }
/// <summary>
/// Gets or sets a predicate used to determine whether the property should be serialize.
/// Gets or sets a predicate used to determine whether the property should be serialized.
/// </summary>
/// <value>A predicate used to determine whether the property should be serialize.</value>
/// <value>A predicate used to determine whether the property should be serialized.</value>
public Predicate<object> ShouldSerialize { get; set; }
/// <summary>
+41 -41
View File
@@ -724,7 +724,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Returns an <see cref="Int64"/> that represents the total number
/// Returns a <see cref="Int64"/> that represents the total number
/// of elements in a sequence.
/// </summary>
@@ -740,7 +740,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Returns an <see cref="Int64"/> that represents how many elements
/// Returns a <see cref="Int64"/> that represents how many elements
/// in a sequence satisfy a condition.
/// </summary>
@@ -1777,7 +1777,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
internal partial class Enumerable
{
/// <summary>
/// Computes the sum of a sequence of nullable <see cref="System.Int32" /> values.
/// Computes the sum of a sequence of <see cref="System.Int32" /> values.
/// </summary>
public static int Sum(
@@ -1793,7 +1793,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of nullable <see cref="System.Int32" />
/// Computes the sum of a sequence of <see cref="System.Int32" />
/// values that are obtained by invoking a transform function on
/// each element of the input sequence.
/// </summary>
@@ -1806,7 +1806,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of nullable <see cref="System.Int32" /> values.
/// Computes the average of a sequence of <see cref="System.Int32" /> values.
/// </summary>
public static double Average(
@@ -1831,7 +1831,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of nullable <see cref="System.Int32" /> values
/// Computes the average of a sequence of <see cref="System.Int32" /> values
/// that are obtained by invoking a transform function on each
/// element of the input sequence.
/// </summary>
@@ -1845,7 +1845,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
/// <summary>
/// Computes the sum of a sequence of <see cref="System.Int32" /> values.
/// Computes the sum of a sequence of nullable <see cref="System.Int32" /> values.
/// </summary>
public static int? Sum(
@@ -1861,7 +1861,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of <see cref="System.Int32" />
/// Computes the sum of a sequence of nullable <see cref="System.Int32" />
/// values that are obtained by invoking a transform function on
/// each element of the input sequence.
/// </summary>
@@ -1874,7 +1874,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of <see cref="System.Int32" /> values.
/// Computes the average of a sequence of nullable <see cref="System.Int32" /> values.
/// </summary>
public static double? Average(
@@ -1899,7 +1899,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of <see cref="System.Int32" /> values
/// Computes the average of a sequence of nullable <see cref="System.Int32" /> values
/// that are obtained by invoking a transform function on each
/// element of the input sequence.
/// </summary>
@@ -1963,7 +1963,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of nullable <see cref="System.Int64" /> values.
/// Computes the sum of a sequence of <see cref="System.Int64" /> values.
/// </summary>
public static long Sum(
@@ -1979,7 +1979,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of nullable <see cref="System.Int64" />
/// Computes the sum of a sequence of <see cref="System.Int64" />
/// values that are obtained by invoking a transform function on
/// each element of the input sequence.
/// </summary>
@@ -1992,7 +1992,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of nullable <see cref="System.Int64" /> values.
/// Computes the average of a sequence of <see cref="System.Int64" /> values.
/// </summary>
public static double Average(
@@ -2017,7 +2017,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of nullable <see cref="System.Int64" /> values
/// Computes the average of a sequence of <see cref="System.Int64" /> values
/// that are obtained by invoking a transform function on each
/// element of the input sequence.
/// </summary>
@@ -2031,7 +2031,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
/// <summary>
/// Computes the sum of a sequence of <see cref="System.Int64" /> values.
/// Computes the sum of a sequence of nullable <see cref="System.Int64" /> values.
/// </summary>
public static long? Sum(
@@ -2047,7 +2047,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of <see cref="System.Int64" />
/// Computes the sum of a sequence of nullable <see cref="System.Int64" />
/// values that are obtained by invoking a transform function on
/// each element of the input sequence.
/// </summary>
@@ -2060,7 +2060,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of <see cref="System.Int64" /> values.
/// Computes the average of a sequence of nullable <see cref="System.Int64" /> values.
/// </summary>
public static double? Average(
@@ -2085,7 +2085,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of <see cref="System.Int64" /> values
/// Computes the average of a sequence of nullable <see cref="System.Int64" /> values
/// that are obtained by invoking a transform function on each
/// element of the input sequence.
/// </summary>
@@ -2165,7 +2165,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of nullable <see cref="System.Single" />
/// Computes the sum of a sequence of <see cref="System.Single" />
/// values that are obtained by invoking a transform function on
/// each element of the input sequence.
/// </summary>
@@ -2178,7 +2178,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of nullable <see cref="System.Single" /> values.
/// Computes the average of a sequence of <see cref="System.Single" /> values.
/// </summary>
public static float Average(
@@ -2203,7 +2203,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of nullable <see cref="System.Single" /> values
/// Computes the average of a sequence of <see cref="System.Single" /> values
/// that are obtained by invoking a transform function on each
/// element of the input sequence.
/// </summary>
@@ -2217,7 +2217,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
/// <summary>
/// Computes the sum of a sequence of <see cref="System.Single" /> values.
/// Computes the sum of a sequence of nullable <see cref="System.Single" /> values.
/// </summary>
public static float? Sum(
@@ -2233,7 +2233,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of <see cref="System.Single" />
/// Computes the sum of a sequence of nullable <see cref="System.Single" />
/// values that are obtained by invoking a transform function on
/// each element of the input sequence.
/// </summary>
@@ -2246,7 +2246,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of <see cref="System.Single" /> values.
/// Computes the average of a sequence of nullable <see cref="System.Single" /> values.
/// </summary>
public static float? Average(
@@ -2271,7 +2271,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of <see cref="System.Single" /> values
/// Computes the average of a sequence of nullable <see cref="System.Single" /> values
/// that are obtained by invoking a transform function on each
/// element of the input sequence.
/// </summary>
@@ -2335,7 +2335,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of nullable <see cref="System.Double" /> values.
/// Computes the sum of a sequence of <see cref="System.Double" /> values.
/// </summary>
public static double Sum(
@@ -2351,7 +2351,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of nullable <see cref="System.Double" />
/// Computes the sum of a sequence of <see cref="System.Double" />
/// values that are obtained by invoking a transform function on
/// each element of the input sequence.
/// </summary>
@@ -2364,7 +2364,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of nullable <see cref="System.Double" /> values.
/// Computes the average of a sequence of <see cref="System.Double" /> values.
/// </summary>
public static double Average(
@@ -2389,7 +2389,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of nullable <see cref="System.Double" /> values
/// Computes the average of a sequence of <see cref="System.Double" /> values
/// that are obtained by invoking a transform function on each
/// element of the input sequence.
/// </summary>
@@ -2403,7 +2403,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
/// <summary>
/// Computes the sum of a sequence of <see cref="System.Double" /> values.
/// Computes the sum of a sequence of nullable <see cref="System.Double" /> values.
/// </summary>
public static double? Sum(
@@ -2419,7 +2419,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of <see cref="System.Double" />
/// Computes the sum of a sequence of nullable <see cref="System.Double" />
/// values that are obtained by invoking a transform function on
/// each element of the input sequence.
/// </summary>
@@ -2432,7 +2432,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of <see cref="System.Double" /> values.
/// Computes the average of a sequence of nullable <see cref="System.Double" /> values.
/// </summary>
public static double? Average(
@@ -2457,7 +2457,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of <see cref="System.Double" /> values
/// Computes the average of a sequence of nullable <see cref="System.Double" /> values
/// that are obtained by invoking a transform function on each
/// element of the input sequence.
/// </summary>
@@ -2521,7 +2521,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of nullable <see cref="System.Decimal" /> values.
/// Computes the sum of a sequence of <see cref="System.Decimal" /> values.
/// </summary>
public static decimal Sum(
@@ -2537,7 +2537,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of nullable <see cref="System.Decimal" />
/// Computes the sum of a sequence of <see cref="System.Decimal" />
/// values that are obtained by invoking a transform function on
/// each element of the input sequence.
/// </summary>
@@ -2550,7 +2550,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of nullable <see cref="System.Decimal" /> values.
/// Computes the average of a sequence of <see cref="System.Decimal" /> values.
/// </summary>
public static decimal Average(
@@ -2575,7 +2575,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of nullable <see cref="System.Decimal" /> values
/// Computes the average of a sequence of <see cref="System.Decimal" /> values
/// that are obtained by invoking a transform function on each
/// element of the input sequence.
/// </summary>
@@ -2589,7 +2589,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
/// <summary>
/// Computes the sum of a sequence of <see cref="System.Decimal" /> values.
/// Computes the sum of a sequence of nullable <see cref="System.Decimal" /> values.
/// </summary>
public static decimal? Sum(
@@ -2605,7 +2605,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the sum of a sequence of <see cref="System.Decimal" />
/// Computes the sum of a sequence of nullable <see cref="System.Decimal" />
/// values that are obtained by invoking a transform function on
/// each element of the input sequence.
/// </summary>
@@ -2618,7 +2618,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of <see cref="System.Decimal" /> values.
/// Computes the average of a sequence of nullable <see cref="System.Decimal" /> values.
/// </summary>
public static decimal? Average(
@@ -2643,7 +2643,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
}
/// <summary>
/// Computes the average of a sequence of <see cref="System.Decimal" /> values
/// Computes the average of a sequence of nullable <see cref="System.Decimal" /> values
/// that are obtained by invoking a transform function on each
/// element of the input sequence.
/// </summary>
+11 -11
View File
@@ -39,9 +39,9 @@
/// Checks if value of primitive type <paramref name="from"/> can be
/// assigned to parameter of primitive type <paramref name="to"/>.
/// </summary>
/// <param name="from">Source primitive type</param>
/// <param name="to">Target primitive type</param>
/// <returns>True if source type can be widened to target type, false otherwise</returns>
/// <param name="from">Source primitive type.</param>
/// <param name="to">Target primitive type.</param>
/// <returns>True if source type can be widened to target type, false otherwise.</returns>
private static bool CanConvertPrimitive(Type from, Type to)
{
if (from == to)
@@ -77,10 +77,10 @@
/// Checks if a set of values with given <paramref name="types"/> can be used
/// to invoke a method with specified <paramref name="parameters"/>.
/// </summary>
/// <param name="parameters">Method parameters</param>
/// <param name="types">Argument types</param>
/// <param name="enableParamArray">Try to pack extra arguments into ParamArray</param>
/// <returns>True if method can be called with given arguments, false otherwise</returns>
/// <param name="parameters">Method parameters.</param>
/// <param name="types">Argument types.</param>
/// <param name="enableParamArray">Try to pack extra arguments into ParamArray.</param>
/// <returns>True if method can be called with given arguments, false otherwise.</returns>
private static bool FilterParameters(ParameterInfo[] parameters, IList<Type> types, bool enableParamArray)
{
ValidationUtils.ArgumentNotNull(parameters, nameof(parameters));
@@ -293,11 +293,11 @@
}
/// <summary>
/// Retunrs a best method overload for given argument <paramref name="types"/>.
/// Returns a best method overload for given argument <paramref name="types"/>.
/// </summary>
/// <param name="candidates">List of method candidates</param>
/// <param name="types">Argument types</param>
/// <returns>Best method overload, or <c>null</c> if none matched</returns>
/// <param name="candidates">List of method candidates.</param>
/// <param name="types">Argument types.</param>
/// <returns>Best method overload, or <c>null</c> if none matched.</returns>
public static TMethod SelectMethod<TMethod>(IEnumerable<TMethod> candidates, IList<Type> types) where TMethod : MethodBase
{
ValidationUtils.ArgumentNotNull(candidates, nameof(candidates));