From 00a016e1b32c99dde40327a599e2ed7ed4456644 Mon Sep 17 00:00:00 2001 From: Jiyong Min Date: Wed, 15 Mar 2017 14:09:20 +0900 Subject: [PATCH] [MetadataEditor/MetadataExtractor/ThumbnailExtractor] Apply C# coding rule Change-Id: I473fabbaeabe60395bae50de50fe2e40eb815a87 Signed-off-by: Jiyong Min --- src/Tizen.Multimedia/MetadataEditor/MetadataEditor.cs | 15 +++++++++++++++ src/Tizen.Multimedia/MetadataExtractor/Artwork.cs | 2 ++ .../MetadataExtractor/MetadataExtractor.cs | 2 +- src/Tizen.Multimedia/MetadataExtractor/Synclyrics.cs | 4 +++- .../ThumbnailExtractor/ThumbnailExtractor.cs | 3 ++- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/Tizen.Multimedia/MetadataEditor/MetadataEditor.cs b/src/Tizen.Multimedia/MetadataEditor/MetadataEditor.cs index 83175ee..ea67a8f 100755 --- a/src/Tizen.Multimedia/MetadataEditor/MetadataEditor.cs +++ b/src/Tizen.Multimedia/MetadataEditor/MetadataEditor.cs @@ -47,6 +47,7 @@ namespace Tizen.Multimedia { throw new ObjectDisposedException(nameof(MetadataEditor)); } + return _handle; } } @@ -114,6 +115,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.Artist); } + set { SetParam(MetadataEditorAttr.Artist, value); @@ -129,6 +131,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.Title); } + set { SetParam(MetadataEditorAttr.Title, value); @@ -144,6 +147,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.Album); } + set { SetParam(MetadataEditorAttr.Album, value); @@ -159,6 +163,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.Genre); } + set { SetParam(MetadataEditorAttr.Genre, value); @@ -174,6 +179,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.Author); } + set { SetParam(MetadataEditorAttr.Author, value); @@ -189,6 +195,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.Copyright); } + set { SetParam(MetadataEditorAttr.Copyright, value); @@ -208,6 +215,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.Date); } + set { SetParam(MetadataEditorAttr.Date, value); @@ -223,6 +231,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.Description); } + set { SetParam(MetadataEditorAttr.Description, value); @@ -238,6 +247,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.Comment); } + set { SetParam(MetadataEditorAttr.Comment, value); @@ -253,6 +263,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.TrackNumber); } + set { SetParam(MetadataEditorAttr.TrackNumber, value); @@ -279,6 +290,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.Conductor); } + set { SetParam(MetadataEditorAttr.Conductor, value); @@ -294,6 +306,7 @@ namespace Tizen.Multimedia { return GetParam(MetadataEditorAttr.UnsyncLyrics); } + set { SetParam(MetadataEditorAttr.UnsyncLyrics, value); @@ -407,11 +420,13 @@ namespace Tizen.Multimedia { // To be used if there are any other disposable objects } + if (_handle != IntPtr.Zero) { Interop.MetadataEditor.Destroy(_handle); _handle = IntPtr.Zero; } + _disposed = true; } } diff --git a/src/Tizen.Multimedia/MetadataExtractor/Artwork.cs b/src/Tizen.Multimedia/MetadataExtractor/Artwork.cs index da76853..de79fd9 100755 --- a/src/Tizen.Multimedia/MetadataExtractor/Artwork.cs +++ b/src/Tizen.Multimedia/MetadataExtractor/Artwork.cs @@ -24,6 +24,8 @@ namespace Tizen.Multimedia /// /// Initialize a new instance of the Artwork class with the specified data and mimeType. /// + /// The data of the artwork to set metadata. + /// The mime type of the data of the artwork. public Artwork(byte[] data, string mimeType) { Data = data; diff --git a/src/Tizen.Multimedia/MetadataExtractor/MetadataExtractor.cs b/src/Tizen.Multimedia/MetadataExtractor/MetadataExtractor.cs index 4a278fa..fa0729a 100755 --- a/src/Tizen.Multimedia/MetadataExtractor/MetadataExtractor.cs +++ b/src/Tizen.Multimedia/MetadataExtractor/MetadataExtractor.cs @@ -64,7 +64,7 @@ namespace Tizen.Multimedia throw new ArgumentNullException(nameof(path)); } - Create(()=> Interop.MetadataExtractor.SetPath(_handle, path)); + Create(() => Interop.MetadataExtractor.SetPath(_handle, path)); } /// diff --git a/src/Tizen.Multimedia/MetadataExtractor/Synclyrics.cs b/src/Tizen.Multimedia/MetadataExtractor/Synclyrics.cs index 620b251..c9f78b5 100755 --- a/src/Tizen.Multimedia/MetadataExtractor/Synclyrics.cs +++ b/src/Tizen.Multimedia/MetadataExtractor/Synclyrics.cs @@ -20,10 +20,12 @@ namespace Tizen.Multimedia /// Represents synchronized lyrics information of media. /// public class SyncLyrics - { + { /// /// Initialize a new instance of the MetadataExtractor class with the specified lyrics and timestamp. /// + /// The text of synclyrics to set. + /// The timestamp of synclyrics to set. public SyncLyrics(string lyrics, uint timestamp) { Lyrics = lyrics; diff --git a/src/Tizen.Multimedia/ThumbnailExtractor/ThumbnailExtractor.cs b/src/Tizen.Multimedia/ThumbnailExtractor/ThumbnailExtractor.cs index 7691830..2ccaf7e 100755 --- a/src/Tizen.Multimedia/ThumbnailExtractor/ThumbnailExtractor.cs +++ b/src/Tizen.Multimedia/ThumbnailExtractor/ThumbnailExtractor.cs @@ -187,7 +187,7 @@ namespace Tizen.Multimedia } else { - task.SetException(new InvalidOperationException("["+ error +"] Fail to create thumbnail")); + task.SetException(new InvalidOperationException("[" + error + "] Fail to create thumbnail")); } }; @@ -226,6 +226,7 @@ namespace Tizen.Multimedia Interop.ThumbnailExtractor.Destroy(_handle); _handle = IntPtr.Zero; } + _disposed = true; } } -- 2.7.4