private static SearchResult GenerateVisualPropertySearchResult(View view, VisualPropertyData data) { var propertyIntPtr = Interop.View.GetVisualProperty(view.SwigCPtr, data.ViewPropertyIndex, data.VisualPropertyIndex); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } var property = new Property(propertyIntPtr, true); if (property.propertyIndex == Property.InvalidIndex) { property.Dispose(); return(data.RelatedData == null ? null : GenerateVisualPropertySearchResult(view, data.RelatedData)); } SearchResult result = new SearchResult(property, data.ObjectConverter, data.PropertyValueConverter); if (data.RelatedData != null) { result.NextResult = GenerateVisualPropertySearchResult(view, data.RelatedData); } return(result); }
/// <summary> /// Adds a property notification to this object. /// </summary> /// <param name="property">The name of the property.</param> /// <param name="condition">The notification will be triggered when this condition is satisfied.</param> /// <returns>A handle to the newly created PropertyNotification.</returns> /// <since_tizen> 4 </since_tizen> public PropertyNotification AddPropertyNotification(string property, PropertyCondition condition) { Property properties = PropertyHelper.GetPropertyFromString(this, property); PropertyNotification ret = new PropertyNotification(Interop.Handle.AddPropertyNotification(swigCPtr, properties.propertyIndex, PropertyCondition.getCPtr(condition)), true); properties.Dispose(); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
/// <summary> /// Dispose /// </summary> protected override void Dispose(DisposeTypes type) { if (disposed) { return; } if (type == DisposeTypes.Explicit) { Property.Dispose(); NextResult?.Dispose(); } base.Dispose(type); }
private static SearchResult SearchProperty(View view, string lowercasePropertyString) { Property property = new Property(view, lowercasePropertyString); if (property.propertyIndex == Property.InvalidIndex) { property.Dispose(); return(null); } OOConverter converter = null; if (view.GetPropertyType(property.propertyIndex).Equals(PropertyType.Float)) { converter = ObjectIntToFloat; } return(new SearchResult(property, converter)); }