[EditorBrowsable(EditorBrowsableState.Never)]
public void SetFontStyle(FontStyle fontStyle)
{
- SetValue(FontStyleProperty, TextMapHelper.GetFontStyleMap(fontStyle));
+ using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
+ {
+ SetValue(FontStyleProperty, fontStyleMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public FontStyle GetFontStyle()
{
- return TextMapHelper.GetFontStyleStruct((PropertyMap)GetValue(FontStyleProperty));
+ FontStyle fontStyle;
+ using (var fontStyleMap = (PropertyMap)GetValue(FontStyleProperty))
+ {
+ fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
+ }
+ return fontStyle;
}
/// <summary>
{
if (!String.IsNullOrEmpty(selectionHandleImage.LeftImageUrl))
{
- SetValue(SelectionHandleImageLeftProperty, TextMapHelper.GetFileNameMap(selectionHandleImage.LeftImageUrl));
+ using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.LeftImageUrl))
+ {
+ SetValue(SelectionHandleImageLeftProperty, leftImageMap);
+ }
}
if (!String.IsNullOrEmpty(selectionHandleImage.RightImageUrl))
{
- SetValue(SelectionHandleImageRightProperty, TextMapHelper.GetFileNameMap(selectionHandleImage.RightImageUrl));
+ using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.RightImageUrl))
+ {
+ SetValue(SelectionHandleImageRightProperty, rightImageMap);
+ }
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
public SelectionHandleImage GetSelectionHandleImage()
{
- return TextMapHelper.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandleImageLeftProperty), (PropertyMap)GetValue(SelectionHandleImageRightProperty));
+ SelectionHandleImage selectionHandleImage;
+ using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleImageLeftProperty))
+ using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleImageRightProperty))
+ {
+ selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
+ }
+ return selectionHandleImage;
}
/// <summary>
{
if (!String.IsNullOrEmpty(selectionHandlePressedImage.LeftImageUrl))
{
- SetValue(SelectionHandlePressedImageLeftProperty, TextMapHelper.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl));
+ using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl))
+ {
+ SetValue(SelectionHandlePressedImageLeftProperty, leftImageMap);
+ }
}
if (!String.IsNullOrEmpty(selectionHandlePressedImage.RightImageUrl))
{
- SetValue(SelectionHandlePressedImageRightProperty, TextMapHelper.GetFileNameMap(selectionHandlePressedImage.RightImageUrl));
+ using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.RightImageUrl))
+ {
+ SetValue(SelectionHandlePressedImageRightProperty, rightImageMap);
+ }
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
public SelectionHandleImage GetSelectionHandlePressedImage()
{
- return TextMapHelper.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty), (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty));
+ SelectionHandleImage selectionHandleImage;
+ using (var leftImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty))
+ using (var rightImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty))
+ {
+ selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
+ }
+ return selectionHandleImage;
}
/// <summary>
{
if (!String.IsNullOrEmpty(selectionHandleMarkerImage.LeftImageUrl))
{
- SetValue(SelectionHandleMarkerImageLeftProperty, TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl));
+ using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl))
+ {
+ SetValue(SelectionHandleMarkerImageLeftProperty, leftImageMap);
+ }
}
if (!String.IsNullOrEmpty(selectionHandleMarkerImage.RightImageUrl))
{
- SetValue(SelectionHandleMarkerImageRightProperty, TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl));
+ using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl))
+ {
+ SetValue(SelectionHandleMarkerImageRightProperty, rightImageMap);
+ }
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
public SelectionHandleImage GetSelectionHandleMarkerImage()
{
- return TextMapHelper.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty), (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty));
+ SelectionHandleImage selectionHandleImage;
+ using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty))
+ using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty))
+ {
+ selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
+ }
+ return selectionHandleImage;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetInputFontStyle(FontStyle fontStyle)
{
- SetValue(InputFontStyleProperty, TextMapHelper.GetFontStyleMap(fontStyle));
+ using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
+ {
+ SetValue(InputFontStyleProperty, fontStyleMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public FontStyle GetInputFontStyle()
{
- return TextMapHelper.GetFontStyleStruct((PropertyMap)GetValue(InputFontStyleProperty));
+ FontStyle fontStyle;
+ using (var fontStyleMap = (PropertyMap)GetValue(InputFontStyleProperty))
+ {
+ fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
+ }
+ return fontStyle;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetUnderline(Underline underline)
{
- SetValue(UnderlineProperty, TextMapHelper.GetUnderlineMap(underline));
+ using (var underlineMap = TextMapHelper.GetUnderlineMap(underline))
+ {
+ SetValue(UnderlineProperty, underlineMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Underline GetUnderline()
{
- return TextMapHelper.GetUnderlineStruct((PropertyMap)GetValue(UnderlineProperty));
+ Underline underline;
+ using (var underlineMap = (PropertyMap)GetValue(UnderlineProperty))
+ {
+ underline = TextMapHelper.GetUnderlineStruct(underlineMap);
+ }
+ return underline;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetShadow(Tizen.NUI.Text.Shadow shadow)
{
- SetValue(ShadowProperty, TextMapHelper.GetShadowMap(shadow));
+ using (var shadowMap = TextMapHelper.GetShadowMap(shadow))
+ {
+ SetValue(ShadowProperty, shadowMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Tizen.NUI.Text.Shadow GetShadow()
{
- return TextMapHelper.GetShadowStruct((PropertyMap)GetValue(ShadowProperty));
+ Tizen.NUI.Text.Shadow shadow;
+ using (var shadowMap = (PropertyMap)GetValue(ShadowProperty))
+ {
+ shadow = TextMapHelper.GetShadowStruct(shadowMap);
+ }
+ return shadow;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetOutline(Outline outline)
{
- SetValue(OutlineProperty, TextMapHelper.GetOutlineMap(outline));
+ using (var outlineMap = TextMapHelper.GetOutlineMap(outline))
+ {
+ SetValue(OutlineProperty, outlineMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Outline GetOutline()
{
- return TextMapHelper.GetOutlineStruct((PropertyMap)GetValue(OutlineProperty));
+ Outline outline;
+ using (var outlineMap = (PropertyMap)GetValue(OutlineProperty))
+ {
+ outline = TextMapHelper.GetOutlineStruct(outlineMap);
+ }
+ return outline;
}
/// <summary>
{
get
{
- int temp = 0;
- GetProperty(TextEditor.Property.LineCount).Get(out temp);
- return temp;
+ int lineCount = 0;
+ using (var propertyValue = GetProperty(TextEditor.Property.LineCount))
+ {
+ propertyValue.Get(out lineCount);
+ }
+ return lineCount;
}
}
{
get
{
- string temp;
- GetProperty(TextEditor.Property.SelectedText).Get(out temp);
- return temp;
+ string selectedText;
+ using (var propertyValue = GetProperty(TextEditor.Property.SelectedText))
+ {
+ propertyValue.Get(out selectedText);
+ }
+ return selectedText;
}
}
{
get
{
- int temp;
- GetProperty(TextEditor.Property.SelectedTextStart).Get(out temp);
- return temp;
+ int selectedTextStart;
+ using (var propertyValue = GetProperty(TextEditor.Property.SelectedTextStart))
+ {
+ propertyValue.Get(out selectedTextStart);
+ }
+ return selectedTextStart;
}
}
{
get
{
- int temp;
- GetProperty(TextEditor.Property.SelectedTextEnd).Get(out temp);
- return temp;
+ int selectedTextEnd;
+ using (var propertyValue = GetProperty(TextEditor.Property.SelectedTextEnd))
+ {
+ propertyValue.Get(out selectedTextEnd);
+ }
+ return selectedTextEnd;
}
}
{
get
{
- bool temp;
- GetProperty(TextEditor.Property.EnableEditing).Get(out temp);
- return temp;
+ bool enableEditing;
+ using (var propertyValue = GetProperty(TextEditor.Property.EnableEditing))
+ {
+ propertyValue.Get(out enableEditing);
+ }
+ return enableEditing;
}
set
{
{
get
{
- int temp;
- using (PropertyValue propertyValue = GetProperty(TextEditor.Property.HorizontalScrollPosition))
+ int horizontalScrollPosition;
+ using (var propertyValue = GetProperty(TextEditor.Property.HorizontalScrollPosition))
{
- propertyValue.Get(out temp);
+ propertyValue.Get(out horizontalScrollPosition);
}
- return temp;
+ return horizontalScrollPosition;
}
set
{
- using (PropertyValue propertyValue = new PropertyValue(value))
+ using (var propertyValue = new PropertyValue(value))
{
SetProperty(TextEditor.Property.HorizontalScrollPosition, propertyValue);
NotifyPropertyChanged();
{
get
{
- int temp;
- using (PropertyValue propertyValue = GetProperty(TextEditor.Property.VerticalScrollPosition))
+ int verticalScrollPosition;
+ using (var propertyValue = GetProperty(TextEditor.Property.VerticalScrollPosition))
{
- propertyValue.Get(out temp);
+ propertyValue.Get(out verticalScrollPosition);
}
- return temp;
+ return verticalScrollPosition;
}
set
{
- using (PropertyValue propertyValue = new PropertyValue(value))
+ using (var propertyValue = new PropertyValue(value))
{
SetProperty(TextEditor.Property.VerticalScrollPosition, propertyValue);
NotifyPropertyChanged();
{
get
{
- int temp;
- using (PropertyValue propertyValue = GetProperty(TextEditor.Property.PrimaryCursorPosition))
+ int primaryCursorPosition;
+ using (var propertyValue = GetProperty(TextEditor.Property.PrimaryCursorPosition))
{
- propertyValue.Get(out temp);
+ propertyValue.Get(out primaryCursorPosition);
}
- return temp;
+ return primaryCursorPosition;
}
set
{
- using (PropertyValue propertyValue = new PropertyValue(value))
+ using (var propertyValue = new PropertyValue(value))
{
SetProperty(TextEditor.Property.PrimaryCursorPosition, propertyValue);
NotifyPropertyChanged();
/// <since_tizen> 9 </since_tizen>
public void SetInputFilter(InputFilter inputFilter)
{
- SetProperty(TextEditor.Property.InputFilter, new PropertyValue(TextMapHelper.GetInputFilterMap(inputFilter)));
+ using (var map = TextMapHelper.GetInputFilterMap(inputFilter))
+ {
+ var propertyValue = new PropertyValue(map);
+ SetProperty(TextEditor.Property.InputFilter, propertyValue);
+ propertyValue.Dispose();
+ }
}
/// <summary>
/// <since_tizen> 9 </since_tizen>
public InputFilter GetInputFilter()
{
- var map = new PropertyMap();
- GetProperty(TextEditor.Property.InputFilter).Get(map);
- return TextMapHelper.GetInputFilterStruct(map);
+ InputFilter inputFilter;
+ using (var propertyValue = GetProperty(TextEditor.Property.InputFilter))
+ {
+ var map = new PropertyMap();
+ propertyValue.Get(map);
+ inputFilter = TextMapHelper.GetInputFilterStruct(map);
+ map.Dispose();
+ }
+ return inputFilter;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetPlaceholder(Placeholder placeholder)
{
- SetValue(PlaceholderProperty, TextMapHelper.GetPlaceholderMap(placeholder));
+ using (var placeholderMap = TextMapHelper.GetPlaceholderMap(placeholder))
+ {
+ SetValue(PlaceholderProperty, placeholderMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Placeholder GetPlaceholder()
{
- return TextMapHelper.GetPlaceholderStruct((PropertyMap)GetValue(PlaceholderProperty));
+ Placeholder placeholder;
+ using (var placeholderMap = (PropertyMap)GetValue(PlaceholderProperty))
+ {
+ placeholder = TextMapHelper.GetPlaceholderStruct(placeholderMap);
+ }
+ return placeholder;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetFontStyle(FontStyle fontStyle)
{
- SetValue(FontStyleProperty, TextMapHelper.GetFontStyleMap(fontStyle));
+ using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
+ {
+ SetValue(FontStyleProperty, fontStyleMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public FontStyle GetFontStyle()
{
- return TextMapHelper.GetFontStyleStruct((PropertyMap)GetValue(FontStyleProperty));
+ FontStyle fontStyle;
+ using (var fontStyleMap = (PropertyMap)GetValue(FontStyleProperty))
+ {
+ fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
+ }
+ return fontStyle;
}
/// <summary>
{
if (!String.IsNullOrEmpty(selectionHandleImage.LeftImageUrl))
{
- SetValue(SelectionHandleImageLeftProperty, TextMapHelper.GetFileNameMap(selectionHandleImage.LeftImageUrl));
+ using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.LeftImageUrl))
+ {
+ SetValue(SelectionHandleImageLeftProperty, leftImageMap);
+ }
}
if (!String.IsNullOrEmpty(selectionHandleImage.RightImageUrl))
{
- SetValue(SelectionHandleImageRightProperty, TextMapHelper.GetFileNameMap(selectionHandleImage.RightImageUrl));
+ using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.RightImageUrl))
+ {
+ SetValue(SelectionHandleImageRightProperty, rightImageMap);
+ }
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
public SelectionHandleImage GetSelectionHandleImage()
{
- return TextMapHelper.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandleImageLeftProperty), (PropertyMap)GetValue(SelectionHandleImageRightProperty));
+ SelectionHandleImage selectionHandleImage;
+ using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleImageLeftProperty))
+ using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleImageRightProperty))
+ {
+ selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
+ }
+ return selectionHandleImage;
}
/// <summary>
{
if (!String.IsNullOrEmpty(selectionHandlePressedImage.LeftImageUrl))
{
- SetValue(SelectionHandlePressedImageLeftProperty, TextMapHelper.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl));
+ using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl))
+ {
+ SetValue(SelectionHandlePressedImageLeftProperty, leftImageMap);
+ }
}
if (!String.IsNullOrEmpty(selectionHandlePressedImage.RightImageUrl))
{
- SetValue(SelectionHandlePressedImageRightProperty, TextMapHelper.GetFileNameMap(selectionHandlePressedImage.RightImageUrl));
+ using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.RightImageUrl))
+ {
+ SetValue(SelectionHandlePressedImageRightProperty, rightImageMap);
+ }
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
public SelectionHandleImage GetSelectionHandlePressedImage()
{
- return TextMapHelper.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty), (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty));
+ SelectionHandleImage selectionHandleImage;
+ using (var leftImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty))
+ using (var rightImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty))
+ {
+ selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
+ }
+ return selectionHandleImage;
}
/// <summary>
{
if (!String.IsNullOrEmpty(selectionHandleMarkerImage.LeftImageUrl))
{
- SetValue(SelectionHandleMarkerImageLeftProperty, TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl));
+ using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl))
+ {
+ SetValue(SelectionHandleMarkerImageLeftProperty, leftImageMap);
+ }
}
if (!String.IsNullOrEmpty(selectionHandleMarkerImage.RightImageUrl))
{
- SetValue(SelectionHandleMarkerImageRightProperty, TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl));
+ using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl))
+ {
+ SetValue(SelectionHandleMarkerImageRightProperty, rightImageMap);
+ }
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
public SelectionHandleImage GetSelectionHandleMarkerImage()
{
- return TextMapHelper.GetSelectionHandleImageStruct((PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty), (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty));
+ SelectionHandleImage selectionHandleImage;
+ using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty))
+ using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty))
+ {
+ selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
+ }
+ return selectionHandleImage;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetInputFontStyle(FontStyle fontStyle)
{
- SetValue(InputFontStyleProperty, TextMapHelper.GetFontStyleMap(fontStyle));
+ using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
+ {
+ SetValue(InputFontStyleProperty, fontStyleMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public FontStyle GetInputFontStyle()
{
- return TextMapHelper.GetFontStyleStruct((PropertyMap)GetValue(InputFontStyleProperty));
+ FontStyle fontStyle;
+ using (var fontStyleMap = (PropertyMap)GetValue(InputFontStyleProperty))
+ {
+ fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
+ }
+ return fontStyle;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetUnderline(Underline underline)
{
- SetValue(UnderlineProperty, TextMapHelper.GetUnderlineMap(underline));
+ using (var underlineMap = TextMapHelper.GetUnderlineMap(underline))
+ {
+ SetValue(UnderlineProperty, underlineMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Underline GetUnderline()
{
- return TextMapHelper.GetUnderlineStruct((PropertyMap)GetValue(UnderlineProperty));
+ Underline underline;
+ using (var underlineMap = (PropertyMap)GetValue(UnderlineProperty))
+ {
+ underline = TextMapHelper.GetUnderlineStruct(underlineMap);
+ }
+ return underline;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetShadow(Tizen.NUI.Text.Shadow shadow)
{
- SetValue(ShadowProperty, TextMapHelper.GetShadowMap(shadow));
+ using (var shadowMap = TextMapHelper.GetShadowMap(shadow))
+ {
+ SetValue(ShadowProperty, shadowMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Tizen.NUI.Text.Shadow GetShadow()
{
- return TextMapHelper.GetShadowStruct((PropertyMap)GetValue(ShadowProperty));
+ Tizen.NUI.Text.Shadow shadow;
+ using (var shadowMap = (PropertyMap)GetValue(ShadowProperty))
+ {
+ shadow = TextMapHelper.GetShadowStruct(shadowMap);
+ }
+ return shadow;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetOutline(Outline outline)
{
- SetValue(OutlineProperty, TextMapHelper.GetOutlineMap(outline));
+ using (var outlineMap = TextMapHelper.GetOutlineMap(outline))
+ {
+ SetValue(OutlineProperty, outlineMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Outline GetOutline()
{
- return TextMapHelper.GetOutlineStruct((PropertyMap)GetValue(OutlineProperty));
+ Outline outline;
+ using (var outlineMap = (PropertyMap)GetValue(OutlineProperty))
+ {
+ outline = TextMapHelper.GetOutlineStruct(outlineMap);
+ }
+ return outline;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetHiddenInput(HiddenInput hiddenInput)
{
- SetValue(HiddenInputSettingsProperty, TextMapHelper.GetHiddenInputMap(hiddenInput));
+ using (var hiddenInputMap = TextMapHelper.GetHiddenInputMap(hiddenInput))
+ {
+ SetValue(HiddenInputSettingsProperty, hiddenInputMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public HiddenInput GetHiddenInput()
{
- return TextMapHelper.GetHiddenInputStruct((PropertyMap)GetValue(HiddenInputSettingsProperty));
+ HiddenInput hiddenInput;
+ using (var hiddenInputMap = (PropertyMap)GetValue(HiddenInputSettingsProperty))
+ {
+ hiddenInput = TextMapHelper.GetHiddenInputStruct(hiddenInputMap);
+ }
+ return hiddenInput;
}
/// <summary>
{
get
{
- string temp;
- GetProperty(TextField.Property.SelectedText).Get(out temp);
- return temp;
+ string selectedText;
+ using (var propertyValue = GetProperty(TextField.Property.SelectedText))
+ {
+ propertyValue.Get(out selectedText);
+ }
+ return selectedText;
}
}
{
get
{
- int temp;
- GetProperty(TextField.Property.SelectedTextStart).Get(out temp);
- return temp;
+ int selectedTextStart;
+ using (var propertyValue = GetProperty(TextField.Property.SelectedTextStart))
+ {
+ propertyValue.Get(out selectedTextStart);
+ }
+ return selectedTextStart;
}
}
{
get
{
- int temp;
- GetProperty(TextField.Property.SelectedTextEnd).Get(out temp);
- return temp;
+ int selectedTextEnd;
+ using (var propertyValue = GetProperty(TextField.Property.SelectedTextEnd))
+ {
+ propertyValue.Get(out selectedTextEnd);
+ }
+ return selectedTextEnd;
}
}
{
get
{
- bool temp;
- GetProperty(TextField.Property.EnableEditing).Get(out temp);
- return temp;
+ bool enableEditing;
+ using (var propertyValue = GetProperty(TextField.Property.EnableEditing))
+ {
+ propertyValue.Get(out enableEditing);
+ }
+ return enableEditing;
}
set
{
{
get
{
- int temp;
- using (PropertyValue propertyValue = GetProperty(TextField.Property.PrimaryCursorPosition))
+ int primaryCursorPosition;
+ using (var propertyValue = GetProperty(TextField.Property.PrimaryCursorPosition))
{
- propertyValue.Get(out temp);
+ propertyValue.Get(out primaryCursorPosition);
}
- return temp;
+ return primaryCursorPosition;
}
set
{
/// <since_tizen> 9 </since_tizen>
public void SetInputFilter(InputFilter inputFilter)
{
- SetProperty(TextField.Property.InputFilter, new PropertyValue(TextMapHelper.GetInputFilterMap(inputFilter)));
+ using (var map = TextMapHelper.GetInputFilterMap(inputFilter))
+ {
+ var propertyValue = new PropertyValue(map);
+ SetProperty(TextField.Property.InputFilter, propertyValue);
+ propertyValue.Dispose();
+ }
}
/// <summary>
/// <since_tizen> 9 </since_tizen>
public InputFilter GetInputFilter()
{
- var map = new PropertyMap();
- GetProperty(TextField.Property.InputFilter).Get(map);
- return TextMapHelper.GetInputFilterStruct(map);
+ InputFilter inputFilter;
+ using (var propertyValue = GetProperty(TextField.Property.InputFilter))
+ {
+ var map = new PropertyMap();
+ propertyValue.Get(map);
+ inputFilter = TextMapHelper.GetInputFilterStruct(map);
+ map.Dispose();
+ }
+ return inputFilter;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetPlaceholder(Placeholder placeholder)
{
- SetValue(PlaceholderProperty, TextMapHelper.GetPlaceholderMap(placeholder));
+ using (var placeholderMap = TextMapHelper.GetPlaceholderMap(placeholder))
+ {
+ SetValue(PlaceholderProperty, placeholderMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Placeholder GetPlaceholder()
{
- return TextMapHelper.GetPlaceholderStruct((PropertyMap)GetValue(PlaceholderProperty));
+ Placeholder placeholder;
+ using (var placeholderMap = (PropertyMap)GetValue(PlaceholderProperty))
+ {
+ placeholder = TextMapHelper.GetPlaceholderStruct(placeholderMap);
+ }
+ return placeholder;
}
/// <summary>
/// </example>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetFontStyle(FontStyle fontStyle)
- {
- SetValue(FontStyleProperty, TextMapHelper.GetFontStyleMap(fontStyle));
+ {
+ using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
+ {
+ SetValue(FontStyleProperty, fontStyleMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public FontStyle GetFontStyle()
{
- return TextMapHelper.GetFontStyleStruct((PropertyMap)GetValue(FontStyleProperty));
+ FontStyle fontStyle;
+ using (var fontStyleMap = (PropertyMap)GetValue(FontStyleProperty))
+ {
+ fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
+ }
+ return fontStyle;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetUnderline(Underline underline)
{
- SetValue(UnderlineProperty, TextMapHelper.GetUnderlineMap(underline));
+ using (var underlineMap = TextMapHelper.GetUnderlineMap(underline))
+ {
+ SetValue(UnderlineProperty, underlineMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Underline GetUnderline()
{
- return TextMapHelper.GetUnderlineStruct((PropertyMap)GetValue(UnderlineProperty));
+ Underline underline;
+ using (var underlineMap = (PropertyMap)GetValue(UnderlineProperty))
+ {
+ underline = TextMapHelper.GetUnderlineStruct(underlineMap);
+ }
+ return underline;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetShadow(Tizen.NUI.Text.Shadow shadow)
{
- SetValue(ShadowProperty, TextMapHelper.GetShadowMap(shadow));
+ using (var shadowMap = TextMapHelper.GetShadowMap(shadow))
+ {
+ SetValue(ShadowProperty, shadowMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Tizen.NUI.Text.Shadow GetShadow()
{
- return TextMapHelper.GetShadowStruct((PropertyMap)GetValue(ShadowProperty));
+ Tizen.NUI.Text.Shadow shadow;
+ using (var shadowMap = (PropertyMap)GetValue(ShadowProperty))
+ {
+ shadow = TextMapHelper.GetShadowStruct(shadowMap);
+ }
+ return shadow;
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetOutline(Outline outline)
{
- SetValue(OutlineProperty, TextMapHelper.GetOutlineMap(outline));
+ using (var outlineMap = TextMapHelper.GetOutlineMap(outline))
+ {
+ SetValue(OutlineProperty, outlineMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Outline GetOutline()
{
- return TextMapHelper.GetOutlineStruct((PropertyMap)GetValue(OutlineProperty));
+ Outline outline;
+ using (var outlineMap = (PropertyMap)GetValue(OutlineProperty))
+ {
+ outline = TextMapHelper.GetOutlineStruct(outlineMap);
+ }
+ return outline;
}
/// <summary>
{
get
{
- int temp = 0;
- GetProperty(TextLabel.Property.LineCount).Get(out temp);
- return temp;
+ int lineCount = 0;
+ using (var propertyValue = GetProperty(TextLabel.Property.LineCount))
+ {
+ propertyValue.Get(out lineCount);
+ }
+ return lineCount;
}
}
{
get
{
- int temp = 0;
- GetProperty(TextLabel.Property.TextDirection).Get(out temp);
- return (TextDirection)temp;
+ int textDirection = 0;
+ using (var propertyValue = GetProperty(TextLabel.Property.TextDirection))
+ {
+ propertyValue.Get(out textDirection);
+ }
+ return (TextDirection)textDirection;
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetTextFit(TextFit textFit)
{
- SetValue(TextFitProperty, TextMapHelper.GetTextFitMap(textFit));
+ using (var textFitMap = TextMapHelper.GetTextFitMap(textFit))
+ {
+ SetValue(TextFitProperty, textFitMap);
+ }
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public TextFit GetTextFit()
{
- return TextMapHelper.GetTextFitStruct((PropertyMap)GetValue(TextFitProperty));
+ TextFit textFit;
+ using (var textFitMap = (PropertyMap)GetValue(TextFitProperty))
+ {
+ textFit = TextMapHelper.GetTextFitStruct(textFitMap);
+ }
+ return textFit;
}
/// <summary>