Change-Id: Idc02a9b881952e3e7cafb015438ad38295dadcaa
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Name: csapi-information
Summary: Tizen Information API for C#
Name: csapi-information
Summary: Tizen Information API for C#
Release: 1
Group: Development/Libraries
License: Apache-2.0
Release: 1
Group: Development/Libraries
License: Apache-2.0
using System.ComponentModel;
using Tizen.Internals.Errors;
using System.ComponentModel;
using Tizen.Internals.Errors;
}
else if (error == RuntimeInfoError.Io)
{
}
else if (error == RuntimeInfoError.Io)
{
- throw new ArgumentException("I/O Error");
+ throw new IOException("I/O Error");
}
else if (error == RuntimeInfoError.RemoteIo)
{
}
else if (error == RuntimeInfoError.RemoteIo)
{
- throw new ArgumentException("Remote I/O Error");
+ throw new IOException("Remote I/O Error");
}
else if (error == RuntimeInfoError.PermissionDenied)
{
}
else if (error == RuntimeInfoError.PermissionDenied)
{
using System;
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
/// <typeparam name="T">The generic type to return.</typeparam>
/// <param name="key">The runtime information key for which the current should be read </param>
/// <returns>The current status of the given key</returns>.
/// <typeparam name="T">The generic type to return.</typeparam>
/// <param name="key">The runtime information key for which the current should be read </param>
/// <returns>The current status of the given key</returns>.
- /// <exception cref="ArgumentException">Thrown when the <paramref name="key"/> is invalid or I/O error is occurred while reading from system.</exception>
+ /// <exception cref="ArgumentException">Thrown when the <paramref name="key"/> is invalid.</exception>
+ /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
/// <exception cref="NotSupportedException">Thrown when the feature related <paramref name="key"/> is not supported.</exception>
public static T GetStatus<T>(RuntimeInformationKey key)
{\r
/// <exception cref="NotSupportedException">Thrown when the feature related <paramref name="key"/> is not supported.</exception>
public static T GetStatus<T>(RuntimeInformationKey key)
{\r
/// Gets system memory information
/// </summary>
/// <returns>The system memory information structure.</returns>
/// Gets system memory information
/// </summary>
/// <returns>The system memory information structure.</returns>
- /// <exception cref="ArgumentException">Thrown when I/O error is occurred while reading from system.</exception>
+ /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
public static SystemMemoryInformation GetSystemMemoryInformation()
{
Interop.RuntimeInfo.MemoryInfo info = new Interop.RuntimeInfo.MemoryInfo();
public static SystemMemoryInformation GetSystemMemoryInformation()
{
Interop.RuntimeInfo.MemoryInfo info = new Interop.RuntimeInfo.MemoryInfo();
/// <param name="pid">List of unique process ids </param>
/// <returns>List of memory information per processes</returns>
/// <privilege>http://tizen.org/privilege/systemmonitor</privilege>
/// <param name="pid">List of unique process ids </param>
/// <returns>List of memory information per processes</returns>
/// <privilege>http://tizen.org/privilege/systemmonitor</privilege>
- /// <exception cref="ArgumentException">Thrown when the <paramref name="pid"/> is empty or I/O error is occurred while reading from system or requesting to resource management daemon.</exception>
+ /// <exception cref="ArgumentException">Thrown when the <paramref name="pid"/> is empty.</exception>
+ /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system or requesting to resource management daemon.</exception>
/// <exception cref="OutOfMemoryException">Thrown when the memory is not enough to allocate.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when caller doesn't have a privilege to use this method.</exception>
public static IDictionary<int, ProcessMemoryInformation> GetProcessMemoryInformation(IEnumerable<int> pid)
/// <exception cref="OutOfMemoryException">Thrown when the memory is not enough to allocate.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when caller doesn't have a privilege to use this method.</exception>
public static IDictionary<int, ProcessMemoryInformation> GetProcessMemoryInformation(IEnumerable<int> pid)
/// Gets system CPU usage time
/// </summary>
/// <returns>The system CPU usage time structure.</returns>
/// Gets system CPU usage time
/// </summary>
/// <returns>The system CPU usage time structure.</returns>
- /// <exception cref="ArgumentException">Thrown when I/O error is occurred while reading from system.</exception>
+ /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
public static CpuUsage GetCpuUsage()
{
Interop.RuntimeInfo.CpuUsage usage = new Interop.RuntimeInfo.CpuUsage();
public static CpuUsage GetCpuUsage()
{
Interop.RuntimeInfo.CpuUsage usage = new Interop.RuntimeInfo.CpuUsage();
/// <param name="pid">List of unique process ids </param>
/// <returns>List of CPU usage information per processes</returns>
/// <privilege>http://tizen.org/privilege/systemmonitor</privilege>
/// <param name="pid">List of unique process ids </param>
/// <returns>List of CPU usage information per processes</returns>
/// <privilege>http://tizen.org/privilege/systemmonitor</privilege>
- /// <exception cref="ArgumentException">Thrown when the <paramref name="pid"/> is empty or I/O error is occurred while reading from system or requesting to resource management daemon.</exception>
+ /// <exception cref="ArgumentException">Thrown when the <paramref name="pid"/> is empty.</exception>
+ /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system or requesting to resource management daemon.</exception>
/// <exception cref="OutOfMemoryException">Thrown when the memory is not enough to allocate.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when caller doesn't have a privilege to use this method.</exception>
public static IDictionary<int, ProcessCpuUsage> GetProcessCpuUsage(IEnumerable<int> pid)
/// <exception cref="OutOfMemoryException">Thrown when the memory is not enough to allocate.</exception>
/// <exception cref="UnauthorizedAccessException">Thrown when caller doesn't have a privilege to use this method.</exception>
public static IDictionary<int, ProcessCpuUsage> GetProcessCpuUsage(IEnumerable<int> pid)
/// Gets the number of processors
/// </summary>
/// <value>The number of processors</value>
/// Gets the number of processors
/// </summary>
/// <value>The number of processors</value>
- /// <exception cref="ArgumentException">Thrown when I/O error is occurred while reading from system.</exception>
+ /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
public static int ProcessorCount
{
get
public static int ProcessorCount
{
get
/// </summary>
/// <param name="coreId">The index (from 0) of CPU core that you want to know the frequency</param>
/// <returns>The current frequency(MHz) of processor</returns>
/// </summary>
/// <param name="coreId">The index (from 0) of CPU core that you want to know the frequency</param>
/// <returns>The current frequency(MHz) of processor</returns>
- /// <exception cref="ArgumentException">Thrown when the <paramref name="coreid"/> is invalid or I/O error is occurred while reading from system.</exception>
+ /// <exception cref="ArgumentException">Thrown when the <paramref name="coreid"/> is invalid.</exception>
+ /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
/// <exception cref="NotSupportedException">Thrown when this system doesn't store CPU current frequency.</exception>
public static int GetProcessorCurrentFrequency(int coreId)
{
/// <exception cref="NotSupportedException">Thrown when this system doesn't store CPU current frequency.</exception>
public static int GetProcessorCurrentFrequency(int coreId)
{
/// </summary>
/// <param name="coreId">The index (from 0) of CPU core that you want to know the frequency</param>
/// <returns>The max frequency(MHz) of processor</returns>
/// </summary>
/// <param name="coreId">The index (from 0) of CPU core that you want to know the frequency</param>
/// <returns>The max frequency(MHz) of processor</returns>
- /// <exception cref="ArgumentException">Thrown when the <paramref name="coreid"/> is invalid or I/O error is occurred while reading from system.</exception>
+ /// <exception cref="ArgumentException">Thrown when the <paramref name="coreid"/> is invalid.</exception>
+ /// <exception cref="IOException">Thrown when I/O error is occurred while reading from system.</exception>
/// <exception cref="NotSupportedException">Thrown when this system doesn't store CPU max frequency.</exception>
public static int GetProcessorMaxFrequency(int coreId)
{
/// <exception cref="NotSupportedException">Thrown when this system doesn't store CPU max frequency.</exception>
public static int GetProcessorMaxFrequency(int coreId)
{
<Project Sdk="Microsoft.NET.Sdk">\r
\r
<PropertyGroup>\r
<Project Sdk="Microsoft.NET.Sdk">\r
\r
<PropertyGroup>\r
- <Version>1.0.4</Version>\r
+ <Version>1.0.5</Version>\r
<Authors>Samsung Electronics</Authors>\r
<Copyright>© Samsung Electronics Co., Ltd All Rights Reserved</Copyright>\r
<Description>Provide classes for SystemInformation and RuntimeInformation APIs</Description>\r
<Authors>Samsung Electronics</Authors>\r
<Copyright>© Samsung Electronics Co., Ltd All Rights Reserved</Copyright>\r
<Description>Provide classes for SystemInformation and RuntimeInformation APIs</Description>\r