diff --git a/src/Skybrud.Umbraco.GridData/Converters/GridConverterCollection.cs b/src/Skybrud.Umbraco.GridData/Converters/GridConverterCollection.cs
index 03e2c49..75a9e5c 100644
--- a/src/Skybrud.Umbraco.GridData/Converters/GridConverterCollection.cs
+++ b/src/Skybrud.Umbraco.GridData/Converters/GridConverterCollection.cs
@@ -84,6 +84,10 @@ public void RemoveAt(int index) {
_converters.RemoveAt(index);
}
+ ///
+ /// Returns an enumerator that iterates through the .
+ ///
+ /// A for the .
public IEnumerator GetEnumerator() {
return _converters.GetEnumerator();
}
diff --git a/src/Skybrud.Umbraco.GridData/Extensions/TypedGridExtensionMethods.Rows.cs b/src/Skybrud.Umbraco.GridData/Extensions/TypedGridExtensionMethods.Rows.cs
index 0388c4d..c0d1e76 100644
--- a/src/Skybrud.Umbraco.GridData/Extensions/TypedGridExtensionMethods.Rows.cs
+++ b/src/Skybrud.Umbraco.GridData/Extensions/TypedGridExtensionMethods.Rows.cs
@@ -1,6 +1,5 @@
using System.Web;
using System.Web.Mvc;
-using System.Text.RegularExpressions;
namespace Skybrud.Umbraco.GridData.Extensions {
@@ -33,7 +32,7 @@ public static HtmlString RenderGridRow(this HtmlHelper helper, GridRow row, stri
}
///
- /// Gets the HTML of the specified or falls back to if no row view is found.
+ /// Gets the HTML of the specified or falls back to if no row view is found.
///
/// The instance of used for rendering the row.
/// The row to be rendered.
@@ -45,7 +44,7 @@ public static HtmlString RenderGridRowOrFallback(this HtmlHelper helper, GridRow
}
///
- /// Gets the HTML of the specified or falls back to if isn't found.
+ /// Gets the HTML of the specified or falls back to if isn't found.
///
/// The instance of used for rendering the row.
/// The row to be rendered.
diff --git a/src/Skybrud.Umbraco.GridData/Extensions/TypedGridExtensionMethods.Sections.cs b/src/Skybrud.Umbraco.GridData/Extensions/TypedGridExtensionMethods.Sections.cs
index e80437f..f9d2699 100644
--- a/src/Skybrud.Umbraco.GridData/Extensions/TypedGridExtensionMethods.Sections.cs
+++ b/src/Skybrud.Umbraco.GridData/Extensions/TypedGridExtensionMethods.Sections.cs
@@ -1,5 +1,4 @@
-using System.Text.RegularExpressions;
-using System.Web;
+using System.Web;
using System.Web.Mvc;
namespace Skybrud.Umbraco.GridData.Extensions {
@@ -33,7 +32,7 @@ public static HtmlString RenderGridSection(this HtmlHelper helper, GridSection s
}
///
- /// Gets the HTML of the specified or falls back to if no section view is found.
+ /// Gets the HTML of the specified or falls back to if no section view is found.
///
/// The instance of used for rendering the section.
/// The section to be rendered.
@@ -45,7 +44,7 @@ public static HtmlString RenderGridSectionOrFallback(this HtmlHelper helper, Gri
}
///
- /// Gets the HTML of the specified or falls back to if isn't found.
+ /// Gets the HTML of the specified or falls back to if isn't found.
///
/// The instance of used for rendering the section.
/// The section to be rendered.
diff --git a/src/Skybrud.Umbraco.GridData/GridDictionary.cs b/src/Skybrud.Umbraco.GridData/GridDictionary.cs
index 6f29ffc..06d0d51 100644
--- a/src/Skybrud.Umbraco.GridData/GridDictionary.cs
+++ b/src/Skybrud.Umbraco.GridData/GridDictionary.cs
@@ -86,6 +86,10 @@ public bool TryGetValue(string key, out string value) {
return _dictionary.TryGetValue(key, out value);
}
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// An enumerator that can be used to iterate through the collection.
public IEnumerator GetEnumerator() {
return _dictionary.Select(x => new GridDictionaryItem(x.Key, x.Value)).GetEnumerator();
}
diff --git a/src/Skybrud.Umbraco.GridData/GridPropertyValueConverter.cs b/src/Skybrud.Umbraco.GridData/GridPropertyValueConverter.cs
index 845ca40..f2dff11 100644
--- a/src/Skybrud.Umbraco.GridData/GridPropertyValueConverter.cs
+++ b/src/Skybrud.Umbraco.GridData/GridPropertyValueConverter.cs
@@ -9,14 +9,33 @@ namespace Skybrud.Umbraco.GridData {
///
public class GridPropertyValueConverter : IPropertyValueConverterMeta {
+ ///
+ /// Gets a value indicating whether the converter supports a property type.
+ ///
+ /// The property type.
+ /// A value indicating whether the converter supports a property type.
public bool IsConverter(PublishedPropertyType propertyType) {
return propertyType.PropertyEditorAlias == "Umbraco.Grid";
}
+ ///
+ /// Converts a property Data value to a Source value.
+ ///
+ /// The property type.
+ /// The data value.
+ /// A value indicating whether conversion should take place in preview mode.
+ /// The result of the conversion.
public object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview) {
return source;
}
+ ///
+ /// Converts a property Source value to an Object value.
+ ///
+ /// The property type.
+ /// The source value.
+ /// A value indicating whether conversion should take place in preview mode.
+ /// The result of the conversion.
public object ConvertSourceToObject(PublishedPropertyType propertyType, object source, bool preview) {
// Get the value as a string
@@ -27,10 +46,23 @@ public object ConvertSourceToObject(PublishedPropertyType propertyType, object s
}
+ ///
+ /// Converts a property Source value to an XPath value.
+ ///
+ /// The property type.
+ /// The source value.
+ /// A value indicating whether conversion should take place in preview mode.
+ /// The result of the conversion.
public object ConvertSourceToXPath(PublishedPropertyType propertyType, object source, bool preview) {
return null;
}
+ ///
+ /// Gets the property cache level of a specified value.
+ ///
+ /// The property type.
+ /// The property value.
+ /// The property cache level of the specified value.
public PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType, PropertyCacheValue cacheValue) {
PropertyCacheLevel propertyCacheLevel;
switch (cacheValue) {
@@ -50,6 +82,11 @@ public PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyTy
return propertyCacheLevel;
}
+ ///
+ /// Gets the type of values returned by the converter.
+ ///
+ /// The property type.
+ /// The CLR type of values returned by the converter.
public virtual Type GetPropertyValueType(PublishedPropertyType propertyType) {
return typeof(GridDataModel);
}
diff --git a/src/Skybrud.Umbraco.GridData/GridRow.cs b/src/Skybrud.Umbraco.GridData/GridRow.cs
index d8feeb7..c9efbee 100644
--- a/src/Skybrud.Umbraco.GridData/GridRow.cs
+++ b/src/Skybrud.Umbraco.GridData/GridRow.cs
@@ -192,6 +192,8 @@ public static GridRow Parse(GridSection section, JObject obj) {
// Some input validation
if (obj == null) throw new ArgumentNullException("obj");
+
+ #pragma warning disable 618
// Parse basic properties
GridRow row = new GridRow(obj) {
@@ -202,6 +204,8 @@ public static GridRow Parse(GridSection section, JObject obj) {
Name = obj.GetString("name")
};
+ #pragma warning restore 618
+
// Parse the areas
row.Areas = obj.GetArray("areas", x => GridArea.Parse(row, x)) ?? new GridArea[0];
diff --git a/src/Skybrud.Umbraco.GridData/Interfaces/IGridControlValue.cs b/src/Skybrud.Umbraco.GridData/Interfaces/IGridControlValue.cs
index a50e88d..48e7243 100644
--- a/src/Skybrud.Umbraco.GridData/Interfaces/IGridControlValue.cs
+++ b/src/Skybrud.Umbraco.GridData/Interfaces/IGridControlValue.cs
@@ -8,7 +8,7 @@ namespace Skybrud.Umbraco.GridData.Interfaces {
public interface IGridControlValue {
///
- /// Gets a reference to the parent control.
+ /// Gets a reference to the parent .
///
[JsonIgnore]
GridControl Control { get; }
@@ -22,7 +22,7 @@ public interface IGridControlValue {
///
/// Gets the value of the control as a searchable text - eg. to be used in Examine.
///
- /// Returns an instance of with the value as a searchable text.
+ /// An instance of with the value as a searchable text.
string GetSearchableText();
}
diff --git a/src/Skybrud.Umbraco.GridData/Json/Converters/GridControlValueStringConverter.cs b/src/Skybrud.Umbraco.GridData/Json/Converters/GridControlValueStringConverter.cs
index f487174..245e28c 100644
--- a/src/Skybrud.Umbraco.GridData/Json/Converters/GridControlValueStringConverter.cs
+++ b/src/Skybrud.Umbraco.GridData/Json/Converters/GridControlValueStringConverter.cs
@@ -9,6 +9,12 @@ namespace Skybrud.Umbraco.GridData.Json.Converters {
///
public class GridControlValueStringConverter : JsonConverter {
+ ///
+ /// Writes the JSON representation of the object.
+ ///
+ /// The to write to.
+ /// The value.
+ /// The calling serializer.
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) {
GridControlTextValue text = value as GridControlTextValue;
if (text != null) {
@@ -18,14 +24,30 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
serializer.Serialize(writer, value);
}
+ ///
+ /// Reads the JSON representation of the object.
+ ///
+ /// The to read from.
+ /// Type of the object.
+ /// The existing value of object being read.
+ /// The calling serializer.
+ /// The object value.
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) {
throw new NotImplementedException("Unnecessary because CanRead is false. The type will skip the converter.");
}
+ ///
+ /// Gets a value indicating whether this Newtonsoft.Json.JsonConverter can read JSON.
+ ///
public override bool CanRead {
get { return false; }
}
+ ///
+ /// 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
.
public override bool CanConvert(Type type) {
return false;
}
diff --git a/src/Skybrud.Umbraco.GridData/Json/Converters/GridJsonConverter.cs b/src/Skybrud.Umbraco.GridData/Json/Converters/GridJsonConverter.cs
index 3c3d0ba..bfd1d3a 100644
--- a/src/Skybrud.Umbraco.GridData/Json/Converters/GridJsonConverter.cs
+++ b/src/Skybrud.Umbraco.GridData/Json/Converters/GridJsonConverter.cs
@@ -8,6 +8,12 @@ namespace Skybrud.Umbraco.GridData.Json.Converters {
///
public class GridJsonConverter : JsonConverter {
+ ///
+ /// Writes the JSON representation of the object.
+ ///
+ /// The to write to.
+ /// The value.
+ /// The calling serializer.
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) {
GridJsonObject obj = value as GridJsonObject;
@@ -20,14 +26,30 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
}
+ ///
+ /// Reads the JSON representation of the object.
+ ///
+ /// The to read from.
+ /// Type of the object.
+ /// The existing value of object being read.
+ /// The calling serializer.
+ /// The object value.
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) {
throw new NotImplementedException("Unnecessary because CanRead is false. The type will skip the converter.");
}
+ ///
+ /// Gets a value indicating whether this Newtonsoft.Json.JsonConverter can read JSON.
+ ///
public override bool CanRead {
get { return false; }
}
+ ///
+ /// 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
.
public override bool CanConvert(Type type) {
return false;
}
diff --git a/src/Skybrud.Umbraco.GridData/Values/GridControlEmbedValue.cs b/src/Skybrud.Umbraco.GridData/Values/GridControlEmbedValue.cs
index 606d96d..4d7e91a 100644
--- a/src/Skybrud.Umbraco.GridData/Values/GridControlEmbedValue.cs
+++ b/src/Skybrud.Umbraco.GridData/Values/GridControlEmbedValue.cs
@@ -13,6 +13,9 @@ public class GridControlEmbedValue : GridControlHtmlValue {
#region Properties
+ ///
+ /// Gets whether the value of the control is valid.
+ ///
public override bool IsValid {
get { return !String.IsNullOrWhiteSpace(Value); }
}
diff --git a/src/Skybrud.Umbraco.GridData/Values/GridControlHtmlValue.cs b/src/Skybrud.Umbraco.GridData/Values/GridControlHtmlValue.cs
index 6f60e86..73a9ed6 100644
--- a/src/Skybrud.Umbraco.GridData/Values/GridControlHtmlValue.cs
+++ b/src/Skybrud.Umbraco.GridData/Values/GridControlHtmlValue.cs
@@ -48,10 +48,18 @@ protected GridControlHtmlValue(GridControl control, JToken token) : base(control
#region Member methods
+ ///
+ /// Gets the value of the control as a searchable text - eg. to be used in Examine.
+ ///
+ /// An instance of with the value as a searchable text.
public override string GetSearchableText() {
return Regex.Replace(Value, "<.*?>", "");
}
+ ///
+ /// Gets a string representing the raw value of the control.
+ ///
+ /// An instance of .
public string ToHtmlString() {
return Value;
}
diff --git a/src/Skybrud.Umbraco.GridData/Values/GridControlTextValue.cs b/src/Skybrud.Umbraco.GridData/Values/GridControlTextValue.cs
index 079c27e..66c306c 100644
--- a/src/Skybrud.Umbraco.GridData/Values/GridControlTextValue.cs
+++ b/src/Skybrud.Umbraco.GridData/Values/GridControlTextValue.cs
@@ -56,10 +56,18 @@ protected GridControlTextValue(GridControl control, JToken token) {
#region Member methods
+ ///
+ /// Gets the value of the control as a searchable text - eg. to be used in Examine.
+ ///
+ /// An instance of with the value as a searchable text.
public virtual string GetSearchableText() {
return Value;
}
+ ///
+ /// Gets a string representing the raw value of the control.
+ ///
+ /// An instance of .
public override string ToString() {
return Value;
}
diff --git a/src/Skybrud.Umbraco.GridData/Values/GridControlValueBase.cs b/src/Skybrud.Umbraco.GridData/Values/GridControlValueBase.cs
index 96f6c42..5ee85c0 100644
--- a/src/Skybrud.Umbraco.GridData/Values/GridControlValueBase.cs
+++ b/src/Skybrud.Umbraco.GridData/Values/GridControlValueBase.cs
@@ -12,9 +12,15 @@ public abstract class GridControlValueBase : GridJsonObject, IGridControlValue {
#region Properties
+ ///
+ /// Gets a reference to the parent .
+ ///
[JsonIgnore]
public GridControl Control { get; private set; }
+ ///
+ /// Gets whether the control is valid (eg. whether it has a value).
+ ///
[JsonIgnore]
public virtual bool IsValid {
get { return true; }
@@ -37,6 +43,10 @@ protected GridControlValueBase(GridControl control, JObject obj) : base(obj) {
#region Member methods
+ ///
+ /// Gets the value of the control as a searchable text - eg. to be used in Examine.
+ ///
+ /// An instance of with the value as a searchable text.
public virtual string GetSearchableText() {
return "";
}