From: Hyihong Chae Date: Tue, 4 Jul 2017 11:10:24 +0000 (+0900) Subject: added throw exception comments. X-Git-Tag: submit/trunk/20170823.075128~84^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e56212d04d15b7b3ef49b3ac22e144cad5b0fc1a;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git added throw exception comments. Change-Id: I60681b13ef708187a23cc9bb2372a7e49879f1a6 Signed-off-by: HyiHong Chae --- diff --git a/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardChannel.cs b/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardChannel.cs index 8c96427..081823a 100644 --- a/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardChannel.cs +++ b/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardChannel.cs @@ -137,12 +137,14 @@ namespace Tizen.Network.Smartcard } //Free unmanaged objects disposed = true; - } - + } + /// /// Closes the given channel to the Secure Element. /// /// 3 + /// Thrown when Smartcard is not supported. + /// Thrown when the method failed due to invalid operation. public void Close() { int ret = Interop.Smartcard.Channel.ChannelClose(_channelHandle); diff --git a/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs b/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs index d901ce3..a711be1 100755 --- a/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs +++ b/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs @@ -1,47 +1,47 @@ -/* - * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace Tizen.Network.Smartcard -{ - /// - /// A class for Smartcard management. It allows applications to use Smartcard service. - /// - /// 3 - /// http://tizen.org/privilege/secureelement - static public class SmartcardManager - { - /// - /// Gets the list of available Secure Element readers. - /// - /// 3 - /// List of SmartcardReader objects. - static public IEnumerable GetReaders() - { +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Tizen.Network.Smartcard +{ + /// + /// A class for Smartcard management. It allows applications to use Smartcard service. + /// + /// 3 + /// http://tizen.org/privilege/secureelement + static public class SmartcardManager + { + /// + /// Gets the list of available Secure Element readers. + /// + /// 3 + /// List of SmartcardReader objects. + static public IEnumerable GetReaders() + { try { return SmartcardManagerImpl.Instance.GetReaders(); - } - catch (TypeInitializationException e) + } + catch (TypeInitializationException e) { throw e.InnerException; - } - } - } -} + } + } + } +} diff --git a/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs b/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs index eb943d9..2aa6f07 100644 --- a/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs +++ b/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs @@ -135,6 +135,8 @@ namespace Tizen.Network.Smartcard /// Closes all the sessions opened on the given reader. /// /// 3 + /// Thrown when Smartcard is not supported. + /// Thrown when the method failed due to invalid operation. public void CloseSessions() { int ret = Interop.Smartcard.Reader.ReaderCloseSessions(_readerHandle); diff --git a/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs b/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs index 9bae91e..107181e 100644 --- a/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs +++ b/src/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs @@ -154,6 +154,8 @@ namespace Tizen.Network.Smartcard /// Closes the connection with the Secure Element. /// /// 3 + /// Thrown when Smartcard is not supported. + /// Thrown when the method failed due to invalid operation. public void Close() { int ret = Interop.Smartcard.Session.SessionClose(_sessionHandle); @@ -169,6 +171,8 @@ namespace Tizen.Network.Smartcard /// Closes any channel opened on the given session. /// /// 3 + /// Thrown when Smartcard is not supported. + /// Thrown when the method failed due to invalid operation. public void CloseChannels() { int ret = Interop.Smartcard.Session.SessionCloseChannels(_sessionHandle); @@ -196,6 +200,8 @@ namespace Tizen.Network.Smartcard /// The SmartcardChannel object for basic channel. /// Byte array containing the Application ID(AID) to be selected on the given channel. /// P2 byte of the SELECT command if executed. + /// Thrown when Smartcard is not supported. + /// Thrown when the method failed due to invalid operation. public SmartcardChannel OpenBasicChannel(byte[] aid, byte p2) { int ret = Interop.Smartcard.Session.SessionOpenBasicChannel(_sessionHandle, aid, aid.Length, p2, out _basicChannel); @@ -217,6 +223,8 @@ namespace Tizen.Network.Smartcard /// The SmartcardChannel object for logical channel. /// Byte array containing the Application ID(AID) to be selected on the given channel. /// P2 byte of the SELECT command if executed. + /// Thrown when Smartcard is not supported. + /// Thrown when the method failed due to invalid operation. public SmartcardChannel OpenLogicalChannel(byte[] aid, byte p2) { int ret = Interop.Smartcard.Session.SessionOpenLogicalChannel(_sessionHandle, aid, aid.Length, p2, out _logicalChannel);