[NUI][Xaml] Remove unused method
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / XamlBinding / BindingExpression.cs
index e6df866..a239617 100755 (executable)
@@ -1,4 +1,20 @@
-using System;
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Diagnostics;
@@ -137,7 +153,7 @@ namespace Tizen.NUI.Binding
                 {
                     if ((needsGetter && part.LastGetter == null) || (needsSetter && part.NextPart == null && part.LastSetter == null))
                     {
-                        Console.WriteLine("Binding", PropertyNotFoundErrorMessage, part.Content, current, target.GetType(), property.PropertyName);
+                        Console.WriteLine("Binding, " + PropertyNotFoundErrorMessage, part.Content, current, target.GetType(), property.PropertyName);
                         break;
                     }
                 }
@@ -166,11 +182,11 @@ namespace Tizen.NUI.Binding
 
                 if (!TryConvert(ref value, property.ReturnType, true))
                 {
-                    Console.WriteLine("Binding", "{0} can not be converted to type '{1}'", value, property.ReturnType);
+                    Console.WriteLine($"Binding : {value} can not be converted to type {property.ReturnType}");
                     return;
                 }
 
-                target.SetValueCore(property, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted, false);
+                target.SetValueCore(property, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted);
             }
             else if (needsSetter && part.LastSetter != null && current != null)
             {
@@ -178,7 +194,7 @@ namespace Tizen.NUI.Binding
 
                 if (!TryConvert(ref value, part.SetterType, false))
                 {
-                    Console.WriteLine("Binding", "{0} can not be converted to type '{1}'", value, part.SetterType);
+                    Console.WriteLine($"Binding : {value} can not be converted to type {part.SetterType}");
                     return;
                 }
 
@@ -205,7 +221,7 @@ namespace Tizen.NUI.Binding
         IEnumerable<BindingExpressionPart> GetPart(string part)
         {
             part = part.Trim();
-            if (part == string.Empty)
+            if (string.IsNullOrEmpty(part))
                 throw new FormatException("Path contains an empty part");
 
             BindingExpressionPart indexer = null;
@@ -273,8 +289,8 @@ namespace Tizen.NUI.Binding
                 if (sourceType.IsArray)
                 {
                     int index;
-                    if (!int.TryParse(part.Content, out index))
-                        Console.WriteLine("Binding", "{0} could not be parsed as an index for a {1}", part.Content, sourceType);
+                    if (!int.TryParse(part.Content, NumberStyles.Number, CultureInfo.InvariantCulture, out index))
+                        Console.WriteLine($"Binding : {part.Content} could not be parsed as an index for a {sourceType}");
                     else
                         part.Arguments = new object[] { index };