[NUI] Fix SVACE issue, 3rd trial (#267)
authordongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 25 May 2018 04:44:33 +0000 (13:44 +0900)
committerGitHub <noreply@github.com>
Fri, 25 May 2018 04:44:33 +0000 (13:44 +0900)
src/Tizen.NUI/src/internal/Xaml/ExpandMarkupsVisitor.cs
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticResourceExtension.cs
src/Tizen.NUI/src/public/Property.cs

index 70d28cf..6e5c172 100755 (executable)
@@ -154,7 +154,7 @@ namespace Tizen.NUI.Xaml
                                }
 
                                var namespaceuri = nsResolver.LookupNamespace(prefix) ?? "";
-                               var xmltype = new XmlType(namespaceuri, type.Name, null);
+                               var xmltype = new XmlType(namespaceuri, type?.Name, null);
 
                                if (type == null)
                                        throw new NotSupportedException();
index 39d7e55..a235727 100755 (executable)
@@ -51,8 +51,8 @@ namespace Tizen.NUI.Xaml
                        }
                        if (propertyType.IsAssignableFrom(resource?.GetType()))
                                return resource;
-                       var implicit_op =  resource.GetType().GetImplicitConversionOperator(fromType: resource.GetType(), toType: propertyType)
-                                                       ?? propertyType.GetImplicitConversionOperator(fromType: resource.GetType(), toType: propertyType);
+                       var implicit_op =  resource?.GetType().GetImplicitConversionOperator(fromType: resource?.GetType(), toType: propertyType)
+                                                       ?? propertyType.GetImplicitConversionOperator(fromType: resource?.GetType(), toType: propertyType);
                        if (implicit_op != null)
                                return implicit_op.Invoke(resource, new [] { resource });
 
@@ -68,7 +68,7 @@ namespace Tizen.NUI.Xaml
 
                                if (opImplicit != null) {
                                        //convert the OnPlatform<T> to T
-                                       var opPlatformImplicitConversionOperator = resource.GetType().GetImplicitConversionOperator(fromType: resource.GetType(), toType: tType);
+                                       var opPlatformImplicitConversionOperator = resource?.GetType().GetImplicitConversionOperator(fromType: resource?.GetType(), toType: tType);
                                        resource = opPlatformImplicitConversionOperator?.Invoke(null, new[] { resource });
 
                                        //and convert to toType
index 4b1ca2f..d334486 100755 (executable)
@@ -1884,7 +1884,7 @@ namespace Tizen.NUI
                 }
                 else if (value.GetType().Equals(typeof(string)))
                 {
-                    KeyString = (string)value;
+                    KeyString = value.ToString();
                 }
                 KeyInt = (int)value;
             }