[System]Add example for example code 53/157353/1
authorlokilee73 <changjoo.lee@samsung.com>
Tue, 24 Oct 2017 08:16:32 +0000 (17:16 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Tue, 24 Oct 2017 08:16:41 +0000 (17:16 +0900)
Change-Id: I8b712061590a9a9e246c52a65c775552dcd61448
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
src/Tizen.System.Feedback/Feedback/Feedback.cs [changed mode: 0644->0755]
src/Tizen.System/Device/Battery.cs [changed mode: 0644->0755]
src/Tizen.System/Device/Display.cs [changed mode: 0644->0755]
src/Tizen.System/Device/Haptic.cs [changed mode: 0644->0755]
src/Tizen.System/Device/IR.cs [changed mode: 0644->0755]
src/Tizen.System/Device/Led.cs [changed mode: 0644->0755]
src/Tizen.System/Device/Power.cs [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 7fa3669..00deff3
@@ -77,10 +77,12 @@ namespace Tizen.System
     /// http://tizen.org/privilege/haptic
     /// For controlling the sound, privilege is not needed.
     /// </privilege>
+    /// <example>
     /// <code>
     /// Feedback feedback = new Feedback();
     /// bool res = feedback.IsSupportedPattern(FeedbackType.Vibration, "Tap");
     /// </code>
+    /// </example>
     public class Feedback
     {
         private const string LogTag = "Tizen.System.Feedback";
old mode 100644 (file)
new mode 100755 (executable)
index 48ad66b..a81bc6b
@@ -133,6 +133,7 @@ namespace Tizen.System
         /// CapacityChanged is triggered when the battery charge percentage is changed.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <example>
         /// <code>
         /// public static async Task BatteryEventHandler()
         /// {
@@ -143,8 +144,9 @@ namespace Tizen.System
         ///     }
         ///     Battery.PercentChanged += handler;
         ///     await Task.Delay(20000);
-        ///  }
+        /// }
         ///  </code>
+        /// </example>
         public static event EventHandler<BatteryPercentChangedEventArgs> PercentChanged
         {
             add
@@ -177,6 +179,7 @@ namespace Tizen.System
         /// LevelChanged is triggered when the battery level is changed.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <example>
         /// <code>
         /// public static async Task BatteryEventHandler()
         /// {
@@ -187,8 +190,9 @@ namespace Tizen.System
         ///     }
         ///     Battery.LevelChanged += handler;
         ///     await Task.Delay(20000);
-        ///  }
+        /// }
         /// </code>
+        /// </example>
         public static event EventHandler<BatteryLevelChangedEventArgs> LevelChanged
         {
             add
@@ -221,6 +225,7 @@ namespace Tizen.System
         /// This event is triggered when the charger is connected/disconnected.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <example>
         /// <code>
         /// public static async Task BatteryEventHandler()
         /// {
@@ -231,8 +236,9 @@ namespace Tizen.System
         ///     }
         ///     Battery.ChargingStateChanged += handler;
         ///     await Task.Delay(20000);
-        ///  }
+        /// }
         /// </code>
+        /// </example>
         public static event EventHandler<BatteryChargingStateChangedEventArgs> ChargingStateChanged
         {
             add
old mode 100644 (file)
new mode 100755 (executable)
index 3b051c3..4533185
@@ -54,10 +54,12 @@ namespace Tizen.System
     /// <privilege>
     /// http://tizen.org/privilege/display
     /// </privilege>
+    /// <example>
     /// <code>
     ///     Console.WriteLine("Display current state is: {0}", Tizen.System.Display.State);
     ///     Console.WriteLine("Total number of Displays are: {0}", Tizen.System.Display.NumberOfDisplays);
     /// </code>
+    /// </example>
     public class Display
     {
         private readonly int _displayId;
@@ -115,10 +117,12 @@ namespace Tizen.System
         /// The maximum brightness value that can be set for the specific display.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <example>
         /// <code>
         ///     Display display = Display.Displays[0];
         ///     Console.WriteLine("Display MaxBrightness is: {0}", display.MaxBrightness);
         /// </code>
+        /// </example>
         public int MaxBrightness
         {
             get
@@ -142,10 +146,12 @@ namespace Tizen.System
         /// <since_tizen> 3 </since_tizen>
         /// <exception cref="ArgumentException">When an invalid parameter value is set.</exception>
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
+        /// <example>
         /// <code>
         ///     Display display = Display.Displays[0];
         ///     Console.WriteLine("Display current Brightness is: {0}", display.Brightness);
         /// </code>
+        /// </example>
         public int Brightness
         {
             get
@@ -191,6 +197,7 @@ namespace Tizen.System
         ///  StateChanged is raised when the state of the display is changed.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <example>
         /// <code>
         /// public static async Task DisplayEventHandler()
         /// {
@@ -201,8 +208,9 @@ namespace Tizen.System
         ///     }
         ///     Battery.StateChanged += handler;
         ///     await Task.Delay(20000);
-        ///  }
+        /// }
         /// </code>
+        /// </example>
         public static event EventHandler<DisplayStateChangedEventArgs> StateChanged
         {
             add
old mode 100644 (file)
new mode 100755 (executable)
index 7b1fd87..38374df
@@ -29,9 +29,11 @@ namespace Tizen.System
     /// <privilege>
     /// http://tizen.org/privilege/haptic
     /// </privilege>
+    /// <example>
     /// <code>
     ///     Console.WriteLine("Total number of Vibrators are: {0}", Tizen.System.Vibrator.NumberOfVibrators);
     /// </code>
+    /// </example>
     public class Vibrator : IDisposable
     {
         private readonly int _vibratorId;
@@ -118,6 +120,7 @@ namespace Tizen.System
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///     Vibrator vibrator = Vibrator.Vibrators[0];
         ///     try
@@ -128,6 +131,7 @@ namespace Tizen.System
         ///     {
         ///     }
         /// </code>
+        /// </example>
 
         public void Vibrate(int duration, int feedback)
         {
@@ -157,6 +161,7 @@ namespace Tizen.System
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///     Vibrator vibrator = Vibrator.Vibrators[0];
         ///     try
@@ -167,6 +172,7 @@ namespace Tizen.System
         ///     {
         ///     }
         /// </code>
+        /// </example>
         public void Stop()
         {
             if (_hapticHandle != IntPtr.Zero)
old mode 100644 (file)
new mode 100755 (executable)
index d8e79d4..efd8664
@@ -27,9 +27,11 @@ namespace Tizen.System
     /// <privilege>
     /// http://tizen.org/privilege/use_ir
     /// </privilege>
+    /// <example>
     /// <code>
     ///     Console.WriteLine("IR availability for this device is: {0}", IR.IsAvailable);
     /// </code>
+    /// </example>
     public static class IR
     {
         /// <summary>
@@ -64,6 +66,7 @@ namespace Tizen.System
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///    try
         ///    {
@@ -76,6 +79,7 @@ namespace Tizen.System
         ///    {
         ///    }
         /// </code>
+        /// </example>
         public static void Transmit(int carrierFreequency, IList<int> pattern)
         {
             int[] patternArray = pattern.ToArray();
old mode 100644 (file)
new mode 100755 (executable)
index 7d00ca8..bcc0d2f
@@ -34,10 +34,12 @@ namespace Tizen.System
     /// <privilege>
     ///  http://tizen.org/privilege/led
     /// </privilege>
+    /// <example>
     /// <code>
     ///     Console.WriteLine("Led MaxBrightness is: {0}", Tizen.System.Led.MaxBrightness);
     ///     Console.WriteLine("Led current Brightness is: {0}", Tizen.System.Led.Brightness);
     /// </code>
+    /// </example>
     public static class Led
     {
         /// <summary>
@@ -73,11 +75,13 @@ namespace Tizen.System
         /// <exception cref="ArgumentException"> When an invalid parameter value is set.</exception>
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///     Console.WriteLine("Led current Brightness is: {0}", Tizen.System.Led.Brightness);
         ///     Tizen.System.Led.Brightness = 50;
         ///     Console.WriteLine("Led current Brightness is: {0}", Tizen.System.Led.Brightness);
         /// </code>
+        /// </example>
 
         public static int Brightness
         {
@@ -115,6 +119,7 @@ namespace Tizen.System
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///     try
         ///     {
@@ -124,6 +129,7 @@ namespace Tizen.System
         ///     {
         ///     }
         /// </code>
+        /// </example>
         public static void Play(int on, int off, Color color)
         {
             //looks like only blink option is supported. So hard coded to default blink option.
@@ -141,6 +147,7 @@ namespace Tizen.System
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
         /// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+        /// <example>
         /// <code>
         ///     try
         ///     {
@@ -152,6 +159,7 @@ namespace Tizen.System
         ///     {
         ///     }
         /// </code>
+        /// </example>
 
         public static void Stop()
         {
old mode 100644 (file)
new mode 100755 (executable)
index bc0c589..4c8c526
@@ -45,9 +45,11 @@ namespace Tizen.System
         /// <exception cref="ArgumentException">When an invalid parameter value is set.</exception>
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
+        /// <example>
         /// <code>
         /// Tizen.System.Power.RequestCpuLock(2000);
         /// </code>
+        /// </example>
 
         public static void RequestCpuLock(int timeout)
         {
@@ -63,9 +65,11 @@ namespace Tizen.System
         /// <since_tizen> 3 </since_tizen>
         /// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
         /// <exception cref="InvalidOperationException">In case of any system error.</exception>
+        /// <example>
         /// <code>
         /// Tizen.System.Power.ReleaseCpuLock();
         /// </code>
+        /// </example>
         public static void ReleaseCpuLock()
         {
             DeviceError res = (DeviceError)Interop.Device.DevicePowerReleaseLock(0);