[Radio] Add missing descriptions (#1934)
authorhsgwon <haesu.gwon@samsung.com>
Mon, 24 Aug 2020 03:50:32 +0000 (12:50 +0900)
committerGitHub <noreply@github.com>
Mon, 24 Aug 2020 03:50:32 +0000 (12:50 +0900)
src/Tizen.Multimedia.Radio/Radio/Radio.cs

index 921d1c8..9ab613b 100755 (executable)
@@ -120,6 +120,7 @@ namespace Tizen.Multimedia
         /// <summary>
         /// Gets the current state of the radio.
         /// </summary>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public RadioState State
         {
@@ -138,6 +139,7 @@ namespace Tizen.Multimedia
         ///     -or- <br/>
         ///     <paramref name="value"/> is greater than <see cref="Range.Max"/> of <see cref="FrequencyRange"/>.
         /// </exception>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public int Frequency
         {
@@ -161,6 +163,7 @@ namespace Tizen.Multimedia
         /// <summary>
         /// Gets the current signal strength in the range of -128 ~ 128 dBm.
         /// </summary>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public int SignalStrength
         {
@@ -179,6 +182,7 @@ namespace Tizen.Multimedia
         /// true if the radio is muted; otherwise, false.
         /// The default is false.
         /// </value>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public bool IsMuted
         {
@@ -196,6 +200,7 @@ namespace Tizen.Multimedia
         /// <summary>
         /// Gets the channel spacing for the current region.
         /// </summary>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public int ChannelSpacing
         {
@@ -217,6 +222,7 @@ namespace Tizen.Multimedia
         ///     -or-<br/>
         ///     <paramref name="value"/> is greater than 1.0.
         /// </exception>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public float Volume
         {
@@ -240,6 +246,7 @@ namespace Tizen.Multimedia
         /// <summary>
         /// Gets the frequency for the region in the range of 87500 ~ 108000 kHz.
         /// </summary>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public Range FrequencyRange
         {
@@ -257,6 +264,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <remarks>The radio must be in the <see cref="RadioState.Ready"/> state.</remarks>
         /// <exception cref="InvalidOperationException">The radio is not in the valid state.</exception>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public void Start()
         {
@@ -270,6 +278,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <remarks>The radio must be in the <see cref="RadioState.Playing"/> state.</remarks>
         /// <exception cref="InvalidOperationException">The radio is not in the valid state.</exception>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public void Stop()
         {
@@ -283,6 +292,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <remarks>The radio must be in the <see cref="RadioState.Ready"/> or <see cref="RadioState.Playing"/> state.</remarks>
         /// <exception cref="InvalidOperationException">The radio is not in the valid state.</exception>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <seealso cref="ScanUpdated"/>
         /// <seealso cref="ScanCompleted"/>
         /// <since_tizen> 3 </since_tizen>
@@ -298,6 +308,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <remarks>The radio must be in the <see cref="RadioState.Scanning"/> state.</remarks>
         /// <exception cref="InvalidOperationException">The radio is not in the valid state.</exception>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <seealso cref="ScanStopped"/>
         /// <since_tizen> 3 </since_tizen>
         public void StopScan()
@@ -321,6 +332,7 @@ namespace Tizen.Multimedia
         ///     -or-<br/>
         ///     Seeking is in progress.
         /// </exception>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public Task<int> SeekUpAsync()
         {
@@ -341,6 +353,7 @@ namespace Tizen.Multimedia
         ///     -or-<br/>
         ///     Seeking is in progress.
         /// </exception>
+        /// <exception cref="ObjectDisposedException">The radio already has been disposed.</exception>
         /// <since_tizen> 3 </since_tizen>
         public Task<int> SeekDownAsync()
         {
@@ -373,6 +386,8 @@ namespace Tizen.Multimedia
 
         private void ValidateRadioState(params RadioState[] required)
         {
+            ValidateNotDisposed();
+
             RadioState curState = State;
 
             if (required.Contains(curState) == false)
@@ -411,6 +426,14 @@ namespace Tizen.Multimedia
         {
             Dispose(true);
         }
+
+        private void ValidateNotDisposed()
+        {
+            if (_disposed)
+            {
+                throw new ObjectDisposedException(nameof(Radio));
+            }
+        }
         #endregion
     }
 }