namespace Tizen.Network.IoTConnectivity
{
/// <summary>
- /// This class represents resource options. It provides APIs to manage them.\n
- /// The iotcon options API provides methods for managing vendor specific options of coap packet.\n
- /// See more about coap packet in http://tools.ietf.org/html/rfc7252.
+ /// <para>This class represents resource options. It provides APIs to manage them.</para>
+ /// <para>The iotcon options API provides methods for managing vendor specific options of coap packet.</para>
+ /// <para>See more about coap packet in http://tools.ietf.org/html/rfc7252.</para>
/// </summary>
/// <since_tizen> 3 </since_tizen>
public class ResourceOptions : IDictionary<ushort, string>, IDisposable
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <feature>http://tizen.org/feature/iot.ocf</feature>
- /// <seealso cref="Add()"/>
- /// <seealso cref="Remove()"/>
+ /// <seealso cref="Add(ushort, string)"/>
+ /// <seealso cref="Remove(ushort)"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
/// <code>
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <remarks>
- /// ResourceOptions can have up to 2 options. \n
- /// key is always situated between 2048 and 3000. \n
- /// Length of option data is less than or equal to 15.
+ /// <para>ResourceOptions can have up to 2 options.</para>
+ /// <para>key is always situated between 2048 and 3000.</para>
+ /// <para>Length of option data is less than or equal to 15.</para>
/// </remarks>
/// <param name="key">The ID of the option to insert.</param>
/// <param name="value">The string data to insert into the options.</param>
/// <feature>http://tizen.org/feature/iot.ocf</feature>
- /// <seealso cref="Remove()"/>
+ /// <seealso cref="Remove(ushort)"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <code>
/// <param name="key">The ID of the option to delete.</param>
/// <returns>True if operation is successful. Otherwise, false.</returns>
/// <feature>http://tizen.org/feature/iot.ocf</feature>
- /// <seealso cref="Add()"/>
+ /// <seealso cref="Add(ushort, string)"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <code>
/// <since_tizen> 3 </since_tizen>
/// <param name="item">The key value pair.</param>
/// <feature>http://tizen.org/feature/iot.ocf</feature>
- /// <seealso cref="Remove()"/>
- /// <code>
+ /// <seealso cref="Remove(KeyValuePair{ushort, string})"/>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
- /// </code>
+ /// ]]></code>
public void Add(KeyValuePair<ushort, string> item)
{
Add(item.Key, item.Value);
/// <since_tizen> 3 </since_tizen>
/// <param name="item">The key value pair.</param>
/// <returns>True if exists. Otherwise, false.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
/// var isPresent = options.Contains(new KeyValuePair<ushort, string>(2050, "12345"));
/// if (isPresent)
/// Console.WriteLine("Key value pair is present");
- /// </code>
+ /// ]]></code>
public bool Contains(KeyValuePair<ushort, string> item)
{
return _options.Contains(item);
/// <since_tizen> 3 </since_tizen>
/// <param name="array">The destination array.</param>
/// <param name="arrayIndex">Index parameter.</param>
- /// <code>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
/// KeyValuePair<ushort, string>[] dest = new KeyValuePair<ushort, string>[options.Count];
/// options.CopyTo(dest, 0);
/// Console.WriteLine("Dest conatins ({0}, {1})", dest[0].Key, dest[0].Value);
- /// </code>
+ /// ]]></code>
public void CopyTo(KeyValuePair<ushort, string>[] array, int arrayIndex)
{
_options.CopyTo(array, arrayIndex);
/// <param name="item">The key value pair to remove</param>
/// <returns>True if operation is successful. Otherwise, false</returns>
/// <feature>http://tizen.org/feature/iot.ocf</feature>
- /// <seealso cref="Add()"/>
+ /// <seealso cref="Add(KeyValuePair{ushort, string})"/>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "12345"));
/// var result = options.Remove(new KeyValuePair<ushort, string>(2050, "12345"));
- /// </code>
+ /// ]]></code>
public bool Remove(KeyValuePair<ushort, string> item)
{
return Remove(item.Key);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>Enumerator to option pairs.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "sample1"));
/// options.Add(new KeyValuePair<ushort, string>(2055, "sample2"));
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
public IEnumerator<KeyValuePair<ushort, string>> GetEnumerator()
{
return _options.GetEnumerator();
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>Enumerator to option pairs.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceOptions options = new ResourceOptions();
/// options.Add(new KeyValuePair<ushort, string>(2050, "sample1"));
/// options.Add(new KeyValuePair<ushort, string>(2055, "sample2"));
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
IEnumerator IEnumerable.GetEnumerator()
{
return _options.GetEnumerator();