Release 10.0.0.16997
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / XamlBinding / IValueConverter.cs
1 /*
2  * Copyright(c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using System;
19 using System.Globalization;
20 using System.ComponentModel;
21
22 namespace Tizen.NUI.Binding
23 {
24     /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
25     [EditorBrowsable(EditorBrowsableState.Never)]
26     public interface IValueConverter
27     {
28         /// <summary>
29         /// Converts a value.
30         /// </summary>
31         /// <param name="value">The value produced by the binding source.</param>
32         /// <param name="targetType">The type of the binding target property.</param>
33         /// <param name="parameter">The converter parameter to use.</param>
34         /// <param name="culture">The culture to use in the converter.</param>
35         /// <returns>A converted value. If the method returns null, the valid null value is used.</returns>
36         object Convert(object value, Type targetType, object parameter, CultureInfo culture);
37
38         /// <summary>
39         /// Converts a value.
40         /// </summary>
41         /// <param name="value">The value that is produced by the binding target.</param>
42         /// <param name="targetType">The type to convert to.</param>
43         /// <param name="parameter">The converter parameter to use.</param>
44         /// <param name="culture">The culture to use in the converter.</param>
45         /// <returns>A converted value. If the method returns null, the valid null value is used.</returns>>
46         object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture);
47     }
48 }