From 2cd1e1250ee5add894c77b5d28909e274a420245 Mon Sep 17 00:00:00 2001 From: hsgwon Date: Mon, 5 Aug 2019 17:06:51 +0900 Subject: [PATCH] [MediaController] Add constructor of MediaControlSearchCondition (#952) --- .../MediaControlSearchCondition.cs | 52 +++++++++++++++---- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/src/Tizen.Multimedia.Remoting/MediaController/MediaControlSearchCondition.cs b/src/Tizen.Multimedia.Remoting/MediaController/MediaControlSearchCondition.cs index ba75ec8a0..efc3b4994 100644 --- a/src/Tizen.Multimedia.Remoting/MediaController/MediaControlSearchCondition.cs +++ b/src/Tizen.Multimedia.Remoting/MediaController/MediaControlSearchCondition.cs @@ -29,31 +29,44 @@ namespace Tizen.Multimedia.Remoting /// 5 public class MediaControlSearchCondition { + /// + /// Initializes a new instance of the class. + /// + /// + /// The will be set internally by . + /// + /// The search type. + /// The search keyword. + /// is not valid. + /// is null. + /// 6 + public MediaControlSearchCondition(MediaControlContentType type, string keyword) + : this(type, MediaControlSearchCategory.All, keyword, null) + { + } + /// /// Initializes a new instance of the class. /// /// The search type. /// The search category. /// The search keyword. - /// The extra data. /// /// or is not valid. /// /// is null. - /// 5 - public MediaControlSearchCondition(MediaControlContentType type, MediaControlSearchCategory category, - string keyword, Bundle bundle) - : this (type, keyword, bundle) + /// 6 + public MediaControlSearchCondition(MediaControlContentType type, MediaControlSearchCategory category, string keyword) + : this (type, category, keyword, null) { - ValidationUtil.ValidateEnum(typeof(MediaControlSearchCategory), category, nameof(category)); - - Category = category; } /// /// Initializes a new instance of the class. /// - /// The will be set internally by . + /// + /// The will be set internally by . + /// /// The search type. /// The search keyword. /// The extra data. @@ -61,10 +74,29 @@ namespace Tizen.Multimedia.Remoting /// is null. /// 5 public MediaControlSearchCondition(MediaControlContentType type, string keyword, Bundle bundle) + : this(type, MediaControlSearchCategory.All, keyword, bundle) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The search type. + /// The search category. + /// The search keyword. + /// The extra data. + /// + /// or is not valid. + /// + /// is null. + /// 5 + public MediaControlSearchCondition(MediaControlContentType type, MediaControlSearchCategory category, + string keyword, Bundle bundle) { + ValidationUtil.ValidateEnum(typeof(MediaControlSearchCategory), category, nameof(category)); ValidationUtil.ValidateEnum(typeof(MediaControlContentType), type, nameof(type)); - Category = MediaControlSearchCategory.All; + Category = category; ContentType = type; Keyword = keyword ?? throw new ArgumentNullException(nameof(keyword)); Bundle = bundle; -- 2.34.1