while (parent)
{
root = parent;
- parent = parent.GetParent() as View;
+ parent = parent?.GetParent() as View;
}
return root;
if (item == null) return;
if (item == Header)
{
- item.Hide();
+ item?.Hide();
return;
}
if (item == Footer)
public void OnActive()
{
- if (null != childOp)
+ if (null != childOp && childOp.ValueList[0] is Instance valueList0)
{
- int instanceIndex = (childOp.ValueList[0] as Instance).Index;
+ int instanceIndex = valueList0.Index;
string propertyName = childOp.ValueList[1] as string;
globalDataList.Operations.Add(new GetObjectByProperty(globalDataList, instanceIndex, propertyName));
}
BindableObject bindableObject = globalDataList.GatheredInstances[instanceIndex] as BindableObject;
var property = globalDataList.GatheredBindableProperties[bindablePropertyIndex];
var value = globalDataList.GatheredInstances[valueIndex] as BindingBase;
- bindableObject?.SetBinding(property, value);
+ if (value != null)
+ {
+ bindableObject?.SetBinding(property, value);
+ }
}
private int instanceIndex;
foreach (Tuple<object, MethodInfo> tuple in toRaise)
{
- tuple.Item2.Invoke(tuple.Item1, new[] { sender, args });
+ tuple.Item2?.Invoke(tuple.Item1, new[] { sender, args });
}
}