if (node != null)
{
IXamlTypeResolver = new XamlTypeResolver(node.NamespaceResolver, XamlParser.GetElementType,
- context?.RootElement.GetType().GetTypeInfo().Assembly);
+ context?.RootElement?.GetType().GetTypeInfo().Assembly);
Add(typeof(IReferenceProvider), new ReferenceProvider(node));
}
internal IProvideValueTarget IProvideValueTarget
{
- get { return (IProvideValueTarget)GetService(typeof (IProvideValueTarget)); }
- set { services[typeof (IProvideValueTarget)] = value; }
+ get { return (IProvideValueTarget)GetService(typeof(IProvideValueTarget)); }
+ set { services[typeof(IProvideValueTarget)] = value; }
}
internal IXamlTypeResolver IXamlTypeResolver
{
- get { return (IXamlTypeResolver)GetService(typeof (IXamlTypeResolver)); }
- set { services[typeof (IXamlTypeResolver)] = value; }
+ get { return (IXamlTypeResolver)GetService(typeof(IXamlTypeResolver)); }
+ set { services[typeof(IXamlTypeResolver)] = value; }
}
internal IRootObjectProvider IRootObjectProvider
{
- get { return (IRootObjectProvider)GetService(typeof (IRootObjectProvider)); }
- set { services[typeof (IRootObjectProvider)] = value; }
+ get { return (IRootObjectProvider)GetService(typeof(IRootObjectProvider)); }
+ set { services[typeof(IRootObjectProvider)] = value; }
}
internal IXmlLineInfoProvider IXmlLineInfoProvider
{
- get { return (IXmlLineInfoProvider)GetService(typeof (IXmlLineInfoProvider)); }
- set { services[typeof (IXmlLineInfoProvider)] = value; }
+ get { return (IXmlLineInfoProvider)GetService(typeof(IXmlLineInfoProvider)); }
+ set { services[typeof(IXmlLineInfoProvider)] = value; }
}
internal INameScopeProvider INameScopeProvider
{
- get { return (INameScopeProvider)GetService(typeof (INameScopeProvider)); }
- set { services[typeof (INameScopeProvider)] = value; }
+ get { return (INameScopeProvider)GetService(typeof(INameScopeProvider)); }
+ set { services[typeof(INameScopeProvider)] = value; }
}
internal IValueConverterProvider IValueConverterProvider
{
- get { return (IValueConverterProvider)GetService(typeof (IValueConverterProvider)); }
- set { services[typeof (IValueConverterProvider)] = value; }
+ get { return (IValueConverterProvider)GetService(typeof(IValueConverterProvider)); }
+ set { services[typeof(IValueConverterProvider)] = value; }
}
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("SimpleValueTargetProvider(object[] objectAndParents) is obsolete as of version 2.3.4. Please use SimpleValueTargetProvider(object[] objectAndParents, object targetProperty) instead.")]
- public SimpleValueTargetProvider(object[] objectAndParents) : this (objectAndParents, null)
+ public SimpleValueTargetProvider(object[] objectAndParents) : this(objectAndParents, null)
{
}
if (objectAndParents == null)
throw new ArgumentNullException(nameof(objectAndParents));
if (objectAndParents.Length == 0)
- throw new ArgumentException();
+ throw new ArgumentException(nameof(objectAndParents.Length));
this.objectAndParents = objectAndParents;
this.targetProperty = targetProperty;
[EditorBrowsable(EditorBrowsableState.Never)]
public object FindByName(string name)
{
- for (var i = 0; i < objectAndParents.Length; i++) {
- var bo = objectAndParents[i] as BindableObject;
- if (bo == null) continue;
- var ns = NameScope.GetNameScope(bo) as INameScope;
- if (ns == null) continue;
- var value = ns.FindByName(name);
- if (value != null)
- return value;
+ for (var i = 0; i < objectAndParents.Length; i++)
+ {
+ var bo = objectAndParents[i] as BindableObject;
+ if (bo == null) continue;
+ var ns = NameScope.GetNameScope(bo) as INameScope;
+ if (ns == null) continue;
+ var value = ns.FindByName(name);
+ if (value != null)
+ return value;
}
return null;
}
{
this.currentAssembly = currentAssembly;
if (namespaceResolver == null)
- throw new ArgumentNullException();
+ throw new ArgumentNullException(nameof(namespaceResolver));
if (getTypeFromXmlName == null)
- throw new ArgumentNullException();
+ throw new ArgumentNullException(nameof(getTypeFromXmlName));
this.namespaceResolver = namespaceResolver;
this.getTypeFromXmlName = getTypeFromXmlName;
IXmlLineInfo xmlLineInfo = null;
if (serviceProvider != null)
{
- var lineInfoProvider = serviceProvider.GetService(typeof (IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+ var lineInfoProvider = serviceProvider.GetService(typeof(IXmlLineInfoProvider)) as IXmlLineInfoProvider;
if (lineInfoProvider != null)
xmlLineInfo = lineInfoProvider.XmlLineInfo;
}
{
var n = _node;
object value = null;
- while (n != null) {
+ while (n != null)
+ {
if ((value = (n as IElementNode)?.Namescope?.FindByName(name)) != null)
return value;
n = n.Parent;
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete]
+ [ObsoleteAttribute(" ", false)]
public class NameScopeProvider : INameScopeProvider
{
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
namespaces.Add(prefix, ns);
}
}
-}
\ No newline at end of file
+}