-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from sharwell/Documentation
Updated documentation
- Loading branch information
Showing
36 changed files
with
832 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
using Newtonsoft.Json.Linq; | ||
using System; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace net.openstack.Core.Domain.Mapping | ||
{ | ||
/// <summary> | ||
/// Represents an object that can convert between generic <see cref="JObject"/> instances | ||
/// and instances of another specific type. | ||
/// </summary> | ||
/// <typeparam name="T">The type which can be converted to and from <see cref="JObject"/>.</typeparam> | ||
public interface IJsonObjectMapper<T> : IObjectMapper<JObject, T> | ||
{ | ||
/// <summary> | ||
/// Converts a JSON string representation of <typeparamref name="T"/> to an instance | ||
/// of <typeparamref name="T"/>. | ||
/// </summary> | ||
/// <param name="rawJson">The JSON string representation.</param> | ||
/// <returns>An instance of <typeparamref name="T"/> represented by <paramref name="rawJson"/>.</returns> | ||
/// <exception cref="ArgumentNullException">If <paramref name="rawJson"/> is <c>null</c>.</exception> | ||
/// <exception cref="NotSupportedException">If the conversion cannot be performed.</exception> | ||
T Map(string rawJson); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,41 @@ | ||
namespace net.openstack.Core.Domain.Mapping | ||
{ | ||
using System; | ||
using System.ComponentModel; | ||
|
||
/// <summary> | ||
/// Represents an object that can convert between instances of two specific types. | ||
/// </summary> | ||
/// <remarks> | ||
/// This interface is similar to a <see cref="TypeConverter"/> which only supports | ||
/// conversions between exactly two concrete types. | ||
/// </remarks> | ||
/// <typeparam name="TFrom">The first type.</typeparam> | ||
/// <typeparam name="TTo">The second type.</typeparam> | ||
public interface IObjectMapper<TFrom, TTo> | ||
{ | ||
/// <summary> | ||
/// Converts an instance of <typeparamref name="TFrom"/> to an instance of <typeparamref name="TTo"/>. | ||
/// </summary> | ||
/// <remarks> | ||
/// This method provides behavior similar to a strongly-typed implementation | ||
/// of <see cref="TypeConverter.ConvertTo(object, Type)"/>. | ||
/// </remarks> | ||
/// <param name="from">The instance to convert.</param> | ||
/// <returns>The converted instance.</returns> | ||
/// <exception cref="NotSupportedException">The conversion cannot be performed.</exception> | ||
TTo Map(TFrom from); | ||
|
||
/// <summary> | ||
/// Converts an instance of <typeparamref name="TTo"/> to an instance of <typeparamref name="TFrom"/>. | ||
/// </summary> | ||
/// <remarks> | ||
/// This method provides behavior similar to a strongly-typed implementation | ||
/// of <see cref="TypeConverter.ConvertFrom(object)"/>. | ||
/// </remarks> | ||
/// <param name="to">The instance to convert.</param> | ||
/// <returns>The converted instance.</returns> | ||
/// <exception cref="NotSupportedException">The conversion cannot be performed.</exception> | ||
TFrom Map(TTo to); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 22 additions & 2 deletions
24
src/corelib/Core/Exceptions/InvalidCloudIdentityException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.