-/// Copyright 2016 by Samsung Electronics, Inc.,
-///
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
/// <since_tizen> 3 </since_tizen>
/// <param name="item">The key value pair to add.</param>
/// <feature>http://tizen.org/feature/iot.ocf</feature>
- /// <code>
+ /// <code><![CDATA[
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes();
/// attributes.Add(new KeyValuePair<string, object> ("state", "ON"));
- /// </code>
+ /// ]]></code>
public void Add(KeyValuePair<string, object> item)
{
Add(item.Key, item.Value);
/// <since_tizen> 3 </since_tizen>
/// <param name="item">The status key value pair.</param>
/// <returns>true if exists. Otherwise, false.</returns>
- /// <code>
+ /// <code><![CDATA[
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// { "dim", 10 }
/// };
/// if (attributes.Contains(new KeyValuePair<string, object> ("dim", 10))
/// Console.WriteLine("Attribute conatins pair ('dim', 10)");
- /// </code>
+ /// ]]></code>
public bool Contains(KeyValuePair<string, object> item)
{
return _attributes.Contains(item);
/// <since_tizen> 3 </since_tizen>
/// <param name="array">The destination array.</param>
/// <param name="arrayIndex">The zero-based index in an array at which copying begins.</param>
- /// <code>
+ /// <code><![CDATA[
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// { "dim", 10 }
/// int index = 0;
/// attributes.CopyTo(dest, index);
/// Console.WriteLine("Dest conatins ({0}, {1})", dest[0].Key, dest[0].Value);
- /// </code>
+ /// ]]></code>
public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
{
_attributes.CopyTo(array, arrayIndex);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns> An enumerator that can be used to iterate through the collection.</returns>
- /// <code>
+ /// <code><![CDATA[
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// { "dim", 10 }
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
{
return _attributes.GetEnumerator();
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid</exception>
- /// <code>
+ /// <code><![CDATA[
/// Tizen.Network.IoTConnectivity.Attributes attributes = new Tizen.Network.IoTConnectivity.Attributes() {
/// { "state", "ON" },
/// { "dim", 10 }
/// };
/// if (attributes.Remove(new KeyValuePair<string, object>("dim", 10)))
/// Console.WriteLine("Remove was successful");
- /// </code>
+ /// ]]></code>
public bool Remove(KeyValuePair<string, object> item)
{
return Remove(item.Key);
/// When the resource receive presence, <see cref="PresenceReceived"/> event handler will be invoked.\n
/// You must destroy presence by calling StopReceivingPresence() if presence event is no longer needed.
/// </post>
- /// <seealso cref="IoTConnectivityServerManager.StartSendingPresence()"/>
+ /// <seealso cref="IoTConnectivityServerManager.StartSendingPresence(uint)"/>
/// <seealso cref="IoTConnectivityServerManager.StopSendingPresence()"/>
- /// <seealso cref="StopReceivingPresence()"/>
+ /// <seealso cref="StopReceivingPresence(int)"/>
/// <seealso cref="PresenceReceived"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// EventHandler<PresenceReceivedEventArgs> handler = (sender, e) => {
/// Console.Log("PresenceReceived, presence id :" + e.PresenceId);
/// }
/// IoTConnectivityClientManager.FindingErrorOccurred += errorHandler;
/// // Do not forget to remove these event handlers when they are not required any more.
/// int id = IoTConnectivityClientManager.StartReceivingPresence(IoTConnectivityClientManager.MulticastAddress, "oic.iot.door");
- /// </code>
+ /// ]]></code>
public static int StartReceivingPresence(string hostAddress, string resourceType)
{
Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
/// <pre>
/// Initialize() should be called to initialize.
/// </pre>
- /// <seealso cref="IoTConnectivityServerManager.StartSendingPresence()"/>
+ /// <seealso cref="IoTConnectivityServerManager.StartSendingPresence(uint)"/>
/// <seealso cref="IoTConnectivityServerManager.StopSendingPresence()"/>
- /// <seealso cref="StartReceivingPresence()"/>
+ /// <seealso cref="StartReceivingPresence(string, string)"/>
/// <seealso cref="PresenceReceived"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// EventHandler<PresenceReceivedEventArgs> handler = (sender, e) => {
/// Console.Log("PresenceReceived, presence id :" + e.PresenceId);
/// }
/// IoTConnectivityClientManager.PresenceReceived -= handler;
/// IoTConnectivityClientManager.FindingErrorOccurred -= errorHandler;
/// IoTConnectivityClientManager.StopReceivingPresence(id);
- /// </code>
+ /// ]]></code>
public static void StopReceivingPresence(int presenceId)
{
if (!s_presenceHandlesMap.ContainsKey((IntPtr)presenceId))
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// EventHandler<ResourceFoundEventArgs> handler = (sender, e) => {
/// Console.Log("Found resource at host address :" + e.Resource.HostAddress + ", uri :" + e.Resource.UriPath);
/// }
/// query.Type = "oic.iot.door";
/// // Do not forget to remove these event handlers when they are not required any more.
/// int id = IoTConnectivityClientManager.StartFindingResource(null, query);
- /// </code>
+ /// ]]></code>
public static int StartFindingResource(string hostAddress, ResourceQuery query = null)
{
Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
/// <post>
/// <see cref="DeviceInformationFound" /> event handler will be invoked.
/// </post>
- /// <seealso cref="IoTConnectivityServerManager.SetDeviceName()"/>
+ /// <seealso cref="IoTConnectivityServerManager.SetDeviceName(string)"/>
/// <seealso cref="DeviceInformationFound"/>
/// <seealso cref="DeviceInformationFoundEventArgs"/>
/// <seealso cref="TimeOut"/>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// EventHandler<DeviceInformationFoundEventArgs> handler = (sender, e) => {
/// Console.Log("Device information found, id : " + e.RequestId + ", name : " + e.Name);
/// }
/// IoTConnectivityClientManager.FindingErrorOccurred += errorHandler;
/// // Do not forget to remove these event handlers when they are not required any more.
/// int id = IoTConnectivityClientManager.StartFindingDeviceInformation(IoTConnectivityClientManager.MulticastAddress);
- /// </code>
+ /// ]]></code>
public static int StartFindingDeviceInformation(string hostAddress, ResourceQuery query = null)
{
Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// EventHandler<PlatformInformationFoundEventArgs> handler = (sender, e) => {
/// Console.Log("PlatformInformationFound :" + e.RequestId);
/// }
/// IoTConnectivityClientManager.FindingErrorOccurred += errorHandler;
/// // Do not forget to remove these event handlers when they are not required any more.
/// int id = IoTConnectivityClientManager.StartFindingPlatformInformation(IoTConnectivityClientManager.MulticastAddress);
- /// </code>
+ /// ]]></code>
public static int StartFindingPlatformInformation(string hostAddress, ResourceQuery query = null)
{
Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType connectivityType = Interop.IoTConnectivity.Client.RemoteResource.ConnectivityType.Ip;
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes types = new ResourceTypes(new List<string>(){ "org.tizen.light" });
/// Attributes attributes = new Attributes { { "state", "ON" }};
/// Resource res = new LiteResource("/room/1", types, ResourcePolicy.Discoverable, attributes);
/// } catch(Exception ex) {
/// Console.Log("Exception caught : " + ex.Message);
/// }
- /// </code>
+ /// ]]></code>
public static void RegisterResource(Resource resource)
{
Log.Info(IoTConnectivityErrorFactory.LogTag, "...");
/// <seealso cref="LiteResource"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes types = new ResourceTypes(new List<string>(){ "org.tizen.light" });
/// Attributes attributes = new Attributes { { "state", "ON" }};
/// Resource res = new LiteResource("/room/1", types, ResourcePolicy.Discoverable, attributes);
/// } catch(Exception ex) {
/// Console.Log("Exception caught : " + ex.Message);
/// }
- /// </code>
+ /// ]]></code>
public static void UnregisterResource(Resource resource)
{
if (resource != null)
* limitations under the License.
*/
+using System;
+using System.ComponentModel;
namespace Tizen.Network.IoTConnectivity
{
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <remarks>
- /// Creates a lite resource, which can then be registered in server using <see cref="IoTConnectivityServerManager.RegisterResource()"/>.\n
+ /// Creates a lite resource, which can then be registered in server using <see cref="IoTConnectivityServerManager.RegisterResource(Resource)"/>.\n
/// When client requests some operations, it sends a response to client automatically.\n
/// @a uri length must be less than 128.
/// </remarks>
/// <seealso cref="ResourceTypes"/>
/// <seealso cref="ResourcePolicy"/>
/// <seealso cref="Attributes"/>
- /// <code>
+ /// <code><![CDATA[
/// List<string> list = new List<string>() { "org.tizen.light" };
/// Attributes attributes = new Attributes() {
/// { "state", "ON" }
/// };
/// LiteResource res = new LiteResource("/light/1", new ResourceTypes(list), ResourcePolicy.Discoverable, attributes);
- /// </code>
+ /// ]]></code>
public LiteResource(string uri, ResourceTypes types, ResourcePolicy policy, Attributes attribs = null)
: base(uri, types, new ResourceInterfaces(new string[] { ResourceInterfaces.DefaultInterface }), policy)
{
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>The attributes of the lite resource.</value>
- /// <code>
+ /// <code><![CDATA[
/// List<string> list = new List<string>() { "org.tizen.light" };
/// LiteResource res = new LiteResource("/light/1", new ResourceTypes(list), ResourcePolicy.Discoverable);
/// Attributes attributes = new Attributes() {
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
public Attributes Attributes { get; set; }
/// <summary>
return true;
}
- // The code block untill @endcond should not appear in doxygen spec.
- /// @cond
+ /// <summary>
+ /// This is called when the client performs get operation on this resource.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <param name="request">A request from client.</param>
+ /// <returns>A response having the representation and the result.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override Response OnGet(Request request)
{
Representation representation = new Representation()
return response;
}
+ /// <summary>
+ /// This is called when the client performs put operation on this resource.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <param name="request">A request from client.</param>
+ /// <returns>A response.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override Response OnPut(Request request)
{
Response response = new Response();
return response;
}
+ /// <summary>
+ /// This is called when the client performs post operation on this resource.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <param name="request">A request from client.</param>
+ /// <returns>A response having the representation and the result.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override Response OnPost(Request request)
{
if (OnPost(request.Representation.Attributes))
};
}
+ /// <summary>
+ /// This is called when the client performs delete operation on this resource.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <param name="request">A request from client.</param>
+ /// <returns>A response.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override Response OnDelete(Request request)
{
Response response = new Response();
return response;
}
+ /// <summary>
+ /// Called on the observing event.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <param name="request">A request from client.</param>
+ /// <param name="observeType">Observer type.</param>
+ /// <param name="observeId">Observe identifier.</param>
+ /// <returns>Returns true.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool OnObserving(Request request, ObserveType observeType, int observeId)
{
return true;
}
- /// @endcond
}
}
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
- /// <code>
+ /// <code><![CDATA[
/// Representation repr = new Representation();
/// ResourceTypes types = new ResourceTypes (new List<string>(){ "org.tizen.light" });
/// repr.Type = types;
/// {
/// Console.WriteLine("Type is {0}", item);
/// }
- /// </code>
+ /// ]]></code>
public ResourceTypes Type
{
get
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
- /// <code>
+ /// <code><![CDATA[
/// Representation repr = new Representation();
/// ResourceInterfaces ifaces = new ResourceInterfaces (new List<string>(){ ResourceInterfaces.DefaultInterface });
/// repr.Interface = ifaces;
/// {
/// Console.WriteLine("Interface is {0}", iface);
/// }
- /// </code>
+ /// ]]></code>
public ResourceInterfaces Interface
{
get
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>List of Child resource representation.</value>
- /// <code>
+ /// <code><![CDATA[
/// Representation repr = new Representation();
/// Representation child1 = new Representation();
/// ResourceTypes types1 = new ResourceTypes(new List<string>() { "org.tizen.light" });
/// {
/// Console.WriteLine("Exception caught : " + ex.Message);
/// }
- /// </code>
+ /// ]]></code>
public ICollection<Representation> Children
{
get
/// <seealso cref="ResourcePolicy"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
- /// <code>
+ /// <code><![CDATA[
/// // Create a class which inherits from Resource
/// public class DoorResource : Resource
/// {
/// ResourceInterfaces ifaces = new ResourceInterfaces(new List<string>(){ ResourceInterfaces.DefaultInterface });
/// ResourceTypes types = new ResourceTypes(new List<string>(){ "oic.iot.door.new" });
/// Resource resource = new DoorResource("/door/uri1", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
- /// </code>
+ /// ]]></code>
protected Resource(string uri, ResourceTypes types, ResourceInterfaces interfaces, ResourcePolicy policy)
{
UriPath = uri;
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when an application does not have privilege to access.</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces ifaces = new ResourceInterfaces(new List<string>(){ ResourceInterfaces.DefaultInterface });
/// ResourceTypes types = new ResourceTypes(new List<string>(){ "oic.iot.door.new.notify" });
/// Resource resource = new DoorResource("/door/uri/new/notify", types, ifaces, ResourcePolicy.Discoverable | ResourcePolicy.Observable);
/// _attribute, 1 }
/// };
/// resource.Notify(repr, QualityOfService.High);
- /// </code>
+ /// ]]></code>
public void Notify(Representation representation, QualityOfService qos)
{
int ret = (int)IoTConnectivityError.None;
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="OutOfMemoryException">Thrown when there is not enough memory.</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
- /// </code>
+ /// ]]></code>
public ResourceInterfaces(IEnumerable<string> ifaces)
{
int ret = Interop.IoTConnectivity.Common.ResourceInterfaces.Create(out _resourceInterfacesHandle);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>Count of interfaces in the list.</value>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
/// Console.WriteLine("There are {0} interfaces", resourceInterfaces.Count);
- /// </code>
+ /// ]]></code>
public int Count
{
get
/// <since_tizen> 3 </since_tizen>
/// <param name="item">The string data to delete from the resource ifaces.</param>
/// <feature>http://tizen.org/feature/iot.ocf</feature>
- /// <seealso cref="Add()"/>
+ /// <seealso cref="Add(string)"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>(){ ResourceInterfaces.BatchInterface });
/// resourceInterfaces.Add(ResourceInterfaces.BatchInterface);
- /// </code>
+ /// ]]></code>
public void Remove(string item)
{
bool isRemoved = _resourceInterfaces.Remove(item);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The enumerator.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
/// foreach(string item in resourceInterfaces)
/// {
/// Console.WriteLine("Interface : {0}", item);
/// }
- /// </code>
+ /// ]]></code>
public IEnumerator<string> GetEnumerator()
{
return _resourceInterfaces.GetEnumerator();
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The enumerator.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceInterfaces resourceInterfaces = new ResourceInterfaces(new List<string>()
/// { ResourceInterfaces.LinkInterface, ResourceInterfaces.ReadonlyInterface });
/// foreach(string item in resourceInterfaces)
/// {
/// Console.WriteLine("Interface : {0}", item);
/// }
- /// </code>
+ /// ]]></code>
IEnumerator IEnumerable.GetEnumerator()
{
return _resourceInterfaces.GetEnumerator();
/// <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();
/// <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{string, string})"/>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
- /// </code>
+ /// ]]></code>
public void Add(KeyValuePair<string, 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[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
/// var isPresent = query.Contains(new KeyValuePair<string, string>("key1", "value1"));
/// if (isPresent)
/// Console.WriteLine("Key value pair is present");
- /// </code>
+ /// ]]></code>
public bool Contains(KeyValuePair<string, string> item)
{
return _query.Contains(item);
/// <since_tizen> 3 </since_tizen>
/// <param name="array">The destination array.</param>
/// <param name="arrayIndex">Index parameter.</param>
- /// <code>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
/// KeyValuePair<string, string>[] dest = new KeyValuePair<string, string>[query.Count];
/// query.CopyTo(dest, 0);
/// Console.WriteLine("Dest conatins ({0}, {1})", dest[0].Key, dest[0].Value);
- /// </code>
+ /// ]]></code>
public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
{
_query.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{string, string})"/>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
/// var result = query.Remove(new KeyValuePair<string, string>("key1", "value1"));
- /// </code>
+ /// ]]></code>
public bool Remove(KeyValuePair<string, string> item)
{
return Remove(item.Key);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>Enumerator to query pairs.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
/// query.Add(new KeyValuePair<string, string>("key2", "value2"));
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
{
return _query.GetEnumerator();
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The enumerator to the query pairs.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceQuery query = new ResourceQuery();
/// query.Add(new KeyValuePair<string, string>("key1", "value1"));
/// query.Add(new KeyValuePair<string, string>("key2", "value2"));
/// {
/// Console.WriteLine("key : {0}, value : {1}", pair.Key, pair.Value);
/// }
- /// </code>
+ /// ]]></code>
IEnumerator IEnumerable.GetEnumerator()
{
return _query.GetEnumerator();
/// <param name="types">List of resource types.</param>
/// <feature>http://tizen.org/feature/iot.ocf</feature>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes types = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
- /// </code>
+ /// ]]></code>
public ResourceTypes(IEnumerable<string> types)
{
int ret = Interop.IoTConnectivity.Common.ResourceTypes.Create(out _resourceTypeHandle);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <value>Count of types in the list.</value>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes types = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// Console.WriteLine("There are {0} items", types.Count);
- /// </code>
+ /// ]]></code>
public int Count
{
get
/// <since_tizen> 3 </since_tizen>
/// <param name="item">The string data to delete from the resource types.</param>
/// <feature>http://tizen.org/feature/iot.ocf</feature>
- /// <seealso cref="Add()"/>
+ /// <seealso cref="Add(string)"/>
/// <exception cref="NotSupportedException">Thrown when the iotcon is not supported.</exception>
/// <exception cref="ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <exception cref="InvalidOperationException">Thrown when the operation is invalid.</exception>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// resourceTypes.Remove("oic.if.room");
- /// </code>
+ /// ]]></code>
public void Remove(string item)
{
int ret = Interop.IoTConnectivity.Common.ResourceTypes.Remove(_resourceTypeHandle, item);
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The enumerator.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// foreach(string item in resourceTypes)
/// {
/// Console.WriteLine("Type : {0}", item);
/// }
- /// </code>
+ /// ]]></code>
public IEnumerator<string> GetEnumerator()
{
return _resourceTypes.GetEnumerator();
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The enumerator.</returns>
- /// <code>
+ /// <code><![CDATA[
/// ResourceTypes resourceTypes = new ResourceTypes(new List<string>() { "org.tizen.light", "oic.if.room" });
/// foreach(string item in resourceTypes)
/// {
/// Console.WriteLine("Type : {0}", item);
/// }
- /// </code>
+ /// ]]></code>
IEnumerator IEnumerable.GetEnumerator()
{
return _resourceTypes.GetEnumerator();