[NUI] SVACE error fix (#258)
authordongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 18 May 2018 04:22:27 +0000 (13:22 +0900)
committerGitHub <noreply@github.com>
Fri, 18 May 2018 04:22:27 +0000 (13:22 +0900)
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticResourceExtension.cs
src/Tizen.NUI/src/internal/Xaml/XamlServiceProvider.cs
src/Tizen.NUI/src/internal/XamlBinding/Binding.cs
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/Selector.cs
src/Tizen.NUI/src/internal/XamlBinding/SynchronizedList.cs
src/Tizen.NUI/src/public/Property.cs

index 5c4384c..089395d 100755 (executable)
@@ -49,7 +49,7 @@ namespace Tizen.NUI.Xaml
                                }
                                return resource;
                        }
-                       if (propertyType.IsAssignableFrom(resource.GetType()))
+                       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);
index 7db6deb..4fb185c 100755 (executable)
@@ -20,7 +20,7 @@ namespace Tizen.NUI.Xaml
                        if (node != null)
                        {
                                IXamlTypeResolver = new XamlTypeResolver(node.NamespaceResolver, XamlParser.GetElementType,
-                                       context.RootElement.GetType().GetTypeInfo().Assembly);
+                                       context?.RootElement.GetType().GetTypeInfo().Assembly);
 
                                var enode = node;
                                while (enode != null && !(enode is IElementNode))
index a049465..a3842b1 100755 (executable)
@@ -128,7 +128,7 @@ namespace Tizen.NUI.Binding
                        if (_expression == null && bindingContext != null)
                                _expression = new BindingExpression(this, SelfPath);
 
-                       _expression.Apply(bindingContext, bindObj, targetProperty);
+                       _expression?.Apply(bindingContext, bindObj, targetProperty);
                }
 
                internal override BindingBase Clone()
index 7cc9aff..84ea66c 100755 (executable)
@@ -61,8 +61,7 @@ namespace Tizen.NUI.StyleSheets
                                case '^':                               //not in CSS spec
                                        reader.Read();
                                        var element = reader.ReadIdent();
-                                       if (element == null)
-                                       return Invalid;
+                                       if (element == null) return Invalid;
                                        setCurrentSelector(new And(), new Base(element));
                                        break;
                                case ' ':
index dfd7238..dde381a 100755 (executable)
@@ -78,7 +78,7 @@ namespace Tizen.NUI.Binding
                                        _snapshot = snap = new ReadOnlyCollection<T>(_list.ToList());
                        }
 
-                       return snap.GetEnumerator();
+                       return snap?.GetEnumerator();
                }
 
                public int IndexOf(T item)
index b245a06..4b1ca2f 100755 (executable)
@@ -1874,7 +1874,7 @@ namespace Tizen.NUI
                 }
                 if (value is string)
                 {
-                    KeyString = (string)value;
+                    KeyString = value.ToString();
                 }