throw new ArgumentNullException(nameof(viewType));
}
+ var viewTypeString = viewType.ToString();
+ if (null == viewTypeString)
+ {
+ throw new ArgumentNullException(viewTypeString);
+ }
+
// add the mapping between the view name and it's create function
- constructorMap.Add(viewType.ToString(), createFunction);
+ constructorMap.Add(viewTypeString, createFunction);
// Call into DALi C++ to register the control with the type registry
- TypeRegistration.RegisterControl(viewType.ToString(), createCallback);
+ TypeRegistration.RegisterControl(viewTypeString, createCallback);
// Cycle through each property in the class
foreach (System.Reflection.PropertyInfo propertyInfo in viewType.GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public))
ScriptableProperty scriptableProp = attr as ScriptableProperty;
// we get the start property index, based on the type and it's hierarchy, e.g. DateView (70,000)-> Spin (60,000) -> View (50,000)
- int propertyIndex = propertyRangeManager.GetPropertyIndex(viewType.ToString(), viewType, scriptableProp.type);
+ int propertyIndex = propertyRangeManager.GetPropertyIndex(viewTypeString, viewType, scriptableProp.type);
// get the enum for the property type... E.g. registering a string property returns Tizen.NUI.PropertyType.String
Tizen.NUI.PropertyType propertyType = GetDaliPropertyType(propertyInfo.PropertyType.Name);
// Example RegisterProperty("spin","maxValue", 50001, FLOAT, set, get );
// Native call to register the property
- TypeRegistration.RegisterProperty(viewType.ToString(), propertyInfo.Name, propertyIndex, propertyType, setPropertyCallback, getPropertyCallback);
+ TypeRegistration.RegisterProperty(viewTypeString, propertyInfo.Name, propertyIndex, propertyType, setPropertyCallback, getPropertyCallback);
}
}
NUILog.Debug("property name = " + propertyInfo.Name);