From 46b8a31f5c1c75a22b648ca394a4de8a50898513 Mon Sep 17 00:00:00 2001 From: dongsug-song <35130733+dongsug-song@users.noreply.github.com> Date: Wed, 18 Sep 2019 13:36:10 +0900 Subject: [PATCH] [NUI] Reduce code duplication - refactor dispose codes (#1010) * [NUI] Refactor disposable pattern in public folder * [NUI] Refactor disposable pattern in internal folder * [NUI] Fix tizenfx api version as 6 --- .../src/internal/AccessibilityActionSignal.cs | 40 +-- .../AccessibilityFocusOvershotSignal.cs | 50 +-- .../src/internal/AccessibilityManager.cs | 10 - .../src/internal/ActivatedSignalType.cs | 60 +--- .../src/internal/AdaptorSignalType.cs | 38 +-- src/Tizen.NUI/src/internal/Alignment.cs | 64 +--- src/Tizen.NUI/src/internal/AngleAxis.cs | 51 +--- .../src/internal/AngleThresholdPair.cs | 49 +-- ...AnimatablePropertyComponentRegistration.cs | 49 +-- .../AnimatablePropertyRegistration.cs | 51 +--- src/Tizen.NUI/src/internal/AnimationSignal.cs | 52 +--- src/Tizen.NUI/src/internal/Any.cs | 100 +----- src/Tizen.NUI/src/internal/Application.cs | 30 +- .../src/internal/ApplicationControlSignal.cs | 52 +--- .../src/internal/ApplicationSignal.cs | 51 +--- .../src/internal/AsyncImageLoader.cs | 11 - .../src/internal/AuthenticationSignalType.cs | 63 +--- src/Tizen.NUI/src/internal/BaseObject.cs | 10 - .../src/internal/BlendEquationType.cs | 2 - src/Tizen.NUI/src/internal/BlendFactorType.cs | 2 - src/Tizen.NUI/src/internal/BlendModeType.cs | 2 - src/Tizen.NUI/src/internal/BufferImage.cs | 24 +- src/Tizen.NUI/src/internal/Builder.cs | 28 +- src/Tizen.NUI/src/internal/ButtonSignal.cs | 51 +--- .../src/internal/ChildPropertyRegistration.cs | 51 +--- .../src/internal/ConnectionTracker.cs | 11 - .../internal/ConnectionTrackerInterface.cs | 11 - .../src/internal/ContentReceivedSignalType.cs | 57 +--- .../src/internal/ControlKeySignal.cs | 52 +--- .../src/internal/CreateWidgetFunction.cs | 2 - src/Tizen.NUI/src/internal/CustomActor.cs | 11 - src/Tizen.NUI/src/internal/CustomActorImpl.cs | 13 +- .../src/internal/CustomAlgorithmInterface.cs | 50 +-- .../src/internal/DaliEventHandler.cs | 9 +- src/Tizen.NUI/src/internal/DaliException.cs | 51 +--- .../src/internal/DefaultItemLayoutProperty.cs | 2 - src/Tizen.NUI/src/internal/DefaultRuler.cs | 10 - .../src/internal/DepthFunctionType.cs | 2 - .../src/internal/DepthTestModeType.cs | 2 - .../src/internal/DepthWriteModeType.cs | 2 - src/Tizen.NUI/src/internal/DirectionType.cs | 2 - src/Tizen.NUI/src/internal/Disposable.cs | 89 ++++++ src/Tizen.NUI/src/internal/DisposeQueue.cs | 1 - .../src/internal/EncodedBufferImage.cs | 11 - .../src/internal/EventThreadCallback.cs | 53 +--- .../src/internal/FaceCullingModeType.cs | 2 - src/Tizen.NUI/src/internal/FixedRuler.cs | 11 - src/Tizen.NUI/src/internal/FloatSignal.cs | 54 +--- .../src/internal/FocusChangedSignal.cs | 53 +--- .../src/internal/FocusGroupChangedSignal.cs | 52 +--- src/Tizen.NUI/src/internal/FontDescription.cs | 51 +--- src/Tizen.NUI/src/internal/FontMetrics.cs | 51 +--- src/Tizen.NUI/src/internal/FrameBuffer.cs | 11 - .../src/internal/FrameBufferImage.cs | 26 +- src/Tizen.NUI/src/internal/FriendAssembly.cs | 5 - .../src/internal/GaussianBlurView.cs | 26 +- .../src/internal/GaussianBlurViewSignal.cs | 52 +--- src/Tizen.NUI/src/internal/GlyphInfo.cs | 51 +--- src/Tizen.NUI/src/internal/HoverSignal.cs | 54 +--- src/Tizen.NUI/src/internal/Image.cs | 21 +- src/Tizen.NUI/src/internal/ImageSignal.cs | 52 +--- .../src/internal/InputMethodOptions.cs | 49 +-- src/Tizen.NUI/src/internal/Item.cs | 59 +--- src/Tizen.NUI/src/internal/ItemContainer.cs | 61 +--- src/Tizen.NUI/src/internal/ItemFactory.cs | 54 +--- src/Tizen.NUI/src/internal/ItemIdContainer.cs | 58 +--- src/Tizen.NUI/src/internal/ItemLayout.cs | 12 - src/Tizen.NUI/src/internal/ItemRange.cs | 57 +--- src/Tizen.NUI/src/internal/KeyEventSignal.cs | 51 +--- .../src/internal/KeyInputFocusManager.cs | 10 - .../src/internal/KeyInputFocusSignal.cs | 51 +--- .../src/internal/KeyboardEventSignalType.cs | 60 +--- .../src/internal/KeyboardResizedSignalType.cs | 59 +--- .../src/internal/KeyboardTypeSignalType.cs | 59 +--- .../src/internal/LanguageChangedSignalType.cs | 59 +--- .../internal/Layouting/LayoutController.cs | 34 +-- .../src/internal/Layouting/LayoutItem.cs | 1 - .../src/internal/ListEventSignalType.cs | 63 +--- src/Tizen.NUI/src/internal/LoadingState.cs | 2 - .../LongPressGestureDetectedSignal.cs | 54 +--- .../src/internal/LowBatterySignalType.cs | 60 +--- .../src/internal/LowMemorySignalType.cs | 50 +-- src/Tizen.NUI/src/internal/Matrix.cs | 52 +--- src/Tizen.NUI/src/internal/Matrix3.cs | 51 +--- src/Tizen.NUI/src/internal/NDalic.cs | 4 - src/Tizen.NUI/src/internal/NUICoreBackend.cs | 18 +- .../src/internal/NUIWidgetCoreBackend.cs | 1 - src/Tizen.NUI/src/internal/NativeImage.cs | 12 - .../src/internal/NativeImageInterface.cs | 12 - src/Tizen.NUI/src/internal/Object.cs | 2 - .../src/internal/ObjectCreatedSignal.cs | 51 +--- .../src/internal/ObjectDestroyedSignal.cs | 51 +--- src/Tizen.NUI/src/internal/ObjectRegistry.cs | 19 +- src/Tizen.NUI/src/internal/PageFactory.cs | 51 +--- src/Tizen.NUI/src/internal/PagePanSignal.cs | 51 +--- .../src/internal/PageTurnLandscapeView.cs | 10 - .../src/internal/PageTurnPortraitView.cs | 13 +- src/Tizen.NUI/src/internal/PageTurnSignal.cs | 51 +--- .../src/internal/PanGestureDetectedSignal.cs | 52 +--- .../internal/PinchGestureDetectedSignal.cs | 52 +--- .../src/internal/PreFocusChangeSignal.cs | 53 +--- .../internal/ProgressBarValueChangedSignal.cs | 51 +--- src/Tizen.NUI/src/internal/PropertyHelper.cs | 3 +- .../src/internal/PropertyRangeManager.cs | 5 - src/Tizen.NUI/src/internal/PropertyRanges.cs | 2 - .../src/internal/PropertyRegistration.cs | 51 +--- src/Tizen.NUI/src/internal/RefObject.cs | 55 +--- src/Tizen.NUI/src/internal/Registry.cs | 2 - .../src/internal/RenderBufferFormat.cs | 2 - src/Tizen.NUI/src/internal/RenderModeType.cs | 2 - src/Tizen.NUI/src/internal/RenderTaskList.cs | 12 - .../src/internal/RenderTaskSignal.cs | 51 +--- src/Tizen.NUI/src/internal/RenderingType.cs | 2 - src/Tizen.NUI/src/internal/ResizedSignal.cs | 49 +-- src/Tizen.NUI/src/internal/Ruler.cs | 10 - src/Tizen.NUI/src/internal/RulerDomain.cs | 58 +--- src/Tizen.NUI/src/internal/RulerPtr.cs | 57 +--- .../src/internal/SWIGTYPE_p_CallbackBase.cs | 1 - .../SWIGTYPE_p_Configuration__ContextLoss.cs | 2 - .../internal/SWIGTYPE_p_Dali__CallbackBase.cs | 1 - .../internal/SWIGTYPE_p_Dali__Constraint.cs | 2 - ...TYPE_p_Dali__CustomActorImpl__Extension.cs | 2 - .../SWIGTYPE_p_Dali__FunctorDelegate.cs | 1 - .../SWIGTYPE_p_Dali__Internal__Texture.cs | 2 - ...SWIGTYPE_p_Dali__Internal__TypeRegistry.cs | 2 - ...trusivePtrT_Dali__Toolkit__ItemLayout_t.cs | 2 - .../SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs | 2 - .../SWIGTYPE_p_Dali__RenderSurface.cs | 3 - ...Dali__Actor_Dali__TouchEvent_const_RF_t.cs | 2 - ...tyManager_R_Dali__TouchEvent_const_RF_t.cs | 2 - ...__DevelActor__VisibilityChange__TypeF_t.cs | 2 - ...lkit__Control_Dali__Toolkit__ControlF_t.cs | 2 - ...r_Dali__Toolkit__TextEditor__InputStyle.cs | 2 - ...Toolkit__TextField__InputStyle__MaskF_t.cs | 2 - ...gnalT_void_fuint32_t_Dali__PixelDataF_t.cs | 2 - .../SWIGTYPE_p_Dali__Toolkit__ClampState.cs | 2 - ...li__Toolkit__Internal__AsyncImageLoader.cs | 2 - ...__Toolkit__Internal__Control__Extension.cs | 2 - ...Dali__Toolkit__Internal__TransitionData.cs | 2 - ...p_Dali__Toolkit__Internal__Visual__Base.cs | 2 - ...p_Dali__Toolkit__ItemFactory__Extension.cs | 2 - .../internal/SWIGTYPE_p_Dali__TouchEvent.cs | 2 - ...tsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.cs | 2 - .../internal/SWIGTYPE_p_Dali__Widget__Impl.cs | 2 - .../internal/SWIGTYPE_p_FunctorDelegate.cs | 2 - .../SWIGTYPE_p_KeyboardFocusManager.cs | 2 - .../SWIGTYPE_p_PropertyInputContainer.cs | 2 - .../src/internal/SWIGTYPE_p_double.cs | 2 - .../src/internal/SWIGTYPE_p_f_float__float.cs | 2 - ..._Property__Index__Dali__Property__Value.cs | 2 - ..._r_q_const__Dali__Property__Value__void.cs | 2 - ...ject_p_Dali__ConnectionTrackerInterface.cs | 2 - ...ng_r_q_const__Dali__Property__Map__bool.cs | 2 - ...onst__Dali__Any__AnyContainerBase__void.cs | 2 - .../SWIGTYPE_p_f_r_Dali__Vector2__bool.cs | 2 - ...inerBase__p_Dali__Any__AnyContainerBase.cs | 2 - ...YPE_p_f_r_q_const__Dali__Vector3__float.cs | 2 - .../src/internal/SWIGTYPE_p_float.cs | 2 - src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs | 2 - ...E_p_p_Dali__TextAbstraction__VectorBlob.cs | 2 - .../src/internal/SWIGTYPE_p_std__type_info.cs | 2 - ...ali__TextAbstraction__FontDescription_t.cs | 2 - .../src/internal/SWIGTYPE_p_time_t.cs | 2 - src/Tizen.NUI/src/internal/SWIGTYPE_p_tm.cs | 1 - .../src/internal/SWIGTYPE_p_uint16_t.cs | 1 - .../src/internal/SWIGTYPE_p_uint8_t.cs | 2 - .../src/internal/SWIGTYPE_p_unsigned_char.cs | 2 - .../src/internal/SWIGTYPE_p_unsigned_int.cs | 2 - .../src/internal/SWIGTYPE_p_unsigned_short.cs | 2 - .../src/internal/ScrollStateChangedSignal.cs | 50 +-- .../internal/ScrollViewSnapStartedSignal.cs | 51 +--- .../src/internal/ScrollableSignal.cs | 51 +--- .../src/internal/SignalConnectorType.cs | 51 +--- src/Tizen.NUI/src/internal/SignalObserver.cs | 61 +--- .../src/internal/SliderMarkReachedSignal.cs | 51 +--- .../src/internal/SliderValueChangedSignal.cs | 51 +--- src/Tizen.NUI/src/internal/SlotObserver.cs | 63 +--- src/Tizen.NUI/src/internal/SnapType.cs | 2 - .../src/internal/StageWheelSignal.cs | 51 +--- .../src/internal/StateChangedSignalType.cs | 48 +-- .../src/internal/StatusSignalType.cs | 60 +--- .../src/internal/StencilFunctionType.cs | 2 - .../src/internal/StencilOperationType.cs | 2 - src/Tizen.NUI/src/internal/StringValuePair.cs | 51 +--- .../src/internal/StyleChangedSignal.cs | 51 +--- .../src/internal/TapGestureDetectedSignal.cs | 50 +-- .../src/internal/TextEditorSignal.cs | 50 +-- src/Tizen.NUI/src/internal/TextFieldSignal.cs | 51 +--- src/Tizen.NUI/src/internal/TimePeriod.cs | 51 +--- src/Tizen.NUI/src/internal/TimerSignalType.cs | 53 +--- .../src/internal/ToolkitPropertyRange.cs | 2 - .../src/internal/TooltipPositionType.cs | 2 - src/Tizen.NUI/src/internal/TouchDataSignal.cs | 52 +--- src/Tizen.NUI/src/internal/TouchPoint.cs | 53 +--- .../src/internal/TouchPointContainer.cs | 53 +--- src/Tizen.NUI/src/internal/TouchSignal.cs | 51 +--- src/Tizen.NUI/src/internal/TypeAction.cs | 51 +--- .../src/internal/TypeRegistration.cs | 50 +-- src/Tizen.NUI/src/internal/Uint16Pair.cs | 60 +--- src/Tizen.NUI/src/internal/VectorBase.cs | 51 +--- src/Tizen.NUI/src/internal/VectorBlob.cs | 49 +-- .../src/internal/VectorUint16Pair.cs | 52 +--- .../src/internal/VectorUnsignedChar.cs | 52 +--- src/Tizen.NUI/src/internal/VideoViewSignal.cs | 133 +++----- src/Tizen.NUI/src/internal/ViewImpl.cs | 11 - .../ViewLayoutDirectionChangedSignal.cs | 48 +-- .../src/internal/ViewResourceReadySignal.cs | 50 +-- src/Tizen.NUI/src/internal/ViewSignal.cs | 53 +--- .../internal/ViewVisibilityChangedSignal.cs | 50 +-- src/Tizen.NUI/src/internal/ViewWrapperImpl.cs | 9 +- .../src/internal/VisualEventSignal.cs | 45 +-- src/Tizen.NUI/src/internal/VoidSignal.cs | 51 +--- .../src/internal/WatchApplication.cs | 11 +- src/Tizen.NUI/src/internal/WatchBoolSignal.cs | 50 +-- src/Tizen.NUI/src/internal/WatchTimeSignal.cs | 50 +-- .../src/internal/WeakEventHandler.cs | 3 +- .../internal/WebViewPageLoadErrorSignal.cs | 43 +-- .../src/internal/WebViewPageLoadSignal.cs | 43 +-- src/Tizen.NUI/src/internal/WheelSignal.cs | 53 +--- .../src/internal/WidgetApplication.cs | 7 - src/Tizen.NUI/src/internal/WidgetImpl.cs | 7 - src/Tizen.NUI/src/internal/WidgetImplPtr.cs | 1 - .../src/internal/WidgetViewSignal.cs | 33 +- .../src/internal/WindowFocusSignalType.cs | 52 +--- src/Tizen.NUI/src/internal/doublep.cs | 51 +--- src/Tizen.NUI/src/internal/floatp.cs | 51 +--- src/Tizen.NUI/src/internal/intp.cs | 51 +--- src/Tizen.NUI/src/internal/uintp.cs | 51 +--- src/Tizen.NUI/src/internal/ushortp.cs | 51 +--- src/Tizen.NUI/src/public/Adaptor.cs | 56 +--- src/Tizen.NUI/src/public/AlphaFunction.cs | 57 +--- src/Tizen.NUI/src/public/Animatable.cs | 10 - src/Tizen.NUI/src/public/Animation.cs | 13 - src/Tizen.NUI/src/public/AutofillContainer.cs | 8 - .../BaseComponents/AnimatedVectorImageView.cs | 7 - .../public/BaseComponents/FlexContainer.cs | 7 - .../src/public/BaseComponents/TableView.cs | 66 +--- .../src/public/BaseComponents/TextEditor.cs | 8 - .../src/public/BaseComponents/TextField.cs | 13 +- .../src/public/BaseComponents/TextLabel.cs | 7 - .../BaseComponents/VectorAnimationView.cs | 7 - .../src/public/BaseComponents/VideoView.cs | 7 - .../src/public/BaseComponents/View.cs | 7 - src/Tizen.NUI/src/public/Color.cs | 59 +--- src/Tizen.NUI/src/public/Container.cs | 1 - .../src/public/CubeTransitionEffect.cs | 8 - .../src/public/CustomViewRegistry.cs | 2 - src/Tizen.NUI/src/public/Degree.cs | 62 +--- src/Tizen.NUI/src/public/DirectionBias.cs | 1 - src/Tizen.NUI/src/public/Extents.cs | 60 +--- src/Tizen.NUI/src/public/FilterModeType.cs | 1 - src/Tizen.NUI/src/public/FontClient.cs | 48 +-- src/Tizen.NUI/src/public/Geometry.cs | 10 - src/Tizen.NUI/src/public/Gesture.cs | 59 +--- src/Tizen.NUI/src/public/GestureDetector.cs | 8 - .../src/public/GraphicsTypeConverter.cs | 2 - .../src/public/GraphicsTypeManager.cs | 1 - src/Tizen.NUI/src/public/Hover.cs | 58 +--- .../src/public/InputMethodContext.cs | 8 - src/Tizen.NUI/src/public/Key.cs | 58 +--- src/Tizen.NUI/src/public/KeyFrames.cs | 7 - src/Tizen.NUI/src/public/Layer.cs | 9 - src/Tizen.NUI/src/public/LongPressGesture.cs | 7 - .../src/public/LongPressGestureDetector.cs | 8 - src/Tizen.NUI/src/public/PaddingType.cs | 60 +--- src/Tizen.NUI/src/public/PanGesture.cs | 10 - src/Tizen.NUI/src/public/Path.cs | 11 - src/Tizen.NUI/src/public/PinchGesture.cs | 10 - .../src/public/PinchGestureDetector.cs | 13 - src/Tizen.NUI/src/public/PixelBuffer.cs | 10 - src/Tizen.NUI/src/public/PixelData.cs | 9 - src/Tizen.NUI/src/public/Position.cs | 58 +--- src/Tizen.NUI/src/public/Position2D.cs | 64 +--- src/Tizen.NUI/src/public/Property.cs | 284 ++---------------- src/Tizen.NUI/src/public/PropertyBuffer.cs | 10 - src/Tizen.NUI/src/public/PropertyCondition.cs | 11 +- .../src/public/PropertyNotification.cs | 10 - .../src/public/PropertyNotifySignal.cs | 60 +--- src/Tizen.NUI/src/public/Radian.cs | 58 +--- src/Tizen.NUI/src/public/Rectangle.cs | 56 +--- src/Tizen.NUI/src/public/RelativeVector2.cs | 58 +--- src/Tizen.NUI/src/public/RelativeVector3.cs | 58 +--- src/Tizen.NUI/src/public/RelativeVector4.cs | 58 +--- src/Tizen.NUI/src/public/RelayoutContainer.cs | 58 +--- src/Tizen.NUI/src/public/Rotation.cs | 59 +--- src/Tizen.NUI/src/public/Sampler.cs | 10 - src/Tizen.NUI/src/public/ScrollViewEffect.cs | 8 - .../src/public/ScrollViewPagePathEffect.cs | 8 - src/Tizen.NUI/src/public/Size.cs | 57 +--- src/Tizen.NUI/src/public/Size2D.cs | 58 +--- src/Tizen.NUI/src/public/TapGesture.cs | 8 - .../src/public/TapGestureDetector.cs | 10 - src/Tizen.NUI/src/public/Texture.cs | 10 - src/Tizen.NUI/src/public/TextureSet.cs | 10 - src/Tizen.NUI/src/public/Timer.cs | 7 - src/Tizen.NUI/src/public/Touch.cs | 8 - src/Tizen.NUI/src/public/TransitionData.cs | 10 - src/Tizen.NUI/src/public/TypeInfo.cs | 10 - src/Tizen.NUI/src/public/TypeRegistry.cs | 11 - .../src/public/UIComponents/Button.cs | 8 - .../src/public/UIComponents/CheckBoxButton.cs | 7 - .../src/public/UIComponents/Popup.cs | 8 - .../src/public/UIComponents/ProgressBar.cs | 8 - .../src/public/UIComponents/PushButton.cs | 7 - .../src/public/UIComponents/RadioButton.cs | 8 - .../src/public/UIComponents/ScrollBar.cs | 7 - .../src/public/UIComponents/Slider.cs | 8 - src/Tizen.NUI/src/public/Vector2.cs | 56 +--- src/Tizen.NUI/src/public/Vector3.cs | 56 +--- src/Tizen.NUI/src/public/Vector4.cs | 57 +--- src/Tizen.NUI/src/public/ViewWrapper.cs | 8 - src/Tizen.NUI/src/public/VisualBase.cs | 9 - src/Tizen.NUI/src/public/WatchTime.cs | 57 +--- src/Tizen.NUI/src/public/Wheel.cs | 61 +--- src/Tizen.NUI/src/public/Widget.cs | 7 - src/Tizen.NUI/src/public/WidgetView.cs | 9 - src/Tizen.NUI/src/public/WidgetViewManager.cs | 10 - 317 files changed, 667 insertions(+), 8396 deletions(-) create mode 100755 src/Tizen.NUI/src/internal/Disposable.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/WebViewPageLoadErrorSignal.cs mode change 100644 => 100755 src/Tizen.NUI/src/internal/WebViewPageLoadSignal.cs diff --git a/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs b/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs index d78a25ddf..d1bca052f 100755 --- a/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs @@ -18,7 +18,7 @@ namespace Tizen.NUI { - internal class AccessibilityActionSignal : global::System.IDisposable + internal class AccessibilityActionSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,40 +34,7 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~AccessibilityActionSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { @@ -99,7 +66,6 @@ namespace Tizen.NUI disposed = true; } - public bool Empty() { bool ret = Interop.AccessibilityManage.AccessibilityActionSignal_Empty(swigCPtr); @@ -143,7 +109,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs b/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs index 72be9efbb..07f61627d 100755 --- a/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs @@ -18,7 +18,7 @@ namespace Tizen.NUI { using Tizen.NUI.BaseComponents; - internal class AccessibilityFocusOvershotSignal : global::System.IDisposable + internal class AccessibilityFocusOvershotSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +34,12 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~AccessibilityFocusOvershotSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -141,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/AccessibilityManager.cs b/src/Tizen.NUI/src/internal/AccessibilityManager.cs index 96ddfbeb1..0d92ca1ac 100755 --- a/src/Tizen.NUI/src/internal/AccessibilityManager.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityManager.cs @@ -43,14 +43,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -2776,7 +2768,5 @@ namespace Tizen.NUI OVERSHOT_PREVIOUS = -1, OVERSHOT_NEXT = 1 } - } - } diff --git a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs index c06628df1..1f8dfb624 100755 --- a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs +++ b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs @@ -20,7 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - internal class ActivatedSignalType : global::System.IDisposable + internal class ActivatedSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -40,69 +40,17 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - /// /// Dispose /// /// 3 - ~ActivatedSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// - /// Dispose - /// - /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -117,7 +65,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -191,7 +139,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/AdaptorSignalType.cs b/src/Tizen.NUI/src/internal/AdaptorSignalType.cs index ea7891abf..585d0e6e7 100755 --- a/src/Tizen.NUI/src/internal/AdaptorSignalType.cs +++ b/src/Tizen.NUI/src/internal/AdaptorSignalType.cs @@ -18,13 +18,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// public class AdaptorSignalType : global::System.IDisposable - /// - /// 4 - /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public class AdaptorSignalType : global::System.IDisposable + internal class AdaptorSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -46,38 +40,24 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// - /// Dispose - /// - /// 3 - /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - ~AdaptorSignalType() - { - Dispose(); - } - /// /// Dispose /// /// 4 /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public virtual void Dispose() + protected override void Dispose(DisposeTypes type) { - lock (this) + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - Interop.Adaptor.delete_AdaptorSignalType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + Interop.Adaptor.delete_AdaptorSignalType(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + base.Dispose(type); } /// @@ -163,7 +143,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/Alignment.cs b/src/Tizen.NUI/src/internal/Alignment.cs index 377a09069..08e4ef21b 100755 --- a/src/Tizen.NUI/src/internal/Alignment.cs +++ b/src/Tizen.NUI/src/internal/Alignment.cs @@ -41,14 +41,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -66,10 +58,8 @@ namespace Tizen.NUI base.Dispose(type); } - - /// 3 - public new class Padding : global::System.IDisposable + public new class Padding : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// 3 @@ -85,58 +75,15 @@ namespace Tizen.NUI { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - /// 3 - protected bool disposed = false; - - ~Padding() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - + /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -151,7 +98,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// 3 @@ -229,7 +176,6 @@ namespace Tizen.NUI return ret; } } - } public Alignment(Alignment.Type horizontal, Alignment.Type vertical) : this(Interop.Alignment.Alignment_New__SWIG_0((int)horizontal, (int)vertical), true) @@ -326,7 +272,5 @@ namespace Tizen.NUI ShrinkToFit, ShrinkToFitKeepAspect } - } - } diff --git a/src/Tizen.NUI/src/internal/AngleAxis.cs b/src/Tizen.NUI/src/internal/AngleAxis.cs index e83939e1e..0d35be411 100755 --- a/src/Tizen.NUI/src/internal/AngleAxis.cs +++ b/src/Tizen.NUI/src/internal/AngleAxis.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class AngleAxis : global::System.IDisposable + internal class AngleAxis : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~AngleAxis() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,10 +54,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public AngleAxis() : this(Interop.AngleAxis.new_AngleAxis__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -141,7 +98,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/AngleThresholdPair.cs b/src/Tizen.NUI/src/internal/AngleThresholdPair.cs index eefe17140..e4a6bbe14 100755 --- a/src/Tizen.NUI/src/internal/AngleThresholdPair.cs +++ b/src/Tizen.NUI/src/internal/AngleThresholdPair.cs @@ -18,7 +18,7 @@ namespace Tizen.NUI { - internal class AngleThresholdPair : global::System.IDisposable + internal class AngleThresholdPair : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~AngleThresholdPair() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,7 +55,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public AngleThresholdPair() : this(Interop.AngleThresholdPair.new_AngleThresholdPair__SWIG_0(), true) @@ -145,7 +104,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs b/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs index ccffa3eb7..9177bc57d 100755 --- a/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs +++ b/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs @@ -18,7 +18,7 @@ namespace Tizen.NUI { - internal class AnimatablePropertyComponentRegistration : global::System.IDisposable + internal class AnimatablePropertyComponentRegistration : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~AnimatablePropertyComponentRegistration() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,7 +55,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -104,7 +63,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs b/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs index f6abc74e6..71956fb3b 100755 --- a/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs +++ b/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class AnimatablePropertyRegistration : global::System.IDisposable + internal class AnimatablePropertyRegistration : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~AnimatablePropertyRegistration() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,10 +54,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public AnimatablePropertyRegistration(TypeRegistration registered, string name, int index, PropertyType type) : this(Interop.NDalic.new_AnimatablePropertyRegistration__SWIG_0(TypeRegistration.getCPtr(registered), name, index, (int)type), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -109,7 +66,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/AnimationSignal.cs b/src/Tizen.NUI/src/internal/AnimationSignal.cs index fb53d65d8..2fa28f881 100755 --- a/src/Tizen.NUI/src/internal/AnimationSignal.cs +++ b/src/Tizen.NUI/src/internal/AnimationSignal.cs @@ -18,7 +18,7 @@ namespace Tizen.NUI { - internal class AnimationSignal : global::System.IDisposable + internal class AnimationSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~AnimationSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,10 +55,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.Animation.AnimationSignal_Empty(swigCPtr); @@ -123,7 +81,6 @@ namespace Tizen.NUI } } - public void Connect(System.IntPtr callback) { Interop.Animation.AnimationSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, callback)); @@ -135,7 +92,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public void Disconnect(System.Delegate func) { System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); @@ -155,7 +111,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/Any.cs b/src/Tizen.NUI/src/internal/Any.cs index 71532a43e..68db9c8be 100755 --- a/src/Tizen.NUI/src/internal/Any.cs +++ b/src/Tizen.NUI/src/internal/Any.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class Any : global::System.IDisposable + internal class Any : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~Any() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -138,7 +96,7 @@ namespace Tizen.NUI } /// 3 - public class AnyContainerBase : global::System.IDisposable + public class AnyContainerBase : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// 3 @@ -155,57 +113,14 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - /// 3 - protected bool disposed = false; - - ~AnyContainerBase() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -220,7 +135,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// 3 @@ -281,7 +196,6 @@ namespace Tizen.NUI return ret; } } - } public Any.AnyContainerBase mContainer @@ -299,7 +213,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index 43bb36f42..228492c28 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -14,20 +14,18 @@ * limitations under the License. * */ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using Tizen.NUI.Binding; +using Tizen.NUI.Binding.Internals; namespace Tizen.NUI { - - using System; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.ComponentModel; - using System.Runtime.InteropServices; - using System.Threading; - using System.Threading.Tasks; - using Tizen.NUI.Binding; - using Tizen.NUI.Binding.Internals; - /** * @brief Event arguments that passed via NUIApplicationInit signal * @@ -476,14 +474,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -1481,7 +1471,5 @@ namespace Tizen.NUI Opaque = 0, Transparent = 1 } - } - } diff --git a/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs b/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs index 337eea8d0..8e36d1b78 100755 --- a/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs +++ b/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class ApplicationControlSignal : global::System.IDisposable + internal class ApplicationControlSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~ApplicationControlSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,11 +54,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - - public bool Empty() { bool ret = Interop.ApplicationControlSignal.ApplicationControlSignal_Empty(swigCPtr); @@ -143,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ApplicationSignal.cs b/src/Tizen.NUI/src/internal/ApplicationSignal.cs index f08a5aaad..2473a54cb 100755 --- a/src/Tizen.NUI/src/internal/ApplicationSignal.cs +++ b/src/Tizen.NUI/src/internal/ApplicationSignal.cs @@ -18,7 +18,7 @@ namespace Tizen.NUI { - internal class ApplicationSignal : global::System.IDisposable + internal class ApplicationSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~ApplicationSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,11 +55,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - - public bool Empty() { bool ret = Interop.ApplicationSignal.ApplicationSignal_Empty(swigCPtr); @@ -143,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/AsyncImageLoader.cs b/src/Tizen.NUI/src/internal/AsyncImageLoader.cs index 931c349a7..1632ed25e 100755 --- a/src/Tizen.NUI/src/internal/AsyncImageLoader.cs +++ b/src/Tizen.NUI/src/internal/AsyncImageLoader.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class AsyncImageLoader : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -39,14 +38,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -128,7 +119,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/AuthenticationSignalType.cs b/src/Tizen.NUI/src/internal/AuthenticationSignalType.cs index 07b54a467..1a8b9c3d4 100755 --- a/src/Tizen.NUI/src/internal/AuthenticationSignalType.cs +++ b/src/Tizen.NUI/src/internal/AuthenticationSignalType.cs @@ -20,7 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - internal class AuthenticationSignalType : global::System.IDisposable + internal class AuthenticationSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -41,73 +41,18 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - protected bool disposed = false; - - /// - /// Dispose - /// - /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - ~AuthenticationSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose - /// - /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Dispose /// /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -122,7 +67,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -201,7 +146,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/BaseObject.cs b/src/Tizen.NUI/src/internal/BaseObject.cs index c9a085361..1578b5351 100755 --- a/src/Tizen.NUI/src/internal/BaseObject.cs +++ b/src/Tizen.NUI/src/internal/BaseObject.cs @@ -40,14 +40,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -92,7 +84,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/BlendEquationType.cs b/src/Tizen.NUI/src/internal/BlendEquationType.cs index bfb0c74c0..cf6e4e4da 100755 --- a/src/Tizen.NUI/src/internal/BlendEquationType.cs +++ b/src/Tizen.NUI/src/internal/BlendEquationType.cs @@ -17,12 +17,10 @@ namespace Tizen.NUI { - internal enum BlendEquationType { ADD = 0x8006, SUBTRACT = 0x800A, REVERSE_SUBTRACT = 0x800B } - } diff --git a/src/Tizen.NUI/src/internal/BlendFactorType.cs b/src/Tizen.NUI/src/internal/BlendFactorType.cs index 9fc34a538..7d4e89e36 100755 --- a/src/Tizen.NUI/src/internal/BlendFactorType.cs +++ b/src/Tizen.NUI/src/internal/BlendFactorType.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal enum BlendFactorType { ZERO = 0, @@ -36,5 +35,4 @@ namespace Tizen.NUI CONSTANT_ALPHA = 0x8003, ONE_MINUS_CONSTANT_ALPHA = 0x8004 } - } diff --git a/src/Tizen.NUI/src/internal/BlendModeType.cs b/src/Tizen.NUI/src/internal/BlendModeType.cs index 4a19abf33..686d7f786 100755 --- a/src/Tizen.NUI/src/internal/BlendModeType.cs +++ b/src/Tizen.NUI/src/internal/BlendModeType.cs @@ -17,12 +17,10 @@ namespace Tizen.NUI { - internal enum BlendModeType { OFF, AUTO, ON } - } diff --git a/src/Tizen.NUI/src/internal/BufferImage.cs b/src/Tizen.NUI/src/internal/BufferImage.cs index b75bda50d..87a3eb4c0 100755 --- a/src/Tizen.NUI/src/internal/BufferImage.cs +++ b/src/Tizen.NUI/src/internal/BufferImage.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class BufferImage : Image { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -39,19 +38,10 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) @@ -65,33 +55,31 @@ namespace Tizen.NUI base.Dispose(type); } - - public BufferImage(uint width, uint height, PixelFormat pixelformat) : this(Interop.BufferImage.BufferImage_New__SWIG_0(width, height, (int)pixelformat), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public BufferImage(uint width, uint height) : this(Interop.BufferImage.BufferImage_New__SWIG_1(width, height), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public BufferImage(byte[] pixelBuffer, uint width, uint height, PixelFormat pixelFormat, uint stride) : this(Interop.BufferImage.BufferImage_New__SWIG_2(pixelBuffer, width, height, (int)pixelFormat, stride), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public BufferImage(byte[] pixelBuffer, uint width, uint height, PixelFormat pixelFormat) : this(Interop.BufferImage.BufferImage_New__SWIG_3(pixelBuffer, width, height, (int)pixelFormat), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public BufferImage(byte[] pixelBuffer, uint width, uint height) : this(Interop.BufferImage.BufferImage_New__SWIG_4(pixelBuffer, width, height), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public new static BufferImage DownCast(BaseHandle handle) { BufferImage ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as BufferImage; @@ -165,7 +153,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/Builder.cs b/src/Tizen.NUI/src/internal/Builder.cs index ef00e453e..8752f834b 100755 --- a/src/Tizen.NUI/src/internal/Builder.cs +++ b/src/Tizen.NUI/src/internal/Builder.cs @@ -15,14 +15,12 @@ * */ +using System; +using System.Runtime.InteropServices; +using Tizen.NUI.BaseComponents; + namespace Tizen.NUI { - - using System; - using System.Runtime.InteropServices; - using Tizen.NUI.BaseComponents; - - internal class Builder : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -44,19 +42,9 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) @@ -70,8 +58,6 @@ namespace Tizen.NUI base.Dispose(type); } - - /// 3 public class QuitEventArgs : EventArgs { @@ -148,13 +134,11 @@ namespace Tizen.NUI } } - - public Builder() : this(Interop.Builder.Builder_New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void LoadFromString(string data, Builder.UIFormat format) { Interop.Builder.Builder_LoadFromString__SWIG_0(swigCPtr, data, (int)format); @@ -307,7 +291,5 @@ namespace Tizen.NUI { JSON } - } - } diff --git a/src/Tizen.NUI/src/internal/ButtonSignal.cs b/src/Tizen.NUI/src/internal/ButtonSignal.cs index 42da6fa6f..73d834a60 100755 --- a/src/Tizen.NUI/src/internal/ButtonSignal.cs +++ b/src/Tizen.NUI/src/internal/ButtonSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class ButtonSignal : global::System.IDisposable + internal class ButtonSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~ButtonSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,10 +54,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.ButtonSignal.ButtonSignal_Empty(swigCPtr); @@ -143,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs b/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs index 62440467b..e54ad5a14 100755 --- a/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs +++ b/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class ChildPropertyRegistration : global::System.IDisposable + internal class ChildPropertyRegistration : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~ChildPropertyRegistration() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,15 +54,12 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public ChildPropertyRegistration(TypeRegistration registered, string name, int index, PropertyType type) : this(Interop.NDalic.new_ChildPropertyRegistration(TypeRegistration.getCPtr(registered), name, index, (int)type), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ConnectionTracker.cs b/src/Tizen.NUI/src/internal/ConnectionTracker.cs index ed07317c4..3f81d223e 100755 --- a/src/Tizen.NUI/src/internal/ConnectionTracker.cs +++ b/src/Tizen.NUI/src/internal/ConnectionTracker.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class ConnectionTracker : ConnectionTrackerInterface { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -39,14 +38,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -88,7 +79,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs b/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs index c47eadad8..532309e98 100755 --- a/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs +++ b/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs @@ -45,14 +45,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -70,7 +62,6 @@ namespace Tizen.NUI base.Dispose(type); } - /// /// Called when a signal is connected. /// @@ -82,7 +73,5 @@ namespace Tizen.NUI Interop.ConnectionTracker.ConnectionTrackerInterface_SignalConnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_CallbackBase.getCPtr(callback)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ContentReceivedSignalType.cs b/src/Tizen.NUI/src/internal/ContentReceivedSignalType.cs index b24b5fdb0..d0fa14348 100755 --- a/src/Tizen.NUI/src/internal/ContentReceivedSignalType.cs +++ b/src/Tizen.NUI/src/internal/ContentReceivedSignalType.cs @@ -20,7 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - internal class ContentReceivedSignalType : global::System.IDisposable + internal class ContentReceivedSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -39,65 +39,16 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - protected bool disposed = false; - - /// - /// Dispose - /// - ~ContentReceivedSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose - /// - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Dispose /// - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -111,7 +62,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -181,7 +132,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ControlKeySignal.cs b/src/Tizen.NUI/src/internal/ControlKeySignal.cs index b8c408977..011c83c21 100755 --- a/src/Tizen.NUI/src/internal/ControlKeySignal.cs +++ b/src/Tizen.NUI/src/internal/ControlKeySignal.cs @@ -19,8 +19,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - - internal class ControlKeySignal : global::System.IDisposable + internal class ControlKeySignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -36,55 +35,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ControlKeySignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -99,10 +56,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.ControlKeySignal.ControlKeySignal_Empty(swigCPtr); @@ -146,7 +102,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/CreateWidgetFunction.cs b/src/Tizen.NUI/src/internal/CreateWidgetFunction.cs index 29d2cfba6..5edb3d200 100755 --- a/src/Tizen.NUI/src/internal/CreateWidgetFunction.cs +++ b/src/Tizen.NUI/src/internal/CreateWidgetFunction.cs @@ -16,7 +16,6 @@ */ namespace Tizen.NUI { - internal class CreateWidgetFunction { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -36,5 +35,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/CustomActor.cs b/src/Tizen.NUI/src/internal/CustomActor.cs index a97098a8a..aab57d2ef 100755 --- a/src/Tizen.NUI/src/internal/CustomActor.cs +++ b/src/Tizen.NUI/src/internal/CustomActor.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class CustomActor : Animatable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -39,14 +38,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -99,7 +90,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/CustomActorImpl.cs b/src/Tizen.NUI/src/internal/CustomActorImpl.cs index 0a0a16612..ddde9eb80 100755 --- a/src/Tizen.NUI/src/internal/CustomActorImpl.cs +++ b/src/Tizen.NUI/src/internal/CustomActorImpl.cs @@ -14,11 +14,10 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - internal class CustomActorImpl : RefObject { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -40,14 +39,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -235,7 +226,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs b/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs index 2809839b9..a9be735d8 100755 --- a/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs +++ b/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs @@ -20,8 +20,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - - internal class CustomAlgorithmInterface : global::System.IDisposable + internal class CustomAlgorithmInterface : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -37,55 +36,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~CustomAlgorithmInterface() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -100,7 +57,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public virtual View GetNextFocusableView(View current, View proposed, View.FocusDirection direction) @@ -144,5 +101,4 @@ namespace Tizen.NUI private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(View), typeof(View), typeof(View.FocusDirection) }; } - } diff --git a/src/Tizen.NUI/src/internal/DaliEventHandler.cs b/src/Tizen.NUI/src/internal/DaliEventHandler.cs index fd13b6b97..ca2e0085c 100755 --- a/src/Tizen.NUI/src/internal/DaliEventHandler.cs +++ b/src/Tizen.NUI/src/internal/DaliEventHandler.cs @@ -14,12 +14,11 @@ * limitations under the License. * */ +using System; +using System.Runtime.InteropServices; + namespace Tizen.NUI { - - using System; - using System.Runtime.InteropServices; - /// /// [UnmanagedFunctionPointer(CallingConvention.StdCall)] /// @@ -51,6 +50,4 @@ namespace Tizen.NUI /// 3 [UnmanagedFunctionPointer(CallingConvention.StdCall)] public delegate R EventHandlerWithReturnType(T source, U e); - - } diff --git a/src/Tizen.NUI/src/internal/DaliException.cs b/src/Tizen.NUI/src/internal/DaliException.cs index d964faaeb..8e257cf58 100755 --- a/src/Tizen.NUI/src/internal/DaliException.cs +++ b/src/Tizen.NUI/src/internal/DaliException.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class DaliException : global::System.IDisposable + internal class DaliException : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~DaliException() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public DaliException(string location, string condition) : this(Interop.DaliException.new_DaliException(location, condition), true) @@ -134,7 +91,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs b/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs index 6fe2cfe29..ffec5b015 100755 --- a/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs +++ b/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs @@ -19,7 +19,6 @@ using System.ComponentModel; namespace Tizen.NUI { - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public enum DefaultItemLayoutProperty @@ -180,5 +179,4 @@ namespace Tizen.NUI /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. SPIRAL_TOP_ITEM_ALIGNMENT } - } diff --git a/src/Tizen.NUI/src/internal/DefaultRuler.cs b/src/Tizen.NUI/src/internal/DefaultRuler.cs index 9d6718797..cc120e6b3 100755 --- a/src/Tizen.NUI/src/internal/DefaultRuler.cs +++ b/src/Tizen.NUI/src/internal/DefaultRuler.cs @@ -44,14 +44,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -111,7 +103,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/DepthFunctionType.cs b/src/Tizen.NUI/src/internal/DepthFunctionType.cs index 2b8a0d9dc..5ee947e84 100755 --- a/src/Tizen.NUI/src/internal/DepthFunctionType.cs +++ b/src/Tizen.NUI/src/internal/DepthFunctionType.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal enum DepthFunctionType { NEVER, @@ -29,5 +28,4 @@ namespace Tizen.NUI LESS_EQUAL, GREATER_EQUAL } - } diff --git a/src/Tizen.NUI/src/internal/DepthTestModeType.cs b/src/Tizen.NUI/src/internal/DepthTestModeType.cs index 7420386e9..59fcc671d 100755 --- a/src/Tizen.NUI/src/internal/DepthTestModeType.cs +++ b/src/Tizen.NUI/src/internal/DepthTestModeType.cs @@ -17,12 +17,10 @@ namespace Tizen.NUI { - internal enum DepthTestModeType { OFF, AUTO, ON } - } diff --git a/src/Tizen.NUI/src/internal/DepthWriteModeType.cs b/src/Tizen.NUI/src/internal/DepthWriteModeType.cs index 1fe05b1a4..378c98ab2 100755 --- a/src/Tizen.NUI/src/internal/DepthWriteModeType.cs +++ b/src/Tizen.NUI/src/internal/DepthWriteModeType.cs @@ -17,12 +17,10 @@ namespace Tizen.NUI { - internal enum DepthWriteModeType { OFF, AUTO, ON } - } diff --git a/src/Tizen.NUI/src/internal/DirectionType.cs b/src/Tizen.NUI/src/internal/DirectionType.cs index 24c726117..634159d83 100755 --- a/src/Tizen.NUI/src/internal/DirectionType.cs +++ b/src/Tizen.NUI/src/internal/DirectionType.cs @@ -17,11 +17,9 @@ namespace Tizen.NUI { - internal enum DirectionType { LEFT_TO_RIGHT = 0, RIGHT_TO_LEFT } - } diff --git a/src/Tizen.NUI/src/internal/Disposable.cs b/src/Tizen.NUI/src/internal/Disposable.cs new file mode 100755 index 000000000..c4627afad --- /dev/null +++ b/src/Tizen.NUI/src/internal/Disposable.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tizen.NUI +{ + /// + /// Disposable class. + /// + /// 6 + public class Disposable : global::System.IDisposable + { + /// + /// A Flat to check if it is already disposed. + /// + /// 6 + protected bool disposed = false; + private bool isDisposeQueued = false; + + /// + /// Create an instance of BaseHandle. + /// + /// 6 + public Disposable() + { + } + + /// + /// Dispose. + /// + /// 6 + ~Disposable() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + /// + /// Dispose. + /// + /// 6 + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + /// + /// Dispose. + /// + /// 6 + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + disposed = true; + } + } +} diff --git a/src/Tizen.NUI/src/internal/DisposeQueue.cs b/src/Tizen.NUI/src/internal/DisposeQueue.cs index 2f8e27599..b69ed232b 100755 --- a/src/Tizen.NUI/src/internal/DisposeQueue.cs +++ b/src/Tizen.NUI/src/internal/DisposeQueue.cs @@ -12,7 +12,6 @@ using System.Collections.Generic; namespace Tizen.NUI { - internal class DisposeQueue { private static readonly DisposeQueue _disposableQueue = new DisposeQueue(); diff --git a/src/Tizen.NUI/src/internal/EncodedBufferImage.cs b/src/Tizen.NUI/src/internal/EncodedBufferImage.cs index 8aaf9f786..c44dda232 100755 --- a/src/Tizen.NUI/src/internal/EncodedBufferImage.cs +++ b/src/Tizen.NUI/src/internal/EncodedBufferImage.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class EncodedBufferImage : Image { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -39,14 +38,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +88,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/EventThreadCallback.cs b/src/Tizen.NUI/src/internal/EventThreadCallback.cs index bbc687ed7..fa8c7315b 100755 --- a/src/Tizen.NUI/src/internal/EventThreadCallback.cs +++ b/src/Tizen.NUI/src/internal/EventThreadCallback.cs @@ -14,11 +14,11 @@ * limitations under the License. * */ +using System.ComponentModel; namespace Tizen.NUI { - - internal class EventThreadCallback : global::System.IDisposable + internal class EventThreadCallback : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -36,55 +36,15 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~EventThreadCallback() - { - //if (!isDisposeQueued) - //{ - //isDisposeQueued = true; - //DisposeQueue.Instance.Add(this); - //} - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -99,7 +59,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public EventThreadCallback(CallbackDelegate func) : this(Interop.EventThreadCallback.new_EventThreadCallback(func), true) @@ -119,5 +79,4 @@ namespace Tizen.NUI throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } - } diff --git a/src/Tizen.NUI/src/internal/FaceCullingModeType.cs b/src/Tizen.NUI/src/internal/FaceCullingModeType.cs index dbd8e08d8..07971d34f 100755 --- a/src/Tizen.NUI/src/internal/FaceCullingModeType.cs +++ b/src/Tizen.NUI/src/internal/FaceCullingModeType.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal enum FaceCullingModeType { NONE, @@ -25,5 +24,4 @@ namespace Tizen.NUI BACK, FRONT_AND_BACK } - } diff --git a/src/Tizen.NUI/src/internal/FixedRuler.cs b/src/Tizen.NUI/src/internal/FixedRuler.cs index 644e5b3b3..288f4aa5b 100755 --- a/src/Tizen.NUI/src/internal/FixedRuler.cs +++ b/src/Tizen.NUI/src/internal/FixedRuler.cs @@ -19,7 +19,6 @@ using System.ComponentModel; namespace Tizen.NUI { - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public class FixedRuler : Ruler @@ -45,14 +44,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -119,7 +110,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/FloatSignal.cs b/src/Tizen.NUI/src/internal/FloatSignal.cs index 57f2289fb..7db553da8 100755 --- a/src/Tizen.NUI/src/internal/FloatSignal.cs +++ b/src/Tizen.NUI/src/internal/FloatSignal.cs @@ -14,11 +14,11 @@ * limitations under the License. * */ +using System.ComponentModel; namespace Tizen.NUI { - - internal class FloatSignal : global::System.IDisposable + internal class FloatSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +34,15 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~FloatSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +57,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -143,7 +103,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/FocusChangedSignal.cs b/src/Tizen.NUI/src/internal/FocusChangedSignal.cs index 3069d19a2..780286f14 100755 --- a/src/Tizen.NUI/src/internal/FocusChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/FocusChangedSignal.cs @@ -14,11 +14,11 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - internal class FocusChangedSignal : global::System.IDisposable + internal class FocusChangedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~FocusChangedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,10 +55,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.FocusChangedSignal.FocusChangedSignal_Empty(swigCPtr); @@ -143,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs b/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs index 67eda6b4f..7fa01a8cb 100755 --- a/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs @@ -14,11 +14,11 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - internal class FocusGroupChangedSignal : global::System.IDisposable + internal class FocusGroupChangedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~FocusGroupChangedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +55,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -142,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/FontDescription.cs b/src/Tizen.NUI/src/internal/FontDescription.cs index 7541b5603..6d54d54a8 100755 --- a/src/Tizen.NUI/src/internal/FontDescription.cs +++ b/src/Tizen.NUI/src/internal/FontDescription.cs @@ -16,8 +16,7 @@ */ namespace Tizen.NUI { - - internal class FontDescription : global::System.IDisposable + internal class FontDescription : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -33,55 +32,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - protected bool disposed = false; - - ~FontDescription() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -95,7 +52,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public FontDescription() : this(Interop.FontClient.new_FontDescription(), true) @@ -177,7 +134,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/FontMetrics.cs b/src/Tizen.NUI/src/internal/FontMetrics.cs index 257c92902..e209d50cf 100755 --- a/src/Tizen.NUI/src/internal/FontMetrics.cs +++ b/src/Tizen.NUI/src/internal/FontMetrics.cs @@ -16,8 +16,7 @@ */ namespace Tizen.NUI { - - internal class FontMetrics : global::System.IDisposable + internal class FontMetrics : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -33,55 +32,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - protected bool disposed = false; - - ~FontMetrics() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -95,7 +52,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public FontMetrics() : this(Interop.FontClient.new_FontMetrics__SWIG_0(), true) @@ -182,7 +139,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/FrameBuffer.cs b/src/Tizen.NUI/src/internal/FrameBuffer.cs index 277235fa3..c4ceb1121 100755 --- a/src/Tizen.NUI/src/internal/FrameBuffer.cs +++ b/src/Tizen.NUI/src/internal/FrameBuffer.cs @@ -19,7 +19,6 @@ using System.Runtime.InteropServices; namespace Tizen.NUI { - internal class FrameBuffer : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -41,14 +40,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -109,7 +100,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/FrameBufferImage.cs b/src/Tizen.NUI/src/internal/FrameBufferImage.cs index bc7fc7725..20ed16e74 100755 --- a/src/Tizen.NUI/src/internal/FrameBufferImage.cs +++ b/src/Tizen.NUI/src/internal/FrameBufferImage.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class FrameBufferImage : Image { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -39,19 +38,9 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) @@ -65,37 +54,36 @@ namespace Tizen.NUI base.Dispose(type); } - public FrameBufferImage(uint width, uint height, PixelFormat pixelFormat, RenderBufferFormat bufferFormat) : this(Interop.FrameBufferImage.FrameBufferImage_New__SWIG_0(width, height, (int)pixelFormat, (int)bufferFormat), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public FrameBufferImage(uint width, uint height, PixelFormat pixelFormat) : this(Interop.FrameBufferImage.FrameBufferImage_New__SWIG_1(width, height, (int)pixelFormat), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public FrameBufferImage(uint width, uint height) : this(Interop.FrameBufferImage.FrameBufferImage_New__SWIG_2(width, height), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public FrameBufferImage(uint width) : this(Interop.FrameBufferImage.FrameBufferImage_New__SWIG_3(width), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public FrameBufferImage() : this(Interop.FrameBufferImage.FrameBufferImage_New__SWIG_4(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public FrameBufferImage(NativeImageInterface image) : this(Interop.FrameBufferImage.FrameBufferImage_New__SWIG_5(NativeImageInterface.getCPtr(image)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public new static FrameBufferImage DownCast(BaseHandle handle) { FrameBufferImage ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as FrameBufferImage; @@ -114,7 +102,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/FriendAssembly.cs b/src/Tizen.NUI/src/internal/FriendAssembly.cs index d0864b74e..3e2e42a8f 100755 --- a/src/Tizen.NUI/src/internal/FriendAssembly.cs +++ b/src/Tizen.NUI/src/internal/FriendAssembly.cs @@ -33,8 +33,3 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Tizen.TV.FLUX, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")] [assembly: InternalsVisibleTo("Tizen.TV.FLUX.Component, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")] [assembly: InternalsVisibleTo("Tizen.TV.FLUX.Example, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")] - - -namespace Tizen.NUI -{ -} diff --git a/src/Tizen.NUI/src/internal/GaussianBlurView.cs b/src/Tizen.NUI/src/internal/GaussianBlurView.cs index 57be5826f..405f16233 100755 --- a/src/Tizen.NUI/src/internal/GaussianBlurView.cs +++ b/src/Tizen.NUI/src/internal/GaussianBlurView.cs @@ -14,16 +14,12 @@ * limitations under the License. * */ - +using System; +using System.Runtime.InteropServices; using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - - using System; - using System.Runtime.InteropServices; - - internal class GaussianBlurView : View { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -45,14 +41,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -70,8 +58,6 @@ namespace Tizen.NUI base.Dispose(type); } - - /// 3 public class FinishedEventArgs : EventArgs { @@ -145,18 +131,18 @@ namespace Tizen.NUI public GaussianBlurView() : this(Interop.GaussianBlurView.GaussianBlurView_New__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public GaussianBlurView(uint numSamples, float blurBellCurveWidth, PixelFormat renderTargetPixelFormat, float downsampleWidthScale, float downsampleHeightScale, bool blurUserImage) : this(Interop.GaussianBlurView.GaussianBlurView_New__SWIG_1(numSamples, blurBellCurveWidth, (int)renderTargetPixelFormat, downsampleWidthScale, downsampleHeightScale, blurUserImage), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public GaussianBlurView(uint numSamples, float blurBellCurveWidth, PixelFormat renderTargetPixelFormat, float downsampleWidthScale, float downsampleHeightScale) : this(Interop.GaussianBlurView.GaussianBlurView_New__SWIG_2(numSamples, blurBellCurveWidth, (int)renderTargetPixelFormat, downsampleWidthScale, downsampleHeightScale), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public GaussianBlurView(GaussianBlurView handle) : this(Interop.GaussianBlurView.new_GaussianBlurView__SWIG_1(GaussianBlurView.getCPtr(handle)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -245,7 +231,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs b/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs index 61194c06b..17bc0e252 100755 --- a/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs +++ b/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class GaussianBlurViewSignal : global::System.IDisposable + internal class GaussianBlurViewSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~GaussianBlurViewSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,10 +54,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.GaussianBlurViewSignal.GaussianBlurViewSignal_Empty(swigCPtr); @@ -143,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/GlyphInfo.cs b/src/Tizen.NUI/src/internal/GlyphInfo.cs index ddacf15b0..2f0f1b347 100755 --- a/src/Tizen.NUI/src/internal/GlyphInfo.cs +++ b/src/Tizen.NUI/src/internal/GlyphInfo.cs @@ -16,8 +16,7 @@ */ namespace Tizen.NUI { - - internal class GlyphInfo : global::System.IDisposable + internal class GlyphInfo : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -33,55 +32,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - protected bool disposed = false; - - ~GlyphInfo() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -95,7 +52,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public GlyphInfo() : this(Interop.GlytphInfo.new_GlyphInfo__SWIG_0(), true) @@ -227,7 +184,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/HoverSignal.cs b/src/Tizen.NUI/src/internal/HoverSignal.cs index 43a1fea82..06e940e7d 100755 --- a/src/Tizen.NUI/src/internal/HoverSignal.cs +++ b/src/Tizen.NUI/src/internal/HoverSignal.cs @@ -14,12 +14,11 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - - internal class HoverSignal : global::System.IDisposable + internal class HoverSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -35,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~HoverSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -98,10 +55,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.ActorHoverSignal.ActorHoverSignal_Empty(swigCPtr); @@ -145,7 +101,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/Image.cs b/src/Tizen.NUI/src/internal/Image.cs index bf791d914..9374f6954 100755 --- a/src/Tizen.NUI/src/internal/Image.cs +++ b/src/Tizen.NUI/src/internal/Image.cs @@ -14,14 +14,11 @@ * limitations under the License. * */ +using System; +using System.Runtime.InteropServices; namespace Tizen.NUI { - - using System; - using System.Runtime.InteropServices; - - internal class Image : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -43,14 +40,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -68,8 +57,6 @@ namespace Tizen.NUI base.Dispose(type); } - - /** * @brief Event arguments that passed via Uploaded signal * @@ -151,7 +138,6 @@ namespace Tizen.NUI } } - public static Image GetImageFromPtr(global::System.IntPtr cPtr) { Image ret = new Image(cPtr, false); @@ -159,7 +145,6 @@ namespace Tizen.NUI return ret; } - public Image() : this(Interop.Image.new_Image__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -204,7 +189,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/ImageSignal.cs b/src/Tizen.NUI/src/internal/ImageSignal.cs index 21a1c6daf..7b97aa527 100755 --- a/src/Tizen.NUI/src/internal/ImageSignal.cs +++ b/src/Tizen.NUI/src/internal/ImageSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class ImageSignal : global::System.IDisposable + internal class ImageSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ImageSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,10 +54,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.Image.ImageSignal_Empty(swigCPtr); @@ -143,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/InputMethodOptions.cs b/src/Tizen.NUI/src/internal/InputMethodOptions.cs index 4a37dd7ff..ca9d805db 100755 --- a/src/Tizen.NUI/src/internal/InputMethodOptions.cs +++ b/src/Tizen.NUI/src/internal/InputMethodOptions.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class InputMethodOptions : global::System.IDisposable + internal class InputMethodOptions : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,53 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~InputMethodOptions() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -95,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public InputMethodOptions() : this(Interop.InputMethodOptions.new_InputMethodOptions(), true) @@ -128,7 +87,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/Item.cs b/src/Tizen.NUI/src/internal/Item.cs index 3017b5656..0b3ce746e 100755 --- a/src/Tizen.NUI/src/internal/Item.cs +++ b/src/Tizen.NUI/src/internal/Item.cs @@ -16,14 +16,13 @@ */ using System.ComponentModel; +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public class Item : global::System.IDisposable + public class Item : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -42,63 +41,15 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// A Flag to check if it is already disposed. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - protected bool disposed = false; - - - /// Destructor. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - ~Item() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -113,7 +64,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. @@ -171,7 +122,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/ItemContainer.cs b/src/Tizen.NUI/src/internal/ItemContainer.cs index aa3682c50..c7ef5ebab 100755 --- a/src/Tizen.NUI/src/internal/ItemContainer.cs +++ b/src/Tizen.NUI/src/internal/ItemContainer.cs @@ -22,8 +22,8 @@ namespace Tizen.NUI /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public class ItemContainer : global::System.IDisposable, global::System.Collections.IEnumerable - , global::System.Collections.Generic.IEnumerable + public class ItemContainer : Disposable, global::System.Collections.IEnumerable, + global::System.Collections.Generic.IEnumerable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -42,62 +42,15 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// A Flag to check if it is already disposed. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - protected bool disposed = false; - - /// Destructor. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - ~ItemContainer() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -112,7 +65,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. @@ -255,8 +208,8 @@ namespace Tizen.NUI /// tricky to detect unmanaged code that modifies the collection under our feet. /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public sealed class ItemContainerEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator + public sealed class ItemContainerEnumerator : global::System.Collections.IEnumerator, + global::System.Collections.Generic.IEnumerator { private ItemContainer collectionRef; private int currentIndex; @@ -498,7 +451,5 @@ namespace Tizen.NUI Interop.ItemContainer.ItemContainer_SetRange(swigCPtr, index, ItemContainer.getCPtr(values)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ItemFactory.cs b/src/Tizen.NUI/src/internal/ItemFactory.cs index d595f03a7..129f2963b 100755 --- a/src/Tizen.NUI/src/internal/ItemFactory.cs +++ b/src/Tizen.NUI/src/internal/ItemFactory.cs @@ -23,7 +23,7 @@ namespace Tizen.NUI { /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public class ItemFactory : global::System.IDisposable + public class ItemFactory : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -42,62 +42,15 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// A Flag to check if it is already disposed. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - protected bool disposed = false; - - /// Destructor. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - ~ItemFactory() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -112,7 +65,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. @@ -203,5 +156,4 @@ namespace Tizen.NUI private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { typeof(uint) }; private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { typeof(uint), typeof(View) }; } - } diff --git a/src/Tizen.NUI/src/internal/ItemIdContainer.cs b/src/Tizen.NUI/src/internal/ItemIdContainer.cs index 021fd65db..55f30d51a 100755 --- a/src/Tizen.NUI/src/internal/ItemIdContainer.cs +++ b/src/Tizen.NUI/src/internal/ItemIdContainer.cs @@ -19,11 +19,10 @@ using System.ComponentModel; namespace Tizen.NUI { - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public class ItemIdContainer : global::System.IDisposable, global::System.Collections.IEnumerable - , global::System.Collections.Generic.IList + public class ItemIdContainer : Disposable, global::System.Collections.IEnumerable, + global::System.Collections.Generic.IList { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -42,62 +41,15 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// A Flag to check if it is already disposed. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - protected bool disposed = false; - - /// Destructor. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - ~ItemIdContainer() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -112,7 +64,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. @@ -534,7 +486,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/ItemLayout.cs b/src/Tizen.NUI/src/internal/ItemLayout.cs index b74ad0873..85b2ec8bf 100755 --- a/src/Tizen.NUI/src/internal/ItemLayout.cs +++ b/src/Tizen.NUI/src/internal/ItemLayout.cs @@ -20,7 +20,6 @@ using System.ComponentModel; namespace Tizen.NUI { - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public class ItemLayout : RefObject @@ -46,14 +45,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -71,7 +62,6 @@ namespace Tizen.NUI base.Dispose(type); } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public void SetLayoutProperties(PropertyMap properties) @@ -237,7 +227,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/ItemRange.cs b/src/Tizen.NUI/src/internal/ItemRange.cs index 48fe8c799..90074d2cf 100755 --- a/src/Tizen.NUI/src/internal/ItemRange.cs +++ b/src/Tizen.NUI/src/internal/ItemRange.cs @@ -19,10 +19,9 @@ using System.ComponentModel; namespace Tizen.NUI { - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public class ItemRange : global::System.IDisposable + public class ItemRange : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -41,62 +40,15 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// A Flag to check if it is already disposed. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - protected bool disposed = false; - - /// Destructor. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - ~ItemRange() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -111,10 +63,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public ItemRange(uint beginItem, uint endItem) : this(Interop.ItemRange.new_ItemRange__SWIG_0(beginItem, endItem), true) @@ -189,7 +140,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/KeyEventSignal.cs b/src/Tizen.NUI/src/internal/KeyEventSignal.cs index a5c1407b8..82717e62a 100755 --- a/src/Tizen.NUI/src/internal/KeyEventSignal.cs +++ b/src/Tizen.NUI/src/internal/KeyEventSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class KeyEventSignal : global::System.IDisposable + internal class KeyEventSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~KeyEventSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -142,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs b/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs index 6a583fa4a..be18bb594 100755 --- a/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs +++ b/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs @@ -40,19 +40,10 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) @@ -104,5 +95,4 @@ namespace Tizen.NUI return ret; } } - } diff --git a/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs b/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs index bdcd842d6..9268f43ba 100755 --- a/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs +++ b/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs @@ -19,8 +19,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - - internal class KeyInputFocusSignal : global::System.IDisposable + internal class KeyInputFocusSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -36,55 +35,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~KeyInputFocusSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -99,7 +56,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -144,7 +101,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs b/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs index 016470f6e..cd4fe6b6a 100755 --- a/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs +++ b/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs @@ -20,7 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - internal class KeyboardEventSignalType : global::System.IDisposable + internal class KeyboardEventSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -40,69 +40,17 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - /// /// Dispose /// /// 3 - ~KeyboardEventSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// - /// Dispose - /// - /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -117,7 +65,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -194,7 +142,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs b/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs index 9b1d82086..559483c2d 100755 --- a/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs +++ b/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs @@ -20,7 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - internal class KeyboardResizedSignalType : global::System.IDisposable + internal class KeyboardResizedSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -40,68 +40,17 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// 4 - protected bool disposed = false; - - /// - /// Dispose - /// - ~KeyboardResizedSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose - /// - /// 4 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Dispose /// /// 4 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -116,7 +65,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -190,7 +139,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs b/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs index cf94a4d02..e73d757b2 100755 --- a/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs +++ b/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs @@ -22,7 +22,7 @@ namespace Tizen.NUI /// KeyboardTypeSignalType /// /// 4 - public class KeyboardTypeSignalType : global::System.IDisposable + public class KeyboardTypeSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -42,69 +42,17 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// 4 - protected bool disposed = false; - - /// - /// Dispose - /// - /// 3 - ~KeyboardTypeSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// Dispose /// /// 4 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// - /// Dispose - /// - /// 4 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -119,7 +67,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -193,6 +141,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } } diff --git a/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs b/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs index f7bee6610..b6a70ab8e 100755 --- a/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs +++ b/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs @@ -20,7 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - internal class LanguageChangedSignalType : global::System.IDisposable + internal class LanguageChangedSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -40,68 +40,17 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// 4 - protected bool disposed = false; - - /// - /// Dispose - /// - ~LanguageChangedSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose - /// - /// 4 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Dispose /// /// 4 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -116,7 +65,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -189,7 +138,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs index b980777f9..249f99dc5 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs @@ -27,7 +27,7 @@ namespace Tizen.NUI /// [Draft] The class that initiates the Measuring and Layouting of the tree, /// It sets a callback that becomes the entry point into the C# Layouting. /// - internal class LayoutController : global::System.IDisposable + internal class LayoutController : Disposable { static bool LayoutDebugController = false; // Debug flag @@ -38,9 +38,6 @@ namespace Tizen.NUI event Callback _instance; - // A Flag to check if it is already disposed. - protected bool disposed = false; - private Window _window; Animation _coreAnimation; @@ -92,21 +89,6 @@ namespace Tizen.NUI } } - /// - /// Destructor which adds LayoutController to the Dispose queue. - /// - ~LayoutController() - { - } - - /// - /// Explict Dispose. - /// - public void Dispose() - { - Dispose(DisposeTypes.Explicit); - } - /// /// Add transition data for a LayoutItem to the transition stack. /// @@ -132,20 +114,13 @@ namespace Tizen.NUI /// /// Dispose Explict or Implicit /// - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User code - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -156,7 +131,7 @@ namespace Tizen.NUI unmanagedLayoutController = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } // Traverse through children from the provided root. @@ -223,7 +198,7 @@ namespace Tizen.NUI else { // Parent not a View so assume it's a Layer which is the size of the window. - rootSize = _window.WindowSize; + rootSize = new Size2D(_window.Size.Width, _window.Size.Height); } // Determine measure specification for root. @@ -577,5 +552,4 @@ namespace Tizen.NUI } } // class LayoutController - } // namespace Tizen.NUI diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutItem.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutItem.cs index 27b0c72e2..ba97aef14 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutItem.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutItem.cs @@ -539,6 +539,5 @@ namespace Tizen.NUI return changed; } - } } diff --git a/src/Tizen.NUI/src/internal/ListEventSignalType.cs b/src/Tizen.NUI/src/internal/ListEventSignalType.cs index f36f669e1..220ac443c 100755 --- a/src/Tizen.NUI/src/internal/ListEventSignalType.cs +++ b/src/Tizen.NUI/src/internal/ListEventSignalType.cs @@ -20,7 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - internal class ListEventSignalType : global::System.IDisposable + internal class ListEventSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -41,73 +41,18 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - protected bool disposed = false; - - /// - /// Dispose - /// - /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - ~ListEventSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose - /// - /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Dispose /// /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -122,7 +67,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -202,7 +147,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/LoadingState.cs b/src/Tizen.NUI/src/internal/LoadingState.cs index f9901aef4..f4b0017b7 100755 --- a/src/Tizen.NUI/src/internal/LoadingState.cs +++ b/src/Tizen.NUI/src/internal/LoadingState.cs @@ -17,12 +17,10 @@ namespace Tizen.NUI { - internal enum LoadingState { ResourceLoading, ResourceLoadingSucceeded, ResourceLoadingFailed } - } diff --git a/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs index d6a8ee171..c15dcf013 100755 --- a/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs @@ -14,11 +14,11 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - internal class LongPressGestureDetectedSignal : global::System.IDisposable + internal class LongPressGestureDetectedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~LongPressGestureDetectedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,11 +55,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - - public bool Empty() { bool ret = Interop.LongPressGestureDetectedSignal.LongPressGestureDetectedSignal_Empty(swigCPtr); @@ -144,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/LowBatterySignalType.cs b/src/Tizen.NUI/src/internal/LowBatterySignalType.cs index 83b3b653c..1e1b3f763 100755 --- a/src/Tizen.NUI/src/internal/LowBatterySignalType.cs +++ b/src/Tizen.NUI/src/internal/LowBatterySignalType.cs @@ -17,11 +17,10 @@ namespace Tizen.NUI { - /// /// LowBatterySignalType. /// - internal class LowBatterySignalType : global::System.IDisposable + internal class LowBatterySignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -41,69 +40,18 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// - /// A Flat to check if it is already disposed. - /// - protected bool disposed = false; - - - /// - /// Distructor. - /// - ~LowBatterySignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose. - /// - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// you can override it to clean-up your own resources. /// /// DisposeTypes /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -117,7 +65,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -181,8 +129,6 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/LowMemorySignalType.cs b/src/Tizen.NUI/src/internal/LowMemorySignalType.cs index a03fa8352..61b357158 100755 --- a/src/Tizen.NUI/src/internal/LowMemorySignalType.cs +++ b/src/Tizen.NUI/src/internal/LowMemorySignalType.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class LowMemorySignalType : global::System.IDisposable + internal class LowMemorySignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~LowMemorySignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -95,7 +53,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -140,7 +98,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/Matrix.cs b/src/Tizen.NUI/src/internal/Matrix.cs index 879341af1..0f692d56e 100755 --- a/src/Tizen.NUI/src/internal/Matrix.cs +++ b/src/Tizen.NUI/src/internal/Matrix.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class Matrix : global::System.IDisposable + internal class Matrix : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,56 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~Matrix() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -98,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -316,7 +272,5 @@ namespace Tizen.NUI Interop.Matrix.Matrix_GetTransformComponents(swigCPtr, Vector3.getCPtr(position), Rotation.getCPtr(rotation), Vector3.getCPtr(scale)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/Matrix3.cs b/src/Tizen.NUI/src/internal/Matrix3.cs index 210afa9b5..733f31eac 100755 --- a/src/Tizen.NUI/src/internal/Matrix3.cs +++ b/src/Tizen.NUI/src/internal/Matrix3.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class Matrix3 : global::System.IDisposable + internal class Matrix3 : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~Matrix3() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public static Matrix3 IDENTITY @@ -212,7 +169,5 @@ namespace Tizen.NUI Interop.Matrix.Matrix3_Multiply(Matrix3.getCPtr(result), Matrix3.getCPtr(lhs), Matrix3.getCPtr(rhs)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/NDalic.cs b/src/Tizen.NUI/src/internal/NDalic.cs index b5c191832..fcb2fbd53 100755 --- a/src/Tizen.NUI/src/internal/NDalic.cs +++ b/src/Tizen.NUI/src/internal/NDalic.cs @@ -19,7 +19,6 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - internal class NDalic { public static uint int_to_uint(int x) @@ -29,7 +28,6 @@ namespace Tizen.NUI return ret; } - public static readonly int VISUAL_PROPERTY_TRANSFORM = Interop.Visual.Visual_Property_TRANSFORM_get(); public static readonly int VISUAL_PROPERTY_PREMULTIPLIED_ALPHA = Interop.Visual.Visual_Property_PREMULTIPLIED_ALPHA_get(); public static readonly int VISUAL_PROPERTY_MIX_COLOR = Interop.Visual.Visual_Property_MIX_COLOR_get(); @@ -940,7 +938,5 @@ namespace Tizen.NUI internal static readonly int TOOLTIP_TAIL_VISIBILITY = Interop.NDalicToolTip.TOOLTIP_TAIL_VISIBILITY_get(); internal static readonly int TOOLTIP_TAIL_ABOVE_VISUAL = Interop.NDalicToolTip.TOOLTIP_TAIL_ABOVE_VISUAL_get(); internal static readonly int TOOLTIP_TAIL_BELOW_VISUAL = Interop.NDalicToolTip.TOOLTIP_TAIL_BELOW_VISUAL_get(); - } - } diff --git a/src/Tizen.NUI/src/internal/NUICoreBackend.cs b/src/Tizen.NUI/src/internal/NUICoreBackend.cs index bf7f0d2a8..76cce4721 100755 --- a/src/Tizen.NUI/src/internal/NUICoreBackend.cs +++ b/src/Tizen.NUI/src/internal/NUICoreBackend.cs @@ -17,7 +17,6 @@ using System; using System.Collections.Generic; - using Tizen.Applications.CoreBackend; using Tizen.Applications; @@ -97,7 +96,6 @@ namespace Tizen.NUI Handlers.Add(evType, handler); } - /// /// The Dispose function. /// @@ -331,14 +329,12 @@ namespace Tizen.NUI handler?.Invoke(); } - - internal Application ApplicationHandle - { - get - { - return _application; - } - } - + internal Application ApplicationHandle + { + get + { + return _application; + } + } } } diff --git a/src/Tizen.NUI/src/internal/NUIWidgetCoreBackend.cs b/src/Tizen.NUI/src/internal/NUIWidgetCoreBackend.cs index 55c719373..7798fd622 100755 --- a/src/Tizen.NUI/src/internal/NUIWidgetCoreBackend.cs +++ b/src/Tizen.NUI/src/internal/NUIWidgetCoreBackend.cs @@ -17,7 +17,6 @@ using System; using System.Collections.Generic; - using Tizen.Applications.CoreBackend; using Tizen.Applications; diff --git a/src/Tizen.NUI/src/internal/NativeImage.cs b/src/Tizen.NUI/src/internal/NativeImage.cs index 88096b8ad..7d1a24f7a 100755 --- a/src/Tizen.NUI/src/internal/NativeImage.cs +++ b/src/Tizen.NUI/src/internal/NativeImage.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class NativeImage : Image { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -39,14 +38,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -64,7 +55,6 @@ namespace Tizen.NUI base.Dispose(type); } - public NativeImage(NativeImageInterface nativeImageInterface) : this(Interop.NativeImageInterface.NativeImage_New(NativeImageInterface.getCPtr(nativeImageInterface)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -108,7 +98,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/NativeImageInterface.cs b/src/Tizen.NUI/src/internal/NativeImageInterface.cs index 1c75c8933..9149bae14 100755 --- a/src/Tizen.NUI/src/internal/NativeImageInterface.cs +++ b/src/Tizen.NUI/src/internal/NativeImageInterface.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class NativeImageInterface : RefObject { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -39,19 +38,10 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) @@ -111,7 +101,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/Object.cs b/src/Tizen.NUI/src/internal/Object.cs index 03390197d..b452a43f7 100755 --- a/src/Tizen.NUI/src/internal/Object.cs +++ b/src/Tizen.NUI/src/internal/Object.cs @@ -15,7 +15,6 @@ * */ - namespace Tizen.NUI { /// @@ -48,5 +47,4 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } - } diff --git a/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs b/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs index 172d23ec6..9ad5cbf2a 100755 --- a/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs +++ b/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class ObjectCreatedSignal : global::System.IDisposable + internal class ObjectCreatedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ObjectCreatedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -143,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs b/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs index e5c26e9d8..2c685698d 100755 --- a/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs +++ b/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class ObjectDestroyedSignal : global::System.IDisposable + internal class ObjectDestroyedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ObjectDestroyedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -143,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ObjectRegistry.cs b/src/Tizen.NUI/src/internal/ObjectRegistry.cs index bf0c9a7e8..47aa6ef71 100755 --- a/src/Tizen.NUI/src/internal/ObjectRegistry.cs +++ b/src/Tizen.NUI/src/internal/ObjectRegistry.cs @@ -14,14 +14,11 @@ * limitations under the License. * */ +using System; +using System.Runtime.InteropServices; namespace Tizen.NUI { - - using System; - using System.Runtime.InteropServices; - - internal class ObjectRegistry : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -43,14 +40,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -68,7 +57,6 @@ namespace Tizen.NUI base.Dispose(type); } - /// 3 public class ObjectCreatedEventArgs : EventArgs { @@ -107,7 +95,6 @@ namespace Tizen.NUI } } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ObjectCreatedEventCallbackDelegate(IntPtr baseHandle); private DaliEventHandler _objectRegistryObjectCreatedEventHandler; @@ -241,7 +228,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/PageFactory.cs b/src/Tizen.NUI/src/internal/PageFactory.cs index 6052942d7..8a14b7861 100755 --- a/src/Tizen.NUI/src/internal/PageFactory.cs +++ b/src/Tizen.NUI/src/internal/PageFactory.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class PageFactory : global::System.IDisposable + internal class PageFactory : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~PageFactory() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public virtual uint GetNumberOfPages() @@ -113,7 +70,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/PagePanSignal.cs b/src/Tizen.NUI/src/internal/PagePanSignal.cs index 1639ef789..53bf25bda 100755 --- a/src/Tizen.NUI/src/internal/PagePanSignal.cs +++ b/src/Tizen.NUI/src/internal/PagePanSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class PagePanSignal : global::System.IDisposable + internal class PagePanSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~PagePanSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -142,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/PageTurnLandscapeView.cs b/src/Tizen.NUI/src/internal/PageTurnLandscapeView.cs index 5b56dba2f..948b38566 100755 --- a/src/Tizen.NUI/src/internal/PageTurnLandscapeView.cs +++ b/src/Tizen.NUI/src/internal/PageTurnLandscapeView.cs @@ -39,14 +39,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -87,7 +79,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/PageTurnPortraitView.cs b/src/Tizen.NUI/src/internal/PageTurnPortraitView.cs index 0ad68dfb7..9c77da950 100755 --- a/src/Tizen.NUI/src/internal/PageTurnPortraitView.cs +++ b/src/Tizen.NUI/src/internal/PageTurnPortraitView.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class PageTurnPortraitView : PageTurnView { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -39,14 +38,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -67,8 +58,8 @@ namespace Tizen.NUI public PageTurnPortraitView(PageFactory pageFactory, Vector2 pageSize) : this(Interop.PageTurnPortraitView.PageTurnPortraitView_New(PageFactory.getCPtr(pageFactory), Vector2.getCPtr(pageSize)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public PageTurnPortraitView(PageTurnPortraitView pageTurnPortraitView) : this(Interop.PageTurnPortraitView.new_PageTurnPortraitView__SWIG_1(PageTurnPortraitView.getCPtr(pageTurnPortraitView)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -87,7 +78,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/PageTurnSignal.cs b/src/Tizen.NUI/src/internal/PageTurnSignal.cs index fc172663a..3bf1c29d6 100755 --- a/src/Tizen.NUI/src/internal/PageTurnSignal.cs +++ b/src/Tizen.NUI/src/internal/PageTurnSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class PageTurnSignal : global::System.IDisposable + internal class PageTurnSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~PageTurnSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -142,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs index 396ef1f35..f96c3d9d9 100755 --- a/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs @@ -14,11 +14,11 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - internal class PanGestureDetectedSignal : global::System.IDisposable + internal class PanGestureDetectedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~PanGestureDetectedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +55,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -143,7 +101,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs index a1216b4bb..f98f7dea3 100755 --- a/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs @@ -14,11 +14,11 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - internal class PinchGestureDetectedSignal : global::System.IDisposable + internal class PinchGestureDetectedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~PinchGestureDetectedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +55,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -142,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs b/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs index bcb1c31ae..838d6e833 100755 --- a/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs +++ b/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs @@ -15,16 +15,15 @@ * */ -using Tizen.NUI.BaseComponents; - using System; +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { internal delegate IntPtr SwigDelegatePreFocusChangeSignal(IntPtr current, IntPtr proposed, View.FocusDirection direction); - internal class PreFocusChangeSignal : global::System.IDisposable + internal class PreFocusChangeSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -40,55 +39,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~PreFocusChangeSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -103,7 +60,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -146,7 +103,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs b/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs index 3ad1ad99d..6c7b618b3 100755 --- a/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class ProgressBarValueChangedSignal : global::System.IDisposable + internal class ProgressBarValueChangedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ProgressBarValueChangedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -143,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/PropertyHelper.cs b/src/Tizen.NUI/src/internal/PropertyHelper.cs index c50cfa86b..06a91ed49 100755 --- a/src/Tizen.NUI/src/internal/PropertyHelper.cs +++ b/src/Tizen.NUI/src/internal/PropertyHelper.cs @@ -14,11 +14,10 @@ * limitations under the License. * */ +using System.Text; namespace Tizen.NUI { - using System.Text; - internal static class PropertyHelper { /// diff --git a/src/Tizen.NUI/src/internal/PropertyRangeManager.cs b/src/Tizen.NUI/src/internal/PropertyRangeManager.cs index d6e8f6392..42be51c68 100755 --- a/src/Tizen.NUI/src/internal/PropertyRangeManager.cs +++ b/src/Tizen.NUI/src/internal/PropertyRangeManager.cs @@ -109,7 +109,6 @@ namespace Tizen.NUI } - /// 3 public struct PropertyRange { @@ -129,7 +128,6 @@ namespace Tizen.NUI } } - /// 3 public int startEventIndex; // start of the property range /// 3 @@ -140,8 +138,5 @@ namespace Tizen.NUI /// 3 public int lastUsedAnimationIndex; // last used of the property index }; - - - } } diff --git a/src/Tizen.NUI/src/internal/PropertyRanges.cs b/src/Tizen.NUI/src/internal/PropertyRanges.cs index da3814f87..b063505c8 100755 --- a/src/Tizen.NUI/src/internal/PropertyRanges.cs +++ b/src/Tizen.NUI/src/internal/PropertyRanges.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal enum PropertyRanges { DEFAULT_OBJECT_PROPERTY_START_INDEX = 0, @@ -39,5 +38,4 @@ namespace Tizen.NUI PROPERTY_CUSTOM_MAX_INDEX = 59999999, CORE_PROPERTY_MAX_INDEX = PROPERTY_CUSTOM_MAX_INDEX } - } diff --git a/src/Tizen.NUI/src/internal/PropertyRegistration.cs b/src/Tizen.NUI/src/internal/PropertyRegistration.cs index f23ebd90a..585d1da48 100755 --- a/src/Tizen.NUI/src/internal/PropertyRegistration.cs +++ b/src/Tizen.NUI/src/internal/PropertyRegistration.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class PropertyRegistration : global::System.IDisposable + internal class PropertyRegistration : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~PropertyRegistration() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -105,7 +62,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/RefObject.cs b/src/Tizen.NUI/src/internal/RefObject.cs index 48172a97c..30f069b54 100755 --- a/src/Tizen.NUI/src/internal/RefObject.cs +++ b/src/Tizen.NUI/src/internal/RefObject.cs @@ -21,7 +21,7 @@ namespace Tizen.NUI { /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public class RefObject : global::System.IDisposable + public class RefObject : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -40,62 +40,15 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// A Flag to check if it is already disposed. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - protected bool disposed = false; - - /// Destructor. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - ~RefObject() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -110,7 +63,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. @@ -146,7 +99,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/Registry.cs b/src/Tizen.NUI/src/internal/Registry.cs index 1f951a2d2..18e0e9338 100755 --- a/src/Tizen.NUI/src/internal/Registry.cs +++ b/src/Tizen.NUI/src/internal/Registry.cs @@ -169,7 +169,5 @@ namespace Tizen.NUI Tizen.Log.Fatal("NUI", $"Error! current thread({currentId}) which is NOT main thread({mainThreadId}) utilizes NUI object!"); } } - - } } diff --git a/src/Tizen.NUI/src/internal/RenderBufferFormat.cs b/src/Tizen.NUI/src/internal/RenderBufferFormat.cs index f3b7c6568..4c4d4ecd6 100755 --- a/src/Tizen.NUI/src/internal/RenderBufferFormat.cs +++ b/src/Tizen.NUI/src/internal/RenderBufferFormat.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal enum RenderBufferFormat { COLOR, @@ -25,5 +24,4 @@ namespace Tizen.NUI COLOR_STENCIL, COLOR_DEPTH_STENCIL } - } diff --git a/src/Tizen.NUI/src/internal/RenderModeType.cs b/src/Tizen.NUI/src/internal/RenderModeType.cs index 96ed16a61..db1d4a13f 100755 --- a/src/Tizen.NUI/src/internal/RenderModeType.cs +++ b/src/Tizen.NUI/src/internal/RenderModeType.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal enum RenderModeType { NONE, @@ -26,5 +25,4 @@ namespace Tizen.NUI STENCIL, COLOR_STENCIL } - } diff --git a/src/Tizen.NUI/src/internal/RenderTaskList.cs b/src/Tizen.NUI/src/internal/RenderTaskList.cs index 955009072..d38997f13 100755 --- a/src/Tizen.NUI/src/internal/RenderTaskList.cs +++ b/src/Tizen.NUI/src/internal/RenderTaskList.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class RenderTaskList : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -39,19 +38,10 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) @@ -115,7 +105,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/RenderTaskSignal.cs b/src/Tizen.NUI/src/internal/RenderTaskSignal.cs index 3e15af669..e8e3d8551 100755 --- a/src/Tizen.NUI/src/internal/RenderTaskSignal.cs +++ b/src/Tizen.NUI/src/internal/RenderTaskSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class RenderTaskSignal : global::System.IDisposable + internal class RenderTaskSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~RenderTaskSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -105,7 +62,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/RenderingType.cs b/src/Tizen.NUI/src/internal/RenderingType.cs index 796d83a8d..2eac9e902 100755 --- a/src/Tizen.NUI/src/internal/RenderingType.cs +++ b/src/Tizen.NUI/src/internal/RenderingType.cs @@ -17,11 +17,9 @@ namespace Tizen.NUI { - internal enum RenderingType { RENDERING_SHARED_ATLAS, RENDERING_VECTOR_BASED } - } diff --git a/src/Tizen.NUI/src/internal/ResizedSignal.cs b/src/Tizen.NUI/src/internal/ResizedSignal.cs index 54e446236..0be79b43b 100755 --- a/src/Tizen.NUI/src/internal/ResizedSignal.cs +++ b/src/Tizen.NUI/src/internal/ResizedSignal.cs @@ -18,7 +18,7 @@ namespace Tizen.NUI { - internal class ResizedSignal : global::System.IDisposable + internal class ResizedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,53 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~ResizedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -95,10 +55,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.ResizedSignal.ResizedSignal_Empty(swigCPtr); @@ -141,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/Ruler.cs b/src/Tizen.NUI/src/internal/Ruler.cs index 8df78bc84..9187dbcea 100755 --- a/src/Tizen.NUI/src/internal/Ruler.cs +++ b/src/Tizen.NUI/src/internal/Ruler.cs @@ -44,14 +44,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -263,7 +255,5 @@ namespace Tizen.NUI /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. Free } - } - } diff --git a/src/Tizen.NUI/src/internal/RulerDomain.cs b/src/Tizen.NUI/src/internal/RulerDomain.cs index 1f6a998ec..5d3b5cd17 100755 --- a/src/Tizen.NUI/src/internal/RulerDomain.cs +++ b/src/Tizen.NUI/src/internal/RulerDomain.cs @@ -19,10 +19,9 @@ using System.ComponentModel; namespace Tizen.NUI { - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public class RulerDomain : global::System.IDisposable + public class RulerDomain : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -41,63 +40,15 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// A Flag to check if it is already disposed. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - protected bool disposed = false; - - - /// Destructor. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - ~RulerDomain() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -112,10 +63,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public RulerDomain(float min, float max, bool enabled) : this(Interop.Ruler.new_RulerDomain__SWIG_0(min, max, enabled), true) @@ -223,7 +173,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/RulerPtr.cs b/src/Tizen.NUI/src/internal/RulerPtr.cs index 6b13b65c7..a10b99c9e 100755 --- a/src/Tizen.NUI/src/internal/RulerPtr.cs +++ b/src/Tizen.NUI/src/internal/RulerPtr.cs @@ -21,7 +21,7 @@ namespace Tizen.NUI { /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public class RulerPtr : global::System.IDisposable + public class RulerPtr : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -40,64 +40,15 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - /// A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// A Flag to check if it is already disposed. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - protected bool disposed = false; - - /// Destructor. - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - - ~RulerPtr() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public void Dispose() - { - mRuler = null; - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -112,7 +63,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -418,7 +369,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs index ff1c2a89b..05b6b4297 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs @@ -36,5 +36,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Configuration__ContextLoss.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Configuration__ContextLoss.cs index f8612013f..d33dba5ee 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Configuration__ContextLoss.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Configuration__ContextLoss.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Configuration__ContextLoss { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs index 4909b413d..991889e5e 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs @@ -36,5 +36,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Constraint.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Constraint.cs index d0b01276b..caa4856ab 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Constraint.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Constraint.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__Constraint { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CustomActorImpl__Extension.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CustomActorImpl__Extension.cs index c9befa2d3..111aba9d3 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CustomActorImpl__Extension.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CustomActorImpl__Extension.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__CustomActorImpl__Extension { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs index a820f4ac2..3b1466de2 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs @@ -36,5 +36,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs index 3fbcf7243..9942def5b 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__Internal__Texture { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__TypeRegistry.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__TypeRegistry.cs index 472a6812c..e9b1918f8 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__TypeRegistry.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__TypeRegistry.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__Internal__TypeRegistry { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs index b6a2520e7..2eb8e0179 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs index 3246a312c..997b0ea27 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RectT_unsigned_int_t.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__RectT_unsigned_int_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RenderSurface.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RenderSurface.cs index e117d4d02..c9c1c29ca 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RenderSurface.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__RenderSurface.cs @@ -14,10 +14,8 @@ * limitations under the License. * */ - namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__RenderSurface { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -37,5 +35,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t.cs index 35318939a..a6340180b 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__SignalT_bool_fDali__Actor_Dali__TouchEvent_const_RF_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t.cs index 88e24e6f4..b1ca17de6 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__SignalT_bool_fDali__Toolkit__AccessibilityManager_R_Dali__TouchEvent_const_RF_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs index f07cda2b1..16dbd4955 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t.cs index bae8b9e46..3a5516e57 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle.cs index b09639983..584d7e31e 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t.cs index c09e5f3f6..4cc4d36bf 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextField_Dali__Toolkit__TextField__InputStyle__MaskF_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t.cs index d523deb56..7e31510ce 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__SignalT_void_fuint32_t_Dali__PixelDataF_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ClampState.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ClampState.cs index 510b8b5a4..bcbc7bb3b 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ClampState.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ClampState.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__Toolkit__ClampState { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.cs index e288d7844..7cf067a9c 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__Toolkit__Internal__AsyncImageLoader { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension.cs index 4628a6769..8487838a7 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__Toolkit__Internal__Control__Extension { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.cs index 049002aca..625bb3c4e 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.cs index 45333210d..8443f55a1 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__Toolkit__Internal__Visual__Base { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension.cs index cd942db0a..1ecbffa4d 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__Toolkit__ItemFactory__Extension { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__TouchEvent.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__TouchEvent.cs index a5e71bce0..7bedde3dd 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__TouchEvent.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__TouchEvent.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__TouchEvent { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.cs index 4194a8a77..380626969 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t.cs @@ -16,7 +16,6 @@ */ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__VectorT_uint32_t_TypeTraitsT_uint32_t_t__IS_TRIVIAL_TYPE__true_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -36,5 +35,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Widget__Impl.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Widget__Impl.cs index bd4e5fd19..6fafd0445 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Widget__Impl.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Widget__Impl.cs @@ -16,7 +16,6 @@ */ namespace Tizen.NUI { - internal class SWIGTYPE_p_Dali__Widget__Impl { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -36,5 +35,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_FunctorDelegate.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_FunctorDelegate.cs index 171b20b2b..25a31787f 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_FunctorDelegate.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_FunctorDelegate.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_FunctorDelegate { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs index b1a5186e9..1aeae47b9 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_KeyboardFocusManager { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_PropertyInputContainer.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_PropertyInputContainer.cs index 32f9d6514..829843146 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_PropertyInputContainer.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_PropertyInputContainer.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_PropertyInputContainer { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_double.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_double.cs index 048186e8b..e6952c186 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_double.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_double.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_double { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_float__float.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_float__float.cs index 209b5fea3..e25a4cf1f 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_float__float.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_float__float.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_f_float__float { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.cs index fa6d79ce6..e07a843eb 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_f_p_Dali__BaseObject_Dali__Property__Index__Dali__Property__Value { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.cs index e332f4f19..80c02c9cd 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_f_p_Dali__BaseObject_int_r_q_const__Dali__Property__Value__void { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface.cs index cce5fc9bb..3fa4b86b1 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.cs index 3b8400b24..5ec30f707 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_f_p_Dali__BaseObject_r_q_const__std__string_r_q_const__Dali__Property__Map__bool { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.cs index ca1cbb97a..378112dff 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_f_p_q_const__Dali__Any__AnyContainerBase__void { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_Dali__Vector2__bool.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_Dali__Vector2__bool.cs index bc2f6af93..7cd643a63 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_Dali__Vector2__bool.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_Dali__Vector2__bool.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_f_r_Dali__Vector2__bool { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.cs index d44c6c18a..1bef1b68e 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_f_r_q_const__Dali__Any__AnyContainerBase__p_Dali__Any__AnyContainerBase { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.cs index aa663d711..261bc0d2b 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_f_r_q_const__Dali__Vector3__float { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_float.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_float.cs index a014065fb..40255be1c 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_float.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_float.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_float { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs index a00f2ee8a..af6c90c34 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_int.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_int { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_p_Dali__TextAbstraction__VectorBlob.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_p_Dali__TextAbstraction__VectorBlob.cs index 2f7b44622..75493a562 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_p_Dali__TextAbstraction__VectorBlob.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_p_Dali__TextAbstraction__VectorBlob.cs @@ -16,7 +16,6 @@ */ namespace Tizen.NUI { - internal class SWIGTYPE_p_p_Dali__TextAbstraction__VectorBlob { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -36,5 +35,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__type_info.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__type_info.cs index d6a09d837..947e45b1b 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__type_info.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__type_info.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_std__type_info { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t.cs index 5eb7709e4..c7281667a 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t.cs @@ -16,7 +16,6 @@ */ namespace Tizen.NUI { - internal class SWIGTYPE_p_std__vectorT_Dali__TextAbstraction__FontDescription_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -36,5 +35,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_time_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_time_t.cs index 61b4137d3..d51623260 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_time_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_time_t.cs @@ -16,7 +16,6 @@ */ namespace Tizen.NUI { - internal class SWIGTYPE_p_time_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -36,5 +35,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_tm.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_tm.cs index f56115d3e..cc7e45e68 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_tm.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_tm.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_tm { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint16_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint16_t.cs index 26d0d36dd..849f75597 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint16_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint16_t.cs @@ -36,5 +36,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint8_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint8_t.cs index 3504f15fb..fe171ebfd 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint8_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_uint8_t.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_uint8_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_char.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_char.cs index 4be1d02fd..5a893cca4 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_char.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_char.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_unsigned_char { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_int.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_int.cs index 0da738e12..8ba2654c1 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_int.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_int.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_unsigned_int { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_short.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_short.cs index 812757c68..4b7daaf84 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_short.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_unsigned_short.cs @@ -10,7 +10,6 @@ namespace Tizen.NUI { - internal class SWIGTYPE_p_unsigned_short { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -30,5 +29,4 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } } - } diff --git a/src/Tizen.NUI/src/internal/ScrollStateChangedSignal.cs b/src/Tizen.NUI/src/internal/ScrollStateChangedSignal.cs index 2ec602652..cf1328ec0 100755 --- a/src/Tizen.NUI/src/internal/ScrollStateChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ScrollStateChangedSignal.cs @@ -20,7 +20,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - internal class ScrollStateChangedSignal : global::System.IDisposable + internal class ScrollStateChangedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -36,55 +36,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ScrollStateChangedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -99,7 +57,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -144,7 +102,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs b/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs index 7dda667da..5c593f8a8 100755 --- a/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs +++ b/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class ScrollViewSnapStartedSignal : global::System.IDisposable + internal class ScrollViewSnapStartedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ScrollViewSnapStartedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -142,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ScrollableSignal.cs b/src/Tizen.NUI/src/internal/ScrollableSignal.cs index b2ad24091..831163e5f 100755 --- a/src/Tizen.NUI/src/internal/ScrollableSignal.cs +++ b/src/Tizen.NUI/src/internal/ScrollableSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class ScrollableSignal : global::System.IDisposable + internal class ScrollableSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ScrollableSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -142,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/SignalConnectorType.cs b/src/Tizen.NUI/src/internal/SignalConnectorType.cs index f2c2f43dc..d042c03ba 100755 --- a/src/Tizen.NUI/src/internal/SignalConnectorType.cs +++ b/src/Tizen.NUI/src/internal/SignalConnectorType.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class SignalConnectorType : global::System.IDisposable + internal class SignalConnectorType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~SignalConnectorType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,14 +54,12 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public SignalConnectorType(TypeRegistration typeRegistration, string name, SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool func) : this(Interop.NDalic.new_SignalConnectorType(TypeRegistration.getCPtr(typeRegistration), name, SWIGTYPE_p_f_p_Dali__BaseObject_p_Dali__ConnectionTrackerInterface_r_q_const__std__string_p_Dali__FunctorDelegate__bool.getCPtr(func)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/SignalObserver.cs b/src/Tizen.NUI/src/internal/SignalObserver.cs index 3f403f2db..476ee2c93 100755 --- a/src/Tizen.NUI/src/internal/SignalObserver.cs +++ b/src/Tizen.NUI/src/internal/SignalObserver.cs @@ -18,10 +18,9 @@ using System; using System.Runtime.InteropServices; using System.ComponentModel; - namespace Tizen.NUI { - internal class SignalObserver : global::System.IDisposable + internal class SignalObserver : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -41,69 +40,17 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// 4 - protected bool disposed = false; - - /// - /// Dispose - /// - /// 3 - ~SignalObserver() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// Dispose /// /// 4 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// - /// Dispose - /// - /// 4 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -118,7 +65,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -132,7 +79,5 @@ namespace Tizen.NUI Interop.SignalObserver.SignalObserver_SignalDisconnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_Dali__CallbackBase.getCPtr(callback)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs b/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs index f197b6a7d..89bf545f1 100755 --- a/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs +++ b/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class SliderMarkReachedSignal : global::System.IDisposable + internal class SliderMarkReachedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~SliderMarkReachedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -144,7 +101,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs b/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs index 0fe626801..94c2e6a31 100755 --- a/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class SliderValueChangedSignal : global::System.IDisposable + internal class SliderValueChangedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~SliderValueChangedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -143,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/SlotObserver.cs b/src/Tizen.NUI/src/internal/SlotObserver.cs index e71ba5db3..f85fa13ee 100755 --- a/src/Tizen.NUI/src/internal/SlotObserver.cs +++ b/src/Tizen.NUI/src/internal/SlotObserver.cs @@ -20,7 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - internal class SlotObserver : global::System.IDisposable + internal class SlotObserver : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// swigCMemOwn. @@ -38,69 +38,17 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// 4 - protected bool disposed = false; - - /// - /// Dispose. - /// - /// 3 - ~SlotObserver() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// Dispose. /// /// 4 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// - /// Dispose. - /// - /// 4 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -115,7 +63,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -129,15 +77,10 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_SlotObserver")] public static extern void delete_SlotObserver(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_SlotObserver_SlotDisconnected")] public static extern void SlotObserver_SlotDisconnected(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - } - } diff --git a/src/Tizen.NUI/src/internal/SnapType.cs b/src/Tizen.NUI/src/internal/SnapType.cs index a29377543..9ecf44d95 100755 --- a/src/Tizen.NUI/src/internal/SnapType.cs +++ b/src/Tizen.NUI/src/internal/SnapType.cs @@ -17,11 +17,9 @@ namespace Tizen.NUI { - internal enum SnapType { Snap, Flick } - } diff --git a/src/Tizen.NUI/src/internal/StageWheelSignal.cs b/src/Tizen.NUI/src/internal/StageWheelSignal.cs index bd7cda764..da83e249a 100755 --- a/src/Tizen.NUI/src/internal/StageWheelSignal.cs +++ b/src/Tizen.NUI/src/internal/StageWheelSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class StageWheelSignal : global::System.IDisposable + internal class StageWheelSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~StageWheelSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -143,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/StateChangedSignalType.cs b/src/Tizen.NUI/src/internal/StateChangedSignalType.cs index 7db3a4c42..a743f7063 100755 --- a/src/Tizen.NUI/src/internal/StateChangedSignalType.cs +++ b/src/Tizen.NUI/src/internal/StateChangedSignalType.cs @@ -17,7 +17,7 @@ namespace Tizen.NUI { - internal class StateChangedSignalType : global::System.IDisposable + internal class StateChangedSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -33,53 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~StateChangedSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -94,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -139,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/StatusSignalType.cs b/src/Tizen.NUI/src/internal/StatusSignalType.cs index 80c778ca4..80a196fc2 100755 --- a/src/Tizen.NUI/src/internal/StatusSignalType.cs +++ b/src/Tizen.NUI/src/internal/StatusSignalType.cs @@ -20,7 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - internal class StatusSignalType : global::System.IDisposable + internal class StatusSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -40,69 +40,17 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - /// /// Dispose /// /// 3 - ~StatusSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// - /// Dispose - /// - /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -117,7 +65,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -191,7 +139,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/StencilFunctionType.cs b/src/Tizen.NUI/src/internal/StencilFunctionType.cs index d35854f8b..0c2ebed16 100755 --- a/src/Tizen.NUI/src/internal/StencilFunctionType.cs +++ b/src/Tizen.NUI/src/internal/StencilFunctionType.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal enum StencilFunctionType { NEVER, @@ -29,5 +28,4 @@ namespace Tizen.NUI GREATER_EQUAL, ALWAYS } - } diff --git a/src/Tizen.NUI/src/internal/StencilOperationType.cs b/src/Tizen.NUI/src/internal/StencilOperationType.cs index 4e7a7ee28..294c90521 100755 --- a/src/Tizen.NUI/src/internal/StencilOperationType.cs +++ b/src/Tizen.NUI/src/internal/StencilOperationType.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal enum StencilOperationType { ZERO, @@ -29,5 +28,4 @@ namespace Tizen.NUI INCREMENT_WRAP, DECREMENT_WRAP } - } diff --git a/src/Tizen.NUI/src/internal/StringValuePair.cs b/src/Tizen.NUI/src/internal/StringValuePair.cs index 3f16e607b..35e171afc 100755 --- a/src/Tizen.NUI/src/internal/StringValuePair.cs +++ b/src/Tizen.NUI/src/internal/StringValuePair.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class StringValuePair : global::System.IDisposable + internal class StringValuePair : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -33,55 +32,14 @@ namespace Tizen.NUI { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~StringValuePair() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,8 +54,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } + public StringValuePair() : this(Interop.StringValuePair.new_StringValuePair__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -143,7 +102,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/StyleChangedSignal.cs b/src/Tizen.NUI/src/internal/StyleChangedSignal.cs index 23b0090c5..09e9c9210 100755 --- a/src/Tizen.NUI/src/internal/StyleChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/StyleChangedSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class StyleChangedSignal : global::System.IDisposable + internal class StyleChangedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~StyleChangedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -142,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs index 0ab4dc1ce..3f450c623 100755 --- a/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs @@ -18,7 +18,7 @@ namespace Tizen.NUI { using Tizen.NUI.BaseComponents; - internal class TapGestureDetectedSignal : global::System.IDisposable + internal class TapGestureDetectedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TapGestureDetectedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +55,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -142,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/TextEditorSignal.cs b/src/Tizen.NUI/src/internal/TextEditorSignal.cs index e77cc7613..2a466e42d 100755 --- a/src/Tizen.NUI/src/internal/TextEditorSignal.cs +++ b/src/Tizen.NUI/src/internal/TextEditorSignal.cs @@ -20,7 +20,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - internal class TextEditorSignal : global::System.IDisposable + internal class TextEditorSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -36,55 +36,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TextEditorSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -99,7 +57,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -145,7 +103,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/TextFieldSignal.cs b/src/Tizen.NUI/src/internal/TextFieldSignal.cs index cbc0922a7..87fbf6a69 100755 --- a/src/Tizen.NUI/src/internal/TextFieldSignal.cs +++ b/src/Tizen.NUI/src/internal/TextFieldSignal.cs @@ -19,8 +19,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - - internal class TextFieldSignal : global::System.IDisposable + internal class TextFieldSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -36,55 +35,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TextFieldSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -99,7 +56,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -145,7 +102,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/TimePeriod.cs b/src/Tizen.NUI/src/internal/TimePeriod.cs index 1ca231d0b..775577fc5 100755 --- a/src/Tizen.NUI/src/internal/TimePeriod.cs +++ b/src/Tizen.NUI/src/internal/TimePeriod.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class TimePeriod : global::System.IDisposable + internal class TimePeriod : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TimePeriod() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -140,7 +97,5 @@ namespace Tizen.NUI return ret; } } - } - } diff --git a/src/Tizen.NUI/src/internal/TimerSignalType.cs b/src/Tizen.NUI/src/internal/TimerSignalType.cs index 07a24878a..45fffc33b 100755 --- a/src/Tizen.NUI/src/internal/TimerSignalType.cs +++ b/src/Tizen.NUI/src/internal/TimerSignalType.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class TimerSignalType : global::System.IDisposable + internal class TimerSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TimerSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,10 +54,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.Timer.TimerSignalType_Empty(swigCPtr); @@ -145,7 +101,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public bool Emit() { bool ret = Interop.Timer.TimerSignalType_Emit(swigCPtr); @@ -157,7 +112,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ToolkitPropertyRange.cs b/src/Tizen.NUI/src/internal/ToolkitPropertyRange.cs index be070353c..20adf5161 100755 --- a/src/Tizen.NUI/src/internal/ToolkitPropertyRange.cs +++ b/src/Tizen.NUI/src/internal/ToolkitPropertyRange.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - internal enum ToolkitPropertyRange { VISUAL_PROPERTY_BASE_START_INDEX = PropertyRanges.CORE_PROPERTY_MAX_INDEX + 1, @@ -25,5 +24,4 @@ namespace Tizen.NUI VISUAL_PROPERTY_START_INDEX = VISUAL_PROPERTY_BASE_END_INDEX + 1, VISUAL_PROPERTY_END_INDEX = VISUAL_PROPERTY_START_INDEX + 100000 } - } diff --git a/src/Tizen.NUI/src/internal/TooltipPositionType.cs b/src/Tizen.NUI/src/internal/TooltipPositionType.cs index d518c9638..54527dd8b 100755 --- a/src/Tizen.NUI/src/internal/TooltipPositionType.cs +++ b/src/Tizen.NUI/src/internal/TooltipPositionType.cs @@ -17,12 +17,10 @@ namespace Tizen.NUI { - internal enum TooltipPositionType { ABOVE, BELOW, HOVER_POINT } - } diff --git a/src/Tizen.NUI/src/internal/TouchDataSignal.cs b/src/Tizen.NUI/src/internal/TouchDataSignal.cs index 7b2c267de..1a8986a91 100755 --- a/src/Tizen.NUI/src/internal/TouchDataSignal.cs +++ b/src/Tizen.NUI/src/internal/TouchDataSignal.cs @@ -14,11 +14,11 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - internal class TouchDataSignal : global::System.IDisposable + internal class TouchDataSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TouchDataSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +55,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -144,7 +102,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/TouchPoint.cs b/src/Tizen.NUI/src/internal/TouchPoint.cs index 36f892435..a91916f67 100755 --- a/src/Tizen.NUI/src/internal/TouchPoint.cs +++ b/src/Tizen.NUI/src/internal/TouchPoint.cs @@ -14,12 +14,11 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - - using Tizen.NUI.BaseComponents; - internal class TouchPoint : global::System.IDisposable + internal class TouchPoint : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -35,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TouchPoint() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -98,7 +55,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -203,7 +160,5 @@ namespace Tizen.NUI Interrupted, Last } - } - } diff --git a/src/Tizen.NUI/src/internal/TouchPointContainer.cs b/src/Tizen.NUI/src/internal/TouchPointContainer.cs index 12a04dad6..e2a291b99 100755 --- a/src/Tizen.NUI/src/internal/TouchPointContainer.cs +++ b/src/Tizen.NUI/src/internal/TouchPointContainer.cs @@ -17,9 +17,8 @@ namespace Tizen.NUI { - - internal class TouchPointContainer : global::System.IDisposable, global::System.Collections.IEnumerable - , global::System.Collections.Generic.IEnumerable + internal class TouchPointContainer : Disposable, global::System.Collections.IEnumerable, + global::System.Collections.Generic.IEnumerable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -35,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TouchPointContainer() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -98,7 +55,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public TouchPointContainer(global::System.Collections.ICollection c) : this() @@ -426,7 +383,5 @@ namespace Tizen.NUI Interop.TouchPointContainer.TouchPointContainer_SetRange(swigCPtr, index, TouchPointContainer.getCPtr(values)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/TouchSignal.cs b/src/Tizen.NUI/src/internal/TouchSignal.cs index d227a23ca..4a6cb6340 100755 --- a/src/Tizen.NUI/src/internal/TouchSignal.cs +++ b/src/Tizen.NUI/src/internal/TouchSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class TouchSignal : global::System.IDisposable + internal class TouchSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TouchSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -143,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/TypeAction.cs b/src/Tizen.NUI/src/internal/TypeAction.cs index 6e06aaab7..5025d60fb 100755 --- a/src/Tizen.NUI/src/internal/TypeAction.cs +++ b/src/Tizen.NUI/src/internal/TypeAction.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class TypeAction : global::System.IDisposable + internal class TypeAction : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TypeAction() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -105,7 +62,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/TypeRegistration.cs b/src/Tizen.NUI/src/internal/TypeRegistration.cs index 9eb2903fa..df288e66a 100755 --- a/src/Tizen.NUI/src/internal/TypeRegistration.cs +++ b/src/Tizen.NUI/src/internal/TypeRegistration.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class TypeRegistration : global::System.IDisposable + internal class TypeRegistration : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -33,55 +32,14 @@ namespace Tizen.NUI { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~TypeRegistration() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } static private global::System.IntPtr SwigConstructTypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f) @@ -157,7 +115,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } } - } - } diff --git a/src/Tizen.NUI/src/internal/Uint16Pair.cs b/src/Tizen.NUI/src/internal/Uint16Pair.cs index a2272dc45..0b462b10b 100755 --- a/src/Tizen.NUI/src/internal/Uint16Pair.cs +++ b/src/Tizen.NUI/src/internal/Uint16Pair.cs @@ -31,7 +31,7 @@ namespace Tizen.NUI /// common architectures.
///
/// 3 - internal class Uint16Pair : global::System.IDisposable + internal class Uint16Pair : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// swigCMemOwn. @@ -49,69 +49,17 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - /// /// Dispose. /// /// 3 - ~Uint16Pair() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// - /// Dispose. - /// - /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -126,7 +74,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -323,7 +271,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/VectorBase.cs b/src/Tizen.NUI/src/internal/VectorBase.cs index a87f5cb2b..b0fb7f42e 100755 --- a/src/Tizen.NUI/src/internal/VectorBase.cs +++ b/src/Tizen.NUI/src/internal/VectorBase.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class VectorBase : global::System.IDisposable + internal class VectorBase : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~VectorBase() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -134,7 +91,5 @@ namespace Tizen.NUI Interop.VectorBase.VectorBase_Release(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/VectorBlob.cs b/src/Tizen.NUI/src/internal/VectorBlob.cs index 1820d4edf..fd7778c9b 100755 --- a/src/Tizen.NUI/src/internal/VectorBlob.cs +++ b/src/Tizen.NUI/src/internal/VectorBlob.cs @@ -16,8 +16,7 @@ */ namespace Tizen.NUI { - - internal class VectorBlob : global::System.IDisposable + internal class VectorBlob : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -33,55 +32,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - protected bool disposed = false; - - ~VectorBlob() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -95,7 +52,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public byte R diff --git a/src/Tizen.NUI/src/internal/VectorUint16Pair.cs b/src/Tizen.NUI/src/internal/VectorUint16Pair.cs index 182f2bf18..4d1ee16fb 100755 --- a/src/Tizen.NUI/src/internal/VectorUint16Pair.cs +++ b/src/Tizen.NUI/src/internal/VectorUint16Pair.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class VectorUint16Pair : global::System.IDisposable + internal class VectorUint16Pair : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~VectorUint16Pair() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,10 +54,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public VectorUint16Pair() : this(Interop.VectorUint16Pair.new_VectorUint16Pair__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -218,7 +174,5 @@ namespace Tizen.NUI } public static readonly int BaseType = Interop.VectorUint16Pair.VectorUint16Pair_BaseType_get(); - } - } diff --git a/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs b/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs index 74f0f1316..26e81b79e 100755 --- a/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs +++ b/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class VectorUnsignedChar : global::System.IDisposable + internal class VectorUnsignedChar : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~VectorUnsignedChar() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,10 +54,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public VectorUnsignedChar() : this(Interop.VectorUnsignedChar.new_VectorUnsignedChar__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -218,7 +174,5 @@ namespace Tizen.NUI } public static readonly int BaseType = Interop.VectorUnsignedChar.VectorUnsignedChar_BaseType_get(); - } - } diff --git a/src/Tizen.NUI/src/internal/VideoViewSignal.cs b/src/Tizen.NUI/src/internal/VideoViewSignal.cs index bbc61d82c..050953d43 100755 --- a/src/Tizen.NUI/src/internal/VideoViewSignal.cs +++ b/src/Tizen.NUI/src/internal/VideoViewSignal.cs @@ -19,68 +19,29 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - internal class VideoViewSignal : global::System.IDisposable { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal VideoViewSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VideoViewSignal obj) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - + internal class VideoViewSignal : Disposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; - ~VideoViewSignal() + internal VideoViewSignal(global::System.IntPtr cPtr, bool cMemoryOwn) { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - public void Dispose() + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VideoViewSignal obj) { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -95,47 +56,51 @@ namespace Tizen.NUI { swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { - bool ret = Interop.VideoView.VideoViewSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetConnectionCount() { - uint ret = Interop.VideoView.VideoViewSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Connect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - Interop.VideoView.VideoViewSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public bool Empty() + { + bool ret = Interop.VideoView.VideoViewSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Disconnect(System.Delegate func) { -System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - Interop.VideoView.VideoViewSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } + public uint GetConnectionCount() + { + uint ret = Interop.VideoView.VideoViewSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } - public void Emit(VideoView arg) { - Interop.VideoView.VideoViewSignal_Emit(swigCPtr, VideoView.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + Interop.VideoView.VideoViewSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } - public VideoViewSignal() : this(Interop.VideoView.new_VideoViewSignal(), true) { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + Interop.VideoView.VideoViewSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } -} + public void Emit(VideoView arg) + { + Interop.VideoView.VideoViewSignal_Emit(swigCPtr, VideoView.getCPtr(arg)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public VideoViewSignal() : this(Interop.VideoView.new_VideoViewSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } } diff --git a/src/Tizen.NUI/src/internal/ViewImpl.cs b/src/Tizen.NUI/src/internal/ViewImpl.cs index a7a28271f..48385f459 100755 --- a/src/Tizen.NUI/src/internal/ViewImpl.cs +++ b/src/Tizen.NUI/src/internal/ViewImpl.cs @@ -22,7 +22,6 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - internal class ViewImpl : CustomActorImpl { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -44,14 +43,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -69,7 +60,6 @@ namespace Tizen.NUI base.Dispose(type); } - public static View New() { View ret = new View(Interop.ViewImpl.ViewImpl_New(), true); @@ -1020,5 +1010,4 @@ namespace Tizen.NUI private static global::System.Type[] swigMethodTypes39 = new global::System.Type[] { typeof(SlotObserver), typeof(SWIGTYPE_p_Dali__CallbackBase) }; private static global::System.Type[] swigMethodTypes40 = new global::System.Type[] { typeof(SlotObserver), typeof(SWIGTYPE_p_Dali__CallbackBase) }; } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/ViewLayoutDirectionChangedSignal.cs b/src/Tizen.NUI/src/internal/ViewLayoutDirectionChangedSignal.cs index 338c99a1e..8bf3c92f6 100755 --- a/src/Tizen.NUI/src/internal/ViewLayoutDirectionChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ViewLayoutDirectionChangedSignal.cs @@ -19,8 +19,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - - internal class ViewLayoutDirectionChangedSignal : global::System.IDisposable + internal class ViewLayoutDirectionChangedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -36,53 +35,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~ViewLayoutDirectionChangedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +56,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -142,6 +101,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs b/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs index fb8d0a538..37b8a5764 100755 --- a/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs +++ b/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs @@ -20,7 +20,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - internal class ViewResourceReadySignal : global::System.IDisposable + internal class ViewResourceReadySignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -36,55 +36,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ViewResourceReadySignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -99,7 +57,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -144,7 +102,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ViewSignal.cs b/src/Tizen.NUI/src/internal/ViewSignal.cs index 09ee2b7d9..8b8dc465c 100755 --- a/src/Tizen.NUI/src/internal/ViewSignal.cs +++ b/src/Tizen.NUI/src/internal/ViewSignal.cs @@ -14,11 +14,11 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - internal class ViewSignal : global::System.IDisposable + internal class ViewSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ViewSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,10 +55,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.ActorSignal.ActorSignal_Empty(swigCPtr); @@ -143,7 +100,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs b/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs index 92de512ca..8d6dd2f16 100755 --- a/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs @@ -19,7 +19,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - internal class ViewVisibilityChangedSignal : global::System.IDisposable + internal class ViewVisibilityChangedSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -35,55 +35,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ViewVisibilityChangedSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -98,7 +56,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -144,7 +102,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs b/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs index ab9baf670..fe457b53e 100755 --- a/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs +++ b/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs @@ -16,6 +16,7 @@ */ using System.Runtime.InteropServices; using Tizen.NUI.BaseComponents; + namespace Tizen.NUI { internal sealed class ViewWrapperImpl : ViewImpl @@ -154,14 +155,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/internal/VisualEventSignal.cs b/src/Tizen.NUI/src/internal/VisualEventSignal.cs index 24149a1db..ee1cd3a34 100755 --- a/src/Tizen.NUI/src/internal/VisualEventSignal.cs +++ b/src/Tizen.NUI/src/internal/VisualEventSignal.cs @@ -20,55 +20,20 @@ using System.Runtime.InteropServices; namespace Tizen.NUI { - internal class VisualEventSignal : IDisposable + internal class VisualEventSignal : Disposable { public VisualEventSignal() : this(Interop.VisualEventSignal.New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - ~VisualEventSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -82,7 +47,7 @@ namespace Tizen.NUI } swigCPtr = new HandleRef(null, IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -140,9 +105,5 @@ namespace Tizen.NUI private HandleRef swigCPtr; protected bool swigCMemOwn; - - private bool isDisposeQueued = false; - protected bool disposed = false; - } } diff --git a/src/Tizen.NUI/src/internal/VoidSignal.cs b/src/Tizen.NUI/src/internal/VoidSignal.cs index afa7b44c8..3013dbc83 100755 --- a/src/Tizen.NUI/src/internal/VoidSignal.cs +++ b/src/Tizen.NUI/src/internal/VoidSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class VoidSignal : global::System.IDisposable + internal class VoidSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~VoidSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -149,7 +106,5 @@ namespace Tizen.NUI Interop.VoidSignal.VoidSignal_Emit(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/WatchApplication.cs b/src/Tizen.NUI/src/internal/WatchApplication.cs index ed884af5f..601911748 100755 --- a/src/Tizen.NUI/src/internal/WatchApplication.cs +++ b/src/Tizen.NUI/src/internal/WatchApplication.cs @@ -17,6 +17,7 @@ using System; using System.Runtime.InteropServices; + namespace Tizen.NUI { internal class WatchApplication : Application @@ -40,14 +41,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -373,7 +366,5 @@ namespace Tizen.NUI } private static WatchApplication _instance; //singleton - } - } diff --git a/src/Tizen.NUI/src/internal/WatchBoolSignal.cs b/src/Tizen.NUI/src/internal/WatchBoolSignal.cs index a83af3f28..589823f5b 100755 --- a/src/Tizen.NUI/src/internal/WatchBoolSignal.cs +++ b/src/Tizen.NUI/src/internal/WatchBoolSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class WatchBoolSignal : global::System.IDisposable + internal class WatchBoolSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~WatchBoolSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -141,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/WatchTimeSignal.cs b/src/Tizen.NUI/src/internal/WatchTimeSignal.cs index 31bd24c96..58fcd5259 100755 --- a/src/Tizen.NUI/src/internal/WatchTimeSignal.cs +++ b/src/Tizen.NUI/src/internal/WatchTimeSignal.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class WatchTimeSignal : global::System.IDisposable + internal class WatchTimeSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,54 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - ~WatchTimeSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -96,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -141,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/WeakEventHandler.cs b/src/Tizen.NUI/src/internal/WeakEventHandler.cs index b273b600c..d05b11f38 100755 --- a/src/Tizen.NUI/src/internal/WeakEventHandler.cs +++ b/src/Tizen.NUI/src/internal/WeakEventHandler.cs @@ -26,7 +26,6 @@ namespace Tizen.NUI } } } -} - + } } diff --git a/src/Tizen.NUI/src/internal/WebViewPageLoadErrorSignal.cs b/src/Tizen.NUI/src/internal/WebViewPageLoadErrorSignal.cs old mode 100644 new mode 100755 index 8903febab..a871b4986 --- a/src/Tizen.NUI/src/internal/WebViewPageLoadErrorSignal.cs +++ b/src/Tizen.NUI/src/internal/WebViewPageLoadErrorSignal.cs @@ -17,7 +17,7 @@ namespace Tizen.NUI { - internal class WebViewPageLoadErrorSignal : global::System.IDisposable + internal class WebViewPageLoadErrorSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -26,48 +26,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued; - //A Flat to check if it is already disposed. - protected bool disposed; - - ~WebViewPageLoadErrorSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - if (isDisposeQueued) - { - Dispose(false); - } - else - { - Dispose(true); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(bool disposing) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (disposing) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -78,7 +43,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public void Connect(System.Delegate func) @@ -109,7 +74,5 @@ namespace Tizen.NUI { swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - } - } diff --git a/src/Tizen.NUI/src/internal/WebViewPageLoadSignal.cs b/src/Tizen.NUI/src/internal/WebViewPageLoadSignal.cs old mode 100644 new mode 100755 index f7da87fcb..90fdd4aab --- a/src/Tizen.NUI/src/internal/WebViewPageLoadSignal.cs +++ b/src/Tizen.NUI/src/internal/WebViewPageLoadSignal.cs @@ -17,7 +17,7 @@ namespace Tizen.NUI { - internal class WebViewPageLoadSignal : global::System.IDisposable + internal class WebViewPageLoadSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -26,48 +26,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued; - //A Flat to check if it is already disposed. - protected bool disposed; - - ~WebViewPageLoadSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - if (isDisposeQueued) - { - Dispose(false); - } - else - { - Dispose(true); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(bool disposing) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (disposing) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -78,7 +43,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public void Connect(System.Delegate func) @@ -109,7 +74,5 @@ namespace Tizen.NUI { swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - } - } diff --git a/src/Tizen.NUI/src/internal/WheelSignal.cs b/src/Tizen.NUI/src/internal/WheelSignal.cs index eb42710c4..0b979af46 100755 --- a/src/Tizen.NUI/src/internal/WheelSignal.cs +++ b/src/Tizen.NUI/src/internal/WheelSignal.cs @@ -14,11 +14,11 @@ * limitations under the License. * */ +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - using Tizen.NUI.BaseComponents; - internal class WheelSignal : global::System.IDisposable + internal class WheelSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +34,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~WheelSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,10 +55,9 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - public bool Empty() { bool ret = Interop.ActorWheelSignal.ActorWheelSignal_Empty(swigCPtr); @@ -144,7 +101,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/WidgetApplication.cs b/src/Tizen.NUI/src/internal/WidgetApplication.cs index d89728c9b..263f96d76 100755 --- a/src/Tizen.NUI/src/internal/WidgetApplication.cs +++ b/src/Tizen.NUI/src/internal/WidgetApplication.cs @@ -44,13 +44,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/internal/WidgetImpl.cs b/src/Tizen.NUI/src/internal/WidgetImpl.cs index e23fda441..884e54720 100755 --- a/src/Tizen.NUI/src/internal/WidgetImpl.cs +++ b/src/Tizen.NUI/src/internal/WidgetImpl.cs @@ -46,13 +46,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/internal/WidgetImplPtr.cs b/src/Tizen.NUI/src/internal/WidgetImplPtr.cs index 3f49a8a5e..21f4a363d 100755 --- a/src/Tizen.NUI/src/internal/WidgetImplPtr.cs +++ b/src/Tizen.NUI/src/internal/WidgetImplPtr.cs @@ -16,7 +16,6 @@ */ namespace Tizen.NUI { - internal class WidgetImplPtr { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/WidgetViewSignal.cs b/src/Tizen.NUI/src/internal/WidgetViewSignal.cs index 07a57f51d..d016f2b09 100755 --- a/src/Tizen.NUI/src/internal/WidgetViewSignal.cs +++ b/src/Tizen.NUI/src/internal/WidgetViewSignal.cs @@ -15,7 +15,7 @@ namespace Tizen.NUI /// WidgetViewSignal /// /// 3 - public class WidgetViewSignal : global::System.IDisposable + public class WidgetViewSignal : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -39,30 +39,24 @@ namespace Tizen.NUI /// Dispose /// /// 3 - ~WidgetViewSignal() + protected override void Dispose(DisposeTypes type) { - Dispose(); - } + if (disposed) + { + return; + } - /// - /// Dispose - /// - /// 3 - public virtual void Dispose() - { - lock (this) + if (swigCPtr.Handle != global::System.IntPtr.Zero) { - if (swigCPtr.Handle != global::System.IntPtr.Zero) + if (swigCMemOwn) { - if (swigCMemOwn) - { - swigCMemOwn = false; - Interop.WidgetView.delete_WidgetViewSignal(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + swigCMemOwn = false; + Interop.WidgetView.delete_WidgetViewSignal(swigCPtr); } - global::System.GC.SuppressFinalize(this); + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } + + base.Dispose(type); } /// @@ -136,6 +130,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } } diff --git a/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs b/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs index c065cacf1..025d71f47 100755 --- a/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs +++ b/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class WindowFocusSignalType : global::System.IDisposable + internal class WindowFocusSignalType : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,56 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~WindowFocusSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -98,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public bool Empty() @@ -143,7 +99,5 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } - } diff --git a/src/Tizen.NUI/src/internal/doublep.cs b/src/Tizen.NUI/src/internal/doublep.cs index 8a7874a68..131527cf6 100755 --- a/src/Tizen.NUI/src/internal/doublep.cs +++ b/src/Tizen.NUI/src/internal/doublep.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class doublep : global::System.IDisposable + internal class doublep : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~doublep() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public doublep() : this(Interop.doublep.new_doublep(), true) @@ -133,7 +90,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/floatp.cs b/src/Tizen.NUI/src/internal/floatp.cs index aadf385a3..c3fb0e595 100755 --- a/src/Tizen.NUI/src/internal/floatp.cs +++ b/src/Tizen.NUI/src/internal/floatp.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class floatp : global::System.IDisposable + internal class floatp : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~floatp() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public floatp() : this(Interop.floatp.new_floatp(), true) @@ -133,7 +90,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/intp.cs b/src/Tizen.NUI/src/internal/intp.cs index 8bfc321e1..f85eac8f8 100755 --- a/src/Tizen.NUI/src/internal/intp.cs +++ b/src/Tizen.NUI/src/internal/intp.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class intp : global::System.IDisposable + internal class intp : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~intp() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public intp() : this(Interop.intp.new_intp(), true) @@ -133,7 +90,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/uintp.cs b/src/Tizen.NUI/src/internal/uintp.cs index a600c6d82..88e008482 100755 --- a/src/Tizen.NUI/src/internal/uintp.cs +++ b/src/Tizen.NUI/src/internal/uintp.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class uintp : global::System.IDisposable + internal class uintp : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~uintp() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } @@ -134,7 +91,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/internal/ushortp.cs b/src/Tizen.NUI/src/internal/ushortp.cs index 8ee811bcb..d47d4ca27 100755 --- a/src/Tizen.NUI/src/internal/ushortp.cs +++ b/src/Tizen.NUI/src/internal/ushortp.cs @@ -17,8 +17,7 @@ namespace Tizen.NUI { - - internal class ushortp : global::System.IDisposable + internal class ushortp : Disposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; @@ -34,55 +33,13 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ushortp() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -97,7 +54,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } public ushortp() : this(Interop.ushortp.new_ushortp(), true) @@ -133,7 +90,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } diff --git a/src/Tizen.NUI/src/public/Adaptor.cs b/src/Tizen.NUI/src/public/Adaptor.cs index 1f127ad6f..ac320a0b7 100755 --- a/src/Tizen.NUI/src/public/Adaptor.cs +++ b/src/Tizen.NUI/src/public/Adaptor.cs @@ -37,24 +37,15 @@ namespace Tizen.NUI /// /// /// 4 - public class Adaptor : global::System.IDisposable + public class Adaptor : Disposable { /// swigCMemOwn. /// 4 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 4 - protected bool disposed = false; - private static readonly Adaptor instance = Adaptor.Get(); private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - private EventHandler _resizedEventHandler; private ResizedCallbackDelegate _resizedCallbackDelegate; @@ -67,19 +58,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~Adaptor() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ResizedCallbackDelegate(IntPtr adaptor); @@ -149,26 +127,6 @@ namespace Tizen.NUI } } - /// 4 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Feeds a wheel event to the adaptor. /// @@ -406,21 +364,13 @@ namespace Tizen.NUI /// Dispose. ///
/// 4 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -432,7 +382,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private void OnResized(IntPtr adaptor) diff --git a/src/Tizen.NUI/src/public/AlphaFunction.cs b/src/Tizen.NUI/src/public/AlphaFunction.cs index ec84884f9..57d19ada6 100755 --- a/src/Tizen.NUI/src/public/AlphaFunction.cs +++ b/src/Tizen.NUI/src/public/AlphaFunction.cs @@ -24,20 +24,12 @@ namespace Tizen.NUI /// the animation before computing the final animation value. ///
/// 3 - public class AlphaFunction : global::System.IDisposable + public class AlphaFunction : Disposable { /// swigCMemOwn. /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; /// /// The constructor.
@@ -95,19 +87,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Dispose. - /// - /// 3 - ~AlphaFunction() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// This specifies the various types of BuiltinFunctions. /// @@ -197,29 +176,6 @@ namespace Tizen.NUI Bezier } - /// - /// To make the AlphaFunction instance be disposed. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Retrives the control points of the alpha function.
///
@@ -359,20 +315,13 @@ namespace Tizen.NUI /// To make the AlphaFunction instance be disposed. ///
/// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -386,7 +335,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Animatable.cs b/src/Tizen.NUI/src/public/Animatable.cs index f1aabe3b3..3ea415f19 100755 --- a/src/Tizen.NUI/src/public/Animatable.cs +++ b/src/Tizen.NUI/src/public/Animatable.cs @@ -256,14 +256,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -280,7 +272,5 @@ namespace Tizen.NUI base.Dispose(type); } - } - } diff --git a/src/Tizen.NUI/src/public/Animation.cs b/src/Tizen.NUI/src/public/Animation.cs index 3eb777285..6fcec31da 100755 --- a/src/Tizen.NUI/src/public/Animation.cs +++ b/src/Tizen.NUI/src/public/Animation.cs @@ -1345,17 +1345,6 @@ namespace Tizen.NUI { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - else if(type == DisposeTypes.Implicit) - { - - } if (this != null) { @@ -1406,7 +1395,5 @@ namespace Tizen.NUI { return (int)(sec * 1000); } - } - } diff --git a/src/Tizen.NUI/src/public/AutofillContainer.cs b/src/Tizen.NUI/src/public/AutofillContainer.cs index 3d45b9223..f7155b83e 100755 --- a/src/Tizen.NUI/src/public/AutofillContainer.cs +++ b/src/Tizen.NUI/src/public/AutofillContainer.cs @@ -293,14 +293,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/BaseComponents/AnimatedVectorImageView.cs b/src/Tizen.NUI/src/public/BaseComponents/AnimatedVectorImageView.cs index 543275f7d..d07312c99 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/AnimatedVectorImageView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/AnimatedVectorImageView.cs @@ -70,13 +70,6 @@ namespace Tizen.NUI.BaseComponents tlog.Fatal(tag, $" <<< [{GetId()}]AnimatedVectorImageView.Dispose(type={type})!"); - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/BaseComponents/FlexContainer.cs b/src/Tizen.NUI/src/public/BaseComponents/FlexContainer.cs index 05d704b50..101dc7993 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/FlexContainer.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/FlexContainer.cs @@ -407,13 +407,6 @@ namespace Tizen.NUI.BaseComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/BaseComponents/TableView.cs b/src/Tizen.NUI/src/public/BaseComponents/TableView.cs index f21fef669..ba98516d9 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TableView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TableView.cs @@ -604,13 +604,6 @@ namespace Tizen.NUI.BaseComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -632,22 +625,14 @@ namespace Tizen.NUI.BaseComponents /// Class to specify the layout position for the child view. ///
/// 3 - public class CellPosition : global::System.IDisposable + public class CellPosition : Disposable { /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; /// /// The constructor. @@ -710,19 +695,6 @@ namespace Tizen.NUI.BaseComponents swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~CellPosition() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The index of a row. /// @@ -864,30 +836,6 @@ namespace Tizen.NUI.BaseComponents } } - - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CellPosition obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; @@ -898,20 +846,13 @@ namespace Tizen.NUI.BaseComponents /// /// DisposeTypes /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -925,9 +866,8 @@ namespace Tizen.NUI.BaseComponents } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - } internal new class Property diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index 6d4b73df7..6b8eb74fb 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -2094,13 +2094,6 @@ namespace Tizen.NUI.BaseComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -2137,7 +2130,6 @@ namespace Tizen.NUI.BaseComponents //here we send all data to user event handlers _textEditorTextChangedEventHandler(this, e); } - } private void OnScrollStateChanged(IntPtr textEditor, ScrollState state) diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index 25554d944..884c84f84 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -1975,7 +1975,7 @@ namespace Tizen.NUI.BaseComponents /// /// The Enable selection property. /// - /// 5.5 + /// 6 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public bool EnableGrabHandle @@ -1994,7 +1994,7 @@ namespace Tizen.NUI.BaseComponents /// /// The Enable selection property. /// - /// 5.5 + /// 6 /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public bool EnableGrabHandlePopup @@ -2144,7 +2144,7 @@ namespace Tizen.NUI.BaseComponents /// /// Select the whole text. /// - /// 5.5 + /// 6 /// This will be released at Tizen.NET API Level 5.5, so currently this would be used as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public void SelectWholeText() @@ -2191,13 +2191,6 @@ namespace Tizen.NUI.BaseComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 06780096a..a99f5a456 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -1325,13 +1325,6 @@ namespace Tizen.NUI.BaseComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/BaseComponents/VectorAnimationView.cs b/src/Tizen.NUI/src/public/BaseComponents/VectorAnimationView.cs index 852f3575b..556d3d124 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/VectorAnimationView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/VectorAnimationView.cs @@ -66,13 +66,6 @@ namespace Tizen.NUI.BaseComponents } tlog.Fatal(tag, $"<<< [{GetId()}] VectorAnimationView.Dispose(type={type})"); - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/BaseComponents/VideoView.cs b/src/Tizen.NUI/src/public/BaseComponents/VideoView.cs index 04afe6f73..f03ccef65 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/VideoView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/VideoView.cs @@ -372,13 +372,6 @@ namespace Tizen.NUI.BaseComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index f6ae49627..83739231f 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -5339,13 +5339,6 @@ namespace Tizen.NUI.BaseComponents //_mergedStyle = null; - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/Color.cs b/src/Tizen.NUI/src/public/Color.cs index 45b089f34..e273330e6 100755 --- a/src/Tizen.NUI/src/public/Color.cs +++ b/src/Tizen.NUI/src/public/Color.cs @@ -26,9 +26,8 @@ namespace Tizen.NUI /// The Color class. ///
[Tizen.NUI.Binding.TypeConverter(typeof(ColorTypeConverter))] - public class Color : global::System.IDisposable + public class Color : Disposable { - /// /// Gets the black colored Color class. /// @@ -89,16 +88,7 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - private readonly bool hashDummy; /// @@ -141,19 +131,6 @@ namespace Tizen.NUI hashDummy = false; } - /// - /// Dispose. - /// - /// 3 - ~Color() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The red component. /// @@ -354,29 +331,6 @@ namespace Tizen.NUI return ValueCheck(result); } - /// - /// To make a color instance be disposed. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Checks if two color classes are same. /// @@ -500,20 +454,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -527,7 +474,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private Color Add(Color rhs) diff --git a/src/Tizen.NUI/src/public/Container.cs b/src/Tizen.NUI/src/public/Container.cs index 9f21585c3..8266f9c5f 100755 --- a/src/Tizen.NUI/src/public/Container.cs +++ b/src/Tizen.NUI/src/public/Container.cs @@ -138,6 +138,5 @@ namespace Tizen.NUI } internal abstract View FindCurrentChildById(uint id); - } } // namespace Tizen.NUI diff --git a/src/Tizen.NUI/src/public/CubeTransitionEffect.cs b/src/Tizen.NUI/src/public/CubeTransitionEffect.cs index 1f5571adb..1a076500d 100755 --- a/src/Tizen.NUI/src/public/CubeTransitionEffect.cs +++ b/src/Tizen.NUI/src/public/CubeTransitionEffect.cs @@ -215,14 +215,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/CustomViewRegistry.cs b/src/Tizen.NUI/src/public/CustomViewRegistry.cs index 92b0d2b4b..cbdf7f852 100755 --- a/src/Tizen.NUI/src/public/CustomViewRegistry.cs +++ b/src/Tizen.NUI/src/public/CustomViewRegistry.cs @@ -496,8 +496,6 @@ namespace Tizen.NUI { throw new global::System.InvalidOperationException("failed to find the control to write a property to: cptr = " + refObjectPtr); } - } - } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Degree.cs b/src/Tizen.NUI/src/public/Degree.cs index c9806a43c..4f4943936 100755 --- a/src/Tizen.NUI/src/public/Degree.cs +++ b/src/Tizen.NUI/src/public/Degree.cs @@ -17,32 +17,21 @@ namespace Tizen.NUI { - /// /// An angle in degrees.
/// This reduces ambiguity when using methods which accept angles in degrees or radians.
///
/// 3 - public class Degree : global::System.IDisposable + public class Degree : Disposable { - /// /// swigCMemOwn. /// /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The constructor. /// @@ -78,19 +67,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~Degree() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The value of degree. /// @@ -110,29 +86,6 @@ namespace Tizen.NUI } } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Degree obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; @@ -142,20 +95,13 @@ namespace Tizen.NUI /// Dispose. ///
/// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -169,9 +115,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/DirectionBias.cs b/src/Tizen.NUI/src/public/DirectionBias.cs index cd6df2ecf..84b29b179 100755 --- a/src/Tizen.NUI/src/public/DirectionBias.cs +++ b/src/Tizen.NUI/src/public/DirectionBias.cs @@ -39,5 +39,4 @@ namespace Tizen.NUI /// 3 DirectionBiasRight = 1 } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Extents.cs b/src/Tizen.NUI/src/public/Extents.cs index 504505c71..0836bf244 100755 --- a/src/Tizen.NUI/src/public/Extents.cs +++ b/src/Tizen.NUI/src/public/Extents.cs @@ -24,7 +24,7 @@ namespace Tizen.NUI ///
/// 4 [TypeConverter(typeof(ExtentsTypeConverter))] - public class Extents : global::System.IDisposable + public class Extents : Disposable { /// @@ -33,17 +33,8 @@ namespace Tizen.NUI /// 4 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 4 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// Constructor. /// @@ -82,19 +73,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Destructor. - /// - /// 4 - ~Extents() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The Start extent. /// @@ -171,29 +149,6 @@ namespace Tizen.NUI } } - /// - /// To make a Extents instance be disposed. - /// - /// 4 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Equality operator. /// @@ -244,20 +199,13 @@ namespace Tizen.NUI /// /// Extents type /// 4 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -271,9 +219,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - } - } diff --git a/src/Tizen.NUI/src/public/FilterModeType.cs b/src/Tizen.NUI/src/public/FilterModeType.cs index 6dd849067..00e16f106 100755 --- a/src/Tizen.NUI/src/public/FilterModeType.cs +++ b/src/Tizen.NUI/src/public/FilterModeType.cs @@ -64,5 +64,4 @@ namespace Tizen.NUI /// 3 LINEAR_MIPMAP_LINEAR } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/FontClient.cs b/src/Tizen.NUI/src/public/FontClient.cs index 1484ecfb3..231f7161e 100755 --- a/src/Tizen.NUI/src/public/FontClient.cs +++ b/src/Tizen.NUI/src/public/FontClient.cs @@ -393,17 +393,10 @@ namespace Tizen.NUI return ret; } - internal class GlyphBufferData : global::System.IDisposable + internal class GlyphBufferData : Disposable { protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; public GlyphBufferData() : this(Interop.FontClient.new_FontClient_GlyphBufferData(), true) { @@ -416,15 +409,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - ~GlyphBufferData() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /*public byte[] Buffer { set @@ -486,44 +470,18 @@ namespace Tizen.NUI } } - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GlyphBufferData obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User. - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //Because the execution order of Finalizes is non-deterministic. @@ -537,7 +495,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } } diff --git a/src/Tizen.NUI/src/public/Geometry.cs b/src/Tizen.NUI/src/public/Geometry.cs index 741503820..1ffb8e411 100755 --- a/src/Tizen.NUI/src/public/Geometry.cs +++ b/src/Tizen.NUI/src/public/Geometry.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - /// /// Geometry is handle to an object that can be used to define a geometric elements. /// @@ -173,14 +172,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -197,6 +188,5 @@ namespace Tizen.NUI base.Dispose(type); } - } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Gesture.cs b/src/Tizen.NUI/src/public/Gesture.cs index cc9d1d351..b26540e5e 100755 --- a/src/Tizen.NUI/src/public/Gesture.cs +++ b/src/Tizen.NUI/src/public/Gesture.cs @@ -17,14 +17,13 @@ namespace Tizen.NUI { - /// /// Base structure for different gestures that an application can receive.
/// A Gesture is an event that is produced from a combination of several touch events /// in a particular order or within a certain time frame (for example, pinch).
///
/// 3 - public class Gesture : global::System.IDisposable + public class Gesture : Disposable { /// /// swigCMemOwn. @@ -32,17 +31,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The Copy constructor. /// @@ -59,19 +49,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~Gesture() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// Enumeration for type of gesture. /// @@ -219,29 +196,6 @@ namespace Tizen.NUI } } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Gesture obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; @@ -251,20 +205,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -278,7 +225,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/GestureDetector.cs b/src/Tizen.NUI/src/public/GestureDetector.cs index df63df2c3..265bff702 100755 --- a/src/Tizen.NUI/src/public/GestureDetector.cs +++ b/src/Tizen.NUI/src/public/GestureDetector.cs @@ -151,14 +151,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/GraphicsTypeConverter.cs b/src/Tizen.NUI/src/public/GraphicsTypeConverter.cs index f039b06df..7dec52e06 100755 --- a/src/Tizen.NUI/src/public/GraphicsTypeConverter.cs +++ b/src/Tizen.NUI/src/public/GraphicsTypeConverter.cs @@ -81,7 +81,5 @@ namespace Tizen.NUI { return value * (defaultDpi / Window.Instance.Dpi.X); } - } - } diff --git a/src/Tizen.NUI/src/public/GraphicsTypeManager.cs b/src/Tizen.NUI/src/public/GraphicsTypeManager.cs index 169a54c17..e0351d247 100755 --- a/src/Tizen.NUI/src/public/GraphicsTypeManager.cs +++ b/src/Tizen.NUI/src/public/GraphicsTypeManager.cs @@ -111,5 +111,4 @@ namespace Tizen.NUI private volatile static GraphicsTypeManager _graphicsTypeManager; private GraphicsTypeConverter _typeConverter; } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Hover.cs b/src/Tizen.NUI/src/public/Hover.cs index 1865101f4..824f9dbdf 100755 --- a/src/Tizen.NUI/src/public/Hover.cs +++ b/src/Tizen.NUI/src/public/Hover.cs @@ -25,7 +25,7 @@ namespace Tizen.NUI /// hovered or the points where a hover has stopped.
///
/// 3 - public class Hover : global::System.IDisposable + public class Hover : Disposable { /// /// swigCMemOwn @@ -33,17 +33,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The default constructor. /// @@ -68,19 +59,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~Hover() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The time (in ms) that the hover event occurred. /// @@ -219,29 +197,6 @@ namespace Tizen.NUI return ret; } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Hover obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; @@ -265,20 +220,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -292,7 +240,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/InputMethodContext.cs b/src/Tizen.NUI/src/public/InputMethodContext.cs index 3fa18cb45..5d8acd2d6 100755 --- a/src/Tizen.NUI/src/public/InputMethodContext.cs +++ b/src/Tizen.NUI/src/public/InputMethodContext.cs @@ -761,14 +761,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User. - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/Key.cs b/src/Tizen.NUI/src/public/Key.cs index 7a3e36219..7e11b2686 100755 --- a/src/Tizen.NUI/src/public/Key.cs +++ b/src/Tizen.NUI/src/public/Key.cs @@ -24,7 +24,7 @@ namespace Tizen.NUI /// The key structure is used to store a key press. ///
/// 3 - public class Key : global::System.IDisposable + public class Key : Disposable { /// /// swigCMemOwn @@ -32,17 +32,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The default constructor. /// @@ -72,19 +63,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~Key() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// Enumeration for specifying the state of the key event. /// @@ -391,29 +369,6 @@ namespace Tizen.NUI } } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Checks to see if the Shift key modifier has been supplied. /// @@ -467,20 +422,13 @@ namespace Tizen.NUI /// /// The dispose type. /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -494,7 +442,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } } diff --git a/src/Tizen.NUI/src/public/KeyFrames.cs b/src/Tizen.NUI/src/public/KeyFrames.cs index 1c5963e4d..657a931c5 100755 --- a/src/Tizen.NUI/src/public/KeyFrames.cs +++ b/src/Tizen.NUI/src/public/KeyFrames.cs @@ -123,13 +123,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/Layer.cs b/src/Tizen.NUI/src/public/Layer.cs index 8874abfb7..35c8e3bd7 100755 --- a/src/Tizen.NUI/src/public/Layer.cs +++ b/src/Tizen.NUI/src/public/Layer.cs @@ -22,7 +22,6 @@ using Tizen.NUI.Binding; namespace Tizen.NUI { - /// /// Layers provide a mechanism for overlaying groups of actors on top of each other. /// @@ -688,13 +687,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -710,7 +702,6 @@ namespace Tizen.NUI } base.Dispose(type); - } private void SetBehavior(LayerBehavior behavior) diff --git a/src/Tizen.NUI/src/public/LongPressGesture.cs b/src/Tizen.NUI/src/public/LongPressGesture.cs index 60d2b6b56..f497012e2 100755 --- a/src/Tizen.NUI/src/public/LongPressGesture.cs +++ b/src/Tizen.NUI/src/public/LongPressGesture.cs @@ -152,13 +152,6 @@ namespace Tizen.NUI return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/LongPressGestureDetector.cs b/src/Tizen.NUI/src/public/LongPressGestureDetector.cs index 9752d2fea..c6f7a7340 100755 --- a/src/Tizen.NUI/src/public/LongPressGestureDetector.cs +++ b/src/Tizen.NUI/src/public/LongPressGestureDetector.cs @@ -224,14 +224,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/PaddingType.cs b/src/Tizen.NUI/src/public/PaddingType.cs index 5a286c784..35a324d96 100755 --- a/src/Tizen.NUI/src/public/PaddingType.cs +++ b/src/Tizen.NUI/src/public/PaddingType.cs @@ -24,7 +24,7 @@ namespace Tizen.NUI /// The gesture state. ///
/// 3 - public class PaddingType : global::System.IDisposable + public class PaddingType : Disposable { /// /// swigCMemOwn @@ -32,14 +32,6 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// @@ -70,19 +62,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~PaddingType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The Start value. /// @@ -277,30 +256,6 @@ namespace Tizen.NUI return !(a == b); } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// /// Equals /// @@ -359,21 +314,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -388,8 +335,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/PanGesture.cs b/src/Tizen.NUI/src/public/PanGesture.cs index 9cd694b13..84c7bb69f 100755 --- a/src/Tizen.NUI/src/public/PanGesture.cs +++ b/src/Tizen.NUI/src/public/PanGesture.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - /// /// A PanGesture is emitted when the user moves one or more fingers in a particular direction.
/// A pan gesture will end in the following ways:
@@ -344,13 +343,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -367,7 +359,5 @@ namespace Tizen.NUI base.Dispose(type); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Path.cs b/src/Tizen.NUI/src/public/Path.cs index 8bb8c12be..46f895df6 100755 --- a/src/Tizen.NUI/src/public/Path.cs +++ b/src/Tizen.NUI/src/public/Path.cs @@ -37,7 +37,6 @@ namespace Tizen.NUI public Path() : this(Interop.Path.Path_New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } internal Path(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Path.Path_SWIGUpcast(cPtr), cMemoryOwn) @@ -45,7 +44,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// /// Enumeration for the Points. /// @@ -186,13 +184,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -215,7 +206,5 @@ namespace Tizen.NUI internal static readonly int POINTS = Interop.Path.Path_Property_POINTS_get(); internal static readonly int CONTROL_POINTS = Interop.Path.Path_Property_CONTROL_POINTS_get(); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/PinchGesture.cs b/src/Tizen.NUI/src/public/PinchGesture.cs index 850c06f07..36e2d9bf1 100755 --- a/src/Tizen.NUI/src/public/PinchGesture.cs +++ b/src/Tizen.NUI/src/public/PinchGesture.cs @@ -33,7 +33,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// /// The scale factor from the start of the pinch gesture till the latest pinch gesture.
/// If the user is moving their fingers away from each other, then @@ -182,13 +181,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -205,7 +197,5 @@ namespace Tizen.NUI base.Dispose(type); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/PinchGestureDetector.cs b/src/Tizen.NUI/src/public/PinchGestureDetector.cs index 384b840a2..87fdd11a9 100755 --- a/src/Tizen.NUI/src/public/PinchGestureDetector.cs +++ b/src/Tizen.NUI/src/public/PinchGestureDetector.cs @@ -33,7 +33,6 @@ namespace Tizen.NUI private DaliEventHandler _pinchGestureEventHandler; private DetectedCallbackDelegate _pinchGestureCallbackDelegate; - /// /// Creates an initialized PinchGestureDetector. /// @@ -147,19 +146,10 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //Because the execution order of Finalizes is non-deterministic. - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) @@ -186,7 +176,6 @@ namespace Tizen.NUI //Here we send all data to user event handlers. _pinchGestureEventHandler(this, e); } - } /// @@ -236,7 +225,5 @@ namespace Tizen.NUI } } } - } - } diff --git a/src/Tizen.NUI/src/public/PixelBuffer.cs b/src/Tizen.NUI/src/public/PixelBuffer.cs index b4708ad19..502783868 100755 --- a/src/Tizen.NUI/src/public/PixelBuffer.cs +++ b/src/Tizen.NUI/src/public/PixelBuffer.cs @@ -278,14 +278,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User. - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //Because the execution order of Finalizes is non-deterministic. @@ -301,7 +293,5 @@ namespace Tizen.NUI base.Dispose(type); } - } - } diff --git a/src/Tizen.NUI/src/public/PixelData.cs b/src/Tizen.NUI/src/public/PixelData.cs index b0a3c8ab3..13fa8ea61 100755 --- a/src/Tizen.NUI/src/public/PixelData.cs +++ b/src/Tizen.NUI/src/public/PixelData.cs @@ -136,19 +136,10 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User. - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //Because the execution order of Finalizes is non-deterministic. - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) diff --git a/src/Tizen.NUI/src/public/Position.cs b/src/Tizen.NUI/src/public/Position.cs index 37e2c88d1..d3fe104c2 100755 --- a/src/Tizen.NUI/src/public/Position.cs +++ b/src/Tizen.NUI/src/public/Position.cs @@ -27,22 +27,14 @@ namespace Tizen.NUI /// /// 3 [Tizen.NUI.Binding.TypeConverter(typeof(PositionTypeConverter))] - public class Position : global::System.IDisposable + public class Position : Disposable { /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; /// /// The constructor. @@ -81,20 +73,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - - /// - /// Dispose. - /// - /// 3 - ~Position() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// ParentOrigin constants. It's 0.0. /// @@ -806,29 +784,6 @@ namespace Tizen.NUI return swigCPtr.Handle.GetHashCode(); } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Compares if rhs is equal to. /// @@ -871,20 +826,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -898,7 +846,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } diff --git a/src/Tizen.NUI/src/public/Position2D.cs b/src/Tizen.NUI/src/public/Position2D.cs index 41cf4f051..e7c9f6fa4 100755 --- a/src/Tizen.NUI/src/public/Position2D.cs +++ b/src/Tizen.NUI/src/public/Position2D.cs @@ -20,29 +20,19 @@ using Tizen.NUI.Binding; namespace Tizen.NUI { - /// /// Position2D is a two-dimensional vector. /// /// 3 [Tizen.NUI.Binding.TypeConverter(typeof(Position2DTypeConverter))] - public class Position2D : global::System.IDisposable + public class Position2D : Disposable { /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - private Position2DChangedCallback callback = null; /// @@ -87,19 +77,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Dispose. - /// - /// 3 - ~Position2D() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - internal delegate void Position2DChangedCallback(int x, int y); /// @@ -187,29 +164,6 @@ namespace Tizen.NUI return ConvertFromString(value); } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// The addition operator. /// @@ -384,20 +338,13 @@ namespace Tizen.NUI /// /// The dispose type. /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -411,7 +358,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private Position2D Add(Position2D rhs) @@ -428,7 +375,6 @@ namespace Tizen.NUI return ret; } - private Position2D Multiply(Position2D rhs) { Position2D ret = new Position2D(Interop.Vector2.Vector2_Multiply__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); @@ -443,7 +389,6 @@ namespace Tizen.NUI return ret; } - private Position2D Divide(Position2D rhs) { Position2D ret = new Position2D(Interop.Vector2.Vector2_Divide__SWIG_0(swigCPtr, Position2D.getCPtr(rhs)), true); @@ -471,8 +416,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } - diff --git a/src/Tizen.NUI/src/public/Property.cs b/src/Tizen.NUI/src/public/Property.cs index 6d9c0985c..1ab8c2635 100755 --- a/src/Tizen.NUI/src/public/Property.cs +++ b/src/Tizen.NUI/src/public/Property.cs @@ -26,24 +26,15 @@ namespace Tizen.NUI /// An array of property values. /// /// 3 - public class PropertyArray : global::System.IDisposable + public class PropertyArray : Disposable { /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The constructor. /// @@ -64,19 +55,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~PropertyArray() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The operator to access an element. /// @@ -219,29 +197,6 @@ namespace Tizen.NUI return ret; } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyArray obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; @@ -251,20 +206,13 @@ namespace Tizen.NUI /// Dispose. ///
/// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -278,7 +226,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } /// @@ -298,25 +246,16 @@ namespace Tizen.NUI /// A key type which can be either a std::string or a Property::Index. /// /// 3 - public class PropertyKey : global::System.IDisposable + public class PropertyKey : Disposable { /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// + /// /// The constructor. /// /// The string key. @@ -342,19 +281,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~PropertyKey() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The type of key. /// @@ -430,29 +356,6 @@ namespace Tizen.NUI } } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Compares if rhs is equal to. /// @@ -540,20 +443,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -567,7 +463,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } @@ -575,24 +471,15 @@ namespace Tizen.NUI /// A map of property values, the key type could be string or Property::Index. ///
/// 3 - public class PropertyMap : global::System.IDisposable + public class PropertyMap : Disposable { /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The constructor. /// @@ -618,19 +505,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~PropertyMap() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The operator to access the element with the specified string key.
/// If an element with the key does not exist, then it is created.
@@ -661,29 +535,6 @@ namespace Tizen.NUI } } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Retrieves the number of elements in the map. /// @@ -896,20 +747,13 @@ namespace Tizen.NUI /// Dispose. ///
/// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -923,7 +767,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } @@ -931,24 +775,15 @@ namespace Tizen.NUI /// A value-type representing a property value. ///
/// 3 - public class PropertyValue : global::System.IDisposable + public class PropertyValue : Disposable { /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// Creates a Size2D property value. /// @@ -988,6 +823,7 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// /// The default constructor. /// @@ -1167,19 +1003,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Dispose. - /// - /// 3 - ~PropertyValue() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// An extension to the property value class that allows us to create a /// Property value from a C# object, for example, integer, float, or string.
@@ -1276,29 +1099,6 @@ namespace Tizen.NUI return value; } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Retrieves a Size2D value. /// @@ -1603,20 +1403,13 @@ namespace Tizen.NUI /// Dispose. ///
/// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -1630,7 +1423,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } @@ -1962,24 +1755,16 @@ namespace Tizen.NUI } } - internal class Property : global::System.IDisposable + internal class Property : Disposable { /// /// swigCMemOwn /// /// 3 protected bool swigCMemOwn; - /// - /// 3 - /// A Flat to check if it is already disposed. - /// - protected bool disposed = false; private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// This constructor creates a property instance. /// @@ -2034,15 +1819,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - ~Property() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// Gets or sets the index of the property. /// @@ -2126,44 +1902,18 @@ namespace Tizen.NUI } } - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -2177,7 +1927,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/PropertyBuffer.cs b/src/Tizen.NUI/src/public/PropertyBuffer.cs index 6e6afa1a7..2ceb1c32d 100755 --- a/src/Tizen.NUI/src/public/PropertyBuffer.cs +++ b/src/Tizen.NUI/src/public/PropertyBuffer.cs @@ -86,14 +86,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -110,7 +102,5 @@ namespace Tizen.NUI base.Dispose(type); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/PropertyCondition.cs b/src/Tizen.NUI/src/public/PropertyCondition.cs index 08ab9423c..a69bb7827 100755 --- a/src/Tizen.NUI/src/public/PropertyCondition.cs +++ b/src/Tizen.NUI/src/public/PropertyCondition.cs @@ -50,6 +50,7 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } + /// /// Retrieves the arguments that this condition uses /// @@ -160,14 +161,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -184,7 +177,5 @@ namespace Tizen.NUI base.Dispose(type); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/PropertyNotification.cs b/src/Tizen.NUI/src/public/PropertyNotification.cs index 763608132..1f8113c6f 100755 --- a/src/Tizen.NUI/src/public/PropertyNotification.cs +++ b/src/Tizen.NUI/src/public/PropertyNotification.cs @@ -263,14 +263,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -325,7 +317,5 @@ namespace Tizen.NUI } } } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/PropertyNotifySignal.cs b/src/Tizen.NUI/src/public/PropertyNotifySignal.cs index 993eb0003..65f930691 100755 --- a/src/Tizen.NUI/src/public/PropertyNotifySignal.cs +++ b/src/Tizen.NUI/src/public/PropertyNotifySignal.cs @@ -22,24 +22,16 @@ namespace Tizen.NUI /// Signal connection class for PropertyNotification ///
/// 4 - public class PropertyNotifySignal : global::System.IDisposable + public class PropertyNotifySignal : Disposable { /// /// swigCMemOwn /// /// 4 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 4 - protected bool disposed = false; private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The constructor. /// @@ -55,42 +47,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose - /// - /// 3 - ~PropertyNotifySignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose - /// - /// 4 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Queries whether there are any connected slots. /// @@ -164,21 +120,13 @@ namespace Tizen.NUI ///
/// The dispose type. /// 4 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -193,9 +141,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Radian.cs b/src/Tizen.NUI/src/public/Radian.cs index 546bc025e..61872da93 100755 --- a/src/Tizen.NUI/src/public/Radian.cs +++ b/src/Tizen.NUI/src/public/Radian.cs @@ -21,7 +21,7 @@ namespace Tizen.NUI /// An angle in radians. ///
/// 3 - public class Radian : global::System.IDisposable + public class Radian : Disposable { /// /// swigCMemOwn @@ -29,17 +29,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The default constructor, initializes to 0. /// @@ -75,19 +66,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~Radian() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The value in radians. /// @@ -107,29 +85,6 @@ namespace Tizen.NUI } } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Conversion to float. /// @@ -151,20 +106,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -178,7 +126,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Rectangle.cs b/src/Tizen.NUI/src/public/Rectangle.cs index e1b6269ff..4610e030b 100755 --- a/src/Tizen.NUI/src/public/Rectangle.cs +++ b/src/Tizen.NUI/src/public/Rectangle.cs @@ -24,7 +24,7 @@ namespace Tizen.NUI ///
/// 3 [TypeConverter(typeof(RectangleTypeConverter))] - public class Rectangle : global::System.IDisposable + public class Rectangle : Disposable { /// /// swigCMemOwn @@ -32,17 +32,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The constructor. /// @@ -71,19 +62,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~Rectangle() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The x position of the rectangle. /// @@ -305,29 +283,6 @@ namespace Tizen.NUI return !(a == b); } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Equality operator. /// @@ -481,20 +436,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/RelativeVector2.cs b/src/Tizen.NUI/src/public/RelativeVector2.cs index 0d1da73b7..74fa82519 100755 --- a/src/Tizen.NUI/src/public/RelativeVector2.cs +++ b/src/Tizen.NUI/src/public/RelativeVector2.cs @@ -25,7 +25,7 @@ namespace Tizen.NUI ///
/// 3 [TypeConverter(typeof(RelativeVector2TypeConverter))] - public class RelativeVector2 : global::System.IDisposable + public class RelativeVector2 : Disposable { /// /// swigCMemOwn @@ -33,17 +33,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The constructor. /// @@ -90,19 +81,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Dispose. - /// - /// 3 - ~RelativeVector2() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The x component. /// @@ -240,29 +218,6 @@ namespace Tizen.NUI return new RelativeVector2(ValueCheck(vec.X), ValueCheck(vec.Y)); } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// The const array subscript operator overload. Should be 0, 1. /// @@ -382,20 +337,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -409,7 +357,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private RelativeVector2 Add(RelativeVector2 rhs) diff --git a/src/Tizen.NUI/src/public/RelativeVector3.cs b/src/Tizen.NUI/src/public/RelativeVector3.cs index fd03f700a..6bf0d0a54 100755 --- a/src/Tizen.NUI/src/public/RelativeVector3.cs +++ b/src/Tizen.NUI/src/public/RelativeVector3.cs @@ -26,7 +26,7 @@ namespace Tizen.NUI ///
/// 3 [TypeConverter(typeof(RelativeVector3TypeConverter))] - public class RelativeVector3 : global::System.IDisposable + public class RelativeVector3 : Disposable { /// /// swigCMemOwn @@ -34,17 +34,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The constructor. /// @@ -86,19 +77,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Dispose. - /// - /// 3 - ~RelativeVector3() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The x component. /// @@ -250,29 +228,6 @@ namespace Tizen.NUI return new RelativeVector3(ValueCheck(vec.X), ValueCheck(vec.Y), ValueCheck(vec.Z)); } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// The const array subscript operator overload. Should be 0, 1 or 2. /// @@ -413,20 +368,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -440,7 +388,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private RelativeVector3 Add(RelativeVector3 rhs) diff --git a/src/Tizen.NUI/src/public/RelativeVector4.cs b/src/Tizen.NUI/src/public/RelativeVector4.cs index ab618822c..8b3e9b983 100755 --- a/src/Tizen.NUI/src/public/RelativeVector4.cs +++ b/src/Tizen.NUI/src/public/RelativeVector4.cs @@ -25,7 +25,7 @@ namespace Tizen.NUI ///
/// 3 [TypeConverter(typeof(RelativeVector4TypeConverter))] - public class RelativeVector4 : global::System.IDisposable + public class RelativeVector4 : Disposable { /// /// swigCMemOwn @@ -33,17 +33,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The constructor. /// @@ -86,19 +77,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Dispose. - /// - /// 3 - ~RelativeVector4() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The x component. /// @@ -269,29 +247,6 @@ namespace Tizen.NUI return new RelativeVector4(ValueCheck(vec.X), ValueCheck(vec.Y), ValueCheck(vec.Z), ValueCheck(vec.W)); } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// The const array subscript operator overload. Should be 0, 1 3 or 3. /// @@ -442,20 +397,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -469,7 +417,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private RelativeVector4 Add(RelativeVector4 rhs) diff --git a/src/Tizen.NUI/src/public/RelayoutContainer.cs b/src/Tizen.NUI/src/public/RelayoutContainer.cs index b8ba8814f..3c300f8de 100755 --- a/src/Tizen.NUI/src/public/RelayoutContainer.cs +++ b/src/Tizen.NUI/src/public/RelayoutContainer.cs @@ -23,7 +23,7 @@ namespace Tizen.NUI /// An interface to encapsulate the information required for relayout. ///
/// 3 - public class RelayoutContainer : global::System.IDisposable + public class RelayoutContainer : Disposable { /// /// swigCMemOwn @@ -31,53 +31,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// - /// Dispose. - /// - /// 3 - ~RelayoutContainer() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// To make the RelayoutContainer instance be disposed. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Adds relayout information to the container if it doesn't already exist. /// @@ -105,20 +60,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -132,7 +80,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Rotation.cs b/src/Tizen.NUI/src/public/Rotation.cs index e4b29ff47..dd3cc1940 100755 --- a/src/Tizen.NUI/src/public/Rotation.cs +++ b/src/Tizen.NUI/src/public/Rotation.cs @@ -24,7 +24,7 @@ namespace Tizen.NUI ///
/// 3 [TypeConverter(typeof(RotationTypeConverter))] - public class Rotation : global::System.IDisposable + public class Rotation : Disposable { /// /// swigCMemOwn @@ -32,18 +32,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - - /// /// The default constructor. /// @@ -64,19 +54,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Dispose. - /// - /// 3 - ~Rotation() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// (0.0f,0.0f,0.0f,1.0f). /// @@ -277,29 +254,6 @@ namespace Tizen.NUI return ret; } - /// - /// To make the Rotation instance be disposed. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Helper to check if this is an identity quaternion. /// @@ -431,20 +385,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -458,7 +405,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private Rotation Add(Rotation other) diff --git a/src/Tizen.NUI/src/public/Sampler.cs b/src/Tizen.NUI/src/public/Sampler.cs index 45e4c3b50..27a4030ac 100755 --- a/src/Tizen.NUI/src/public/Sampler.cs +++ b/src/Tizen.NUI/src/public/Sampler.cs @@ -32,7 +32,6 @@ namespace Tizen.NUI public Sampler() : this(Interop.Sampler.Sampler_New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } /// @@ -93,19 +92,10 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) diff --git a/src/Tizen.NUI/src/public/ScrollViewEffect.cs b/src/Tizen.NUI/src/public/ScrollViewEffect.cs index 5235d8c9b..6d5e51c27 100755 --- a/src/Tizen.NUI/src/public/ScrollViewEffect.cs +++ b/src/Tizen.NUI/src/public/ScrollViewEffect.cs @@ -56,14 +56,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/ScrollViewPagePathEffect.cs b/src/Tizen.NUI/src/public/ScrollViewPagePathEffect.cs index f91806d0c..b302d2ac5 100755 --- a/src/Tizen.NUI/src/public/ScrollViewPagePathEffect.cs +++ b/src/Tizen.NUI/src/public/ScrollViewPagePathEffect.cs @@ -51,14 +51,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/Size.cs b/src/Tizen.NUI/src/public/Size.cs index f648567a9..de62cc966 100755 --- a/src/Tizen.NUI/src/public/Size.cs +++ b/src/Tizen.NUI/src/public/Size.cs @@ -26,18 +26,12 @@ namespace Tizen.NUI /// /// 5 [Tizen.NUI.Binding.TypeConverter(typeof(SizeTypeConverter))] - public class Size : global::System.IDisposable + public class Size : Disposable { /// swigCMemOwn. /// 5 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 5 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; //A Flag to check who called Dispose(). (By User or DisposeQueue) @@ -74,18 +68,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Dispose. - /// - ~Size() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The Zero constant, (0.0f, 0.0f, 0.0f). /// @@ -261,29 +243,6 @@ namespace Tizen.NUI } } - /// - /// Dispose. - /// - /// 5 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Determines whether the specified object is equal to the current object. /// @@ -338,8 +297,6 @@ namespace Tizen.NUI return ret; } - - /// /// The type cast operator, Size to Vector3. /// @@ -382,21 +339,13 @@ namespace Tizen.NUI /// Dispose. ///
/// 5 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -411,7 +360,7 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private Size Add(Size rhs) diff --git a/src/Tizen.NUI/src/public/Size2D.cs b/src/Tizen.NUI/src/public/Size2D.cs index 651274256..6da1c8863 100755 --- a/src/Tizen.NUI/src/public/Size2D.cs +++ b/src/Tizen.NUI/src/public/Size2D.cs @@ -24,7 +24,7 @@ namespace Tizen.NUI ///
/// 3 [Tizen.NUI.Binding.TypeConverter(typeof(Size2DTypeConverter))] - public class Size2D : global::System.IDisposable + public class Size2D : Disposable { /// /// swigCMemOwn @@ -32,17 +32,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - private Size2DChangedCallback callback = null; /// @@ -65,19 +56,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Dispose. - /// - /// 3 - ~Size2D() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - internal delegate void Size2DChangedCallback(int width, int height); /// @@ -242,29 +220,6 @@ namespace Tizen.NUI } } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - /// /// Determines whether the specified object is equal to the current object. /// @@ -352,20 +307,13 @@ namespace Tizen.NUI /// Dispose. /// /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -379,7 +327,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private Size2D Add(Size2D rhs) diff --git a/src/Tizen.NUI/src/public/TapGesture.cs b/src/Tizen.NUI/src/public/TapGesture.cs index e45e447f7..89f491adc 100755 --- a/src/Tizen.NUI/src/public/TapGesture.cs +++ b/src/Tizen.NUI/src/public/TapGesture.cs @@ -178,13 +178,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -202,5 +195,4 @@ namespace Tizen.NUI base.Dispose(type); } } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/TapGestureDetector.cs b/src/Tizen.NUI/src/public/TapGestureDetector.cs index 2f7dec36d..86a0087e1 100755 --- a/src/Tizen.NUI/src/public/TapGestureDetector.cs +++ b/src/Tizen.NUI/src/public/TapGestureDetector.cs @@ -42,7 +42,6 @@ namespace Tizen.NUI public TapGestureDetector() : this(Interop.TapGestureDetector.TapGestureDetector_New__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } /// @@ -210,14 +209,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -305,5 +296,4 @@ namespace Tizen.NUI } } } - } diff --git a/src/Tizen.NUI/src/public/Texture.cs b/src/Tizen.NUI/src/public/Texture.cs index 76a531e64..df6930047 100755 --- a/src/Tizen.NUI/src/public/Texture.cs +++ b/src/Tizen.NUI/src/public/Texture.cs @@ -132,14 +132,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -156,7 +148,5 @@ namespace Tizen.NUI base.Dispose(type); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/TextureSet.cs b/src/Tizen.NUI/src/public/TextureSet.cs index 1328137f5..a92b909da 100755 --- a/src/Tizen.NUI/src/public/TextureSet.cs +++ b/src/Tizen.NUI/src/public/TextureSet.cs @@ -35,7 +35,6 @@ namespace Tizen.NUI public TextureSet() : this(Interop.TextureSet.TextureSet_New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } internal TextureSet(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.TextureSet.TextureSet_SWIGUpcast(cPtr), cMemoryOwn) @@ -139,14 +138,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -164,5 +155,4 @@ namespace Tizen.NUI base.Dispose(type); } } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Timer.cs b/src/Tizen.NUI/src/public/Timer.cs index 98d9d6618..5147c391b 100755 --- a/src/Tizen.NUI/src/public/Timer.cs +++ b/src/Tizen.NUI/src/public/Timer.cs @@ -212,13 +212,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/Touch.cs b/src/Tizen.NUI/src/public/Touch.cs index a0c94fba5..88344e573 100755 --- a/src/Tizen.NUI/src/public/Touch.cs +++ b/src/Tizen.NUI/src/public/Touch.cs @@ -252,13 +252,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -275,7 +268,6 @@ namespace Tizen.NUI base.Dispose(type); } - } /// diff --git a/src/Tizen.NUI/src/public/TransitionData.cs b/src/Tizen.NUI/src/public/TransitionData.cs index f8588f150..14aa69470 100755 --- a/src/Tizen.NUI/src/public/TransitionData.cs +++ b/src/Tizen.NUI/src/public/TransitionData.cs @@ -104,14 +104,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -128,7 +120,5 @@ namespace Tizen.NUI base.Dispose(type); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/TypeInfo.cs b/src/Tizen.NUI/src/public/TypeInfo.cs index 111f5bd8a..1b617980f 100755 --- a/src/Tizen.NUI/src/public/TypeInfo.cs +++ b/src/Tizen.NUI/src/public/TypeInfo.cs @@ -129,14 +129,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -153,7 +145,5 @@ namespace Tizen.NUI base.Dispose(type); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/TypeRegistry.cs b/src/Tizen.NUI/src/public/TypeRegistry.cs index 310c81960..8945881b9 100755 --- a/src/Tizen.NUI/src/public/TypeRegistry.cs +++ b/src/Tizen.NUI/src/public/TypeRegistry.cs @@ -48,14 +48,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -155,8 +147,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - } - } - diff --git a/src/Tizen.NUI/src/public/UIComponents/Button.cs b/src/Tizen.NUI/src/public/UIComponents/Button.cs index 3ce7dce5c..15324be32 100755 --- a/src/Tizen.NUI/src/public/UIComponents/Button.cs +++ b/src/Tizen.NUI/src/public/UIComponents/Button.cs @@ -947,14 +947,6 @@ namespace Tizen.NUI.UIComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/UIComponents/CheckBoxButton.cs b/src/Tizen.NUI/src/public/UIComponents/CheckBoxButton.cs index bb42607ff..c3b6356ab 100755 --- a/src/Tizen.NUI/src/public/UIComponents/CheckBoxButton.cs +++ b/src/Tizen.NUI/src/public/UIComponents/CheckBoxButton.cs @@ -60,13 +60,6 @@ namespace Tizen.NUI.UIComponents return; } - if(type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/UIComponents/Popup.cs b/src/Tizen.NUI/src/public/UIComponents/Popup.cs index 56da2fb40..1794dabf4 100755 --- a/src/Tizen.NUI/src/public/UIComponents/Popup.cs +++ b/src/Tizen.NUI/src/public/UIComponents/Popup.cs @@ -1270,14 +1270,6 @@ namespace Tizen.NUI.UIComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/UIComponents/ProgressBar.cs b/src/Tizen.NUI/src/public/UIComponents/ProgressBar.cs index 9e2005646..ee9757bb7 100755 --- a/src/Tizen.NUI/src/public/UIComponents/ProgressBar.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ProgressBar.cs @@ -408,14 +408,6 @@ namespace Tizen.NUI.UIComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/UIComponents/PushButton.cs b/src/Tizen.NUI/src/public/UIComponents/PushButton.cs index cdafc0629..7b6ef6ca1 100755 --- a/src/Tizen.NUI/src/public/UIComponents/PushButton.cs +++ b/src/Tizen.NUI/src/public/UIComponents/PushButton.cs @@ -127,13 +127,6 @@ namespace Tizen.NUI.UIComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/UIComponents/RadioButton.cs b/src/Tizen.NUI/src/public/UIComponents/RadioButton.cs index 3de4fc1b5..5f433d710 100755 --- a/src/Tizen.NUI/src/public/UIComponents/RadioButton.cs +++ b/src/Tizen.NUI/src/public/UIComponents/RadioButton.cs @@ -75,14 +75,6 @@ namespace Tizen.NUI.UIComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs index e1df8a999..fc848e727 100755 --- a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs @@ -628,13 +628,6 @@ namespace Tizen.NUI.UIComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/UIComponents/Slider.cs b/src/Tizen.NUI/src/public/UIComponents/Slider.cs index 767f87013..b8785dbbb 100755 --- a/src/Tizen.NUI/src/public/UIComponents/Slider.cs +++ b/src/Tizen.NUI/src/public/UIComponents/Slider.cs @@ -732,14 +732,6 @@ namespace Tizen.NUI.UIComponents return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/Vector2.cs b/src/Tizen.NUI/src/public/Vector2.cs index 20e18d964..7c7b8c8df 100755 --- a/src/Tizen.NUI/src/public/Vector2.cs +++ b/src/Tizen.NUI/src/public/Vector2.cs @@ -25,7 +25,7 @@ namespace Tizen.NUI /// /// 3 [TypeConverter(typeof(Vector2TypeConverter))] - public class Vector2 : global::System.IDisposable + public class Vector2 : Disposable { /// /// swigCMemOwn. @@ -33,14 +33,7 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; /// /// The default constructor initializes the vector to 0. @@ -98,19 +91,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Destructor. - /// - /// 3 - ~Vector2() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// (1.0f,1.0f). /// @@ -448,29 +428,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static Vector2 GetVector2FromPtr(global::System.IntPtr cPtr) { Vector2 ret = new Vector2(cPtr, false); @@ -496,20 +453,13 @@ namespace Tizen.NUI /// /// The dispose type /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -523,7 +473,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private Vector2 Add(Vector2 rhs) diff --git a/src/Tizen.NUI/src/public/Vector3.cs b/src/Tizen.NUI/src/public/Vector3.cs index c27670cd6..1e5cb08f4 100755 --- a/src/Tizen.NUI/src/public/Vector3.cs +++ b/src/Tizen.NUI/src/public/Vector3.cs @@ -25,21 +25,14 @@ namespace Tizen.NUI /// /// 3 [TypeConverter(typeof(Vector3TypeConverter))] - public class Vector3 : global::System.IDisposable + public class Vector3 : Disposable { /// /// swigCMemOwn. /// /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; /// /// The constructor. @@ -98,19 +91,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Destructor. - /// - /// 3 - ~Vector3() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// (1.0f,1.0f,1.0f). /// @@ -597,29 +577,6 @@ namespace Tizen.NUI return ret; } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector3 obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; @@ -645,20 +602,13 @@ namespace Tizen.NUI /// /// The dispose type /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -672,7 +622,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private Vector3 Add(Vector3 rhs) diff --git a/src/Tizen.NUI/src/public/Vector4.cs b/src/Tizen.NUI/src/public/Vector4.cs index 96c89487c..05706ceb9 100755 --- a/src/Tizen.NUI/src/public/Vector4.cs +++ b/src/Tizen.NUI/src/public/Vector4.cs @@ -25,7 +25,7 @@ namespace Tizen.NUI /// /// 3 [TypeConverter(typeof(Vector4TypeConverter))] - public class Vector4 : global::System.IDisposable + public class Vector4 : Disposable { /// /// swigCMemOwn. @@ -33,15 +33,7 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; /// /// The default constructor initializes the vector to 0. @@ -101,19 +93,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Destructor. - /// - /// 3 - ~Vector4() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// (1.0f,1.0f,1.0f,1.0f). /// @@ -590,29 +569,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector4 obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; @@ -666,20 +622,13 @@ namespace Tizen.NUI /// /// The dispose type /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -693,7 +642,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } private Vector4 Add(Vector4 rhs) diff --git a/src/Tizen.NUI/src/public/ViewWrapper.cs b/src/Tizen.NUI/src/public/ViewWrapper.cs index 9d610885e..794d8019e 100755 --- a/src/Tizen.NUI/src/public/ViewWrapper.cs +++ b/src/Tizen.NUI/src/public/ViewWrapper.cs @@ -56,14 +56,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. diff --git a/src/Tizen.NUI/src/public/VisualBase.cs b/src/Tizen.NUI/src/public/VisualBase.cs index f53f63f5b..b792be040 100755 --- a/src/Tizen.NUI/src/public/VisualBase.cs +++ b/src/Tizen.NUI/src/public/VisualBase.cs @@ -196,13 +196,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -219,7 +212,5 @@ namespace Tizen.NUI base.Dispose(type); } - } - } diff --git a/src/Tizen.NUI/src/public/WatchTime.cs b/src/Tizen.NUI/src/public/WatchTime.cs index 6ae6c72ae..c157b5987 100755 --- a/src/Tizen.NUI/src/public/WatchTime.cs +++ b/src/Tizen.NUI/src/public/WatchTime.cs @@ -24,7 +24,7 @@ namespace Tizen.NUI /// on receiving timeTick signal. /// /// 4 - public class WatchTime : global::System.IDisposable + public class WatchTime : Disposable { /// /// swigCMemOwn. @@ -32,15 +32,7 @@ namespace Tizen.NUI /// 4 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 4 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; /// /// Constructor. @@ -57,18 +49,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Distructor. - /// - ~WatchTime() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// Get the current hour. /// @@ -217,29 +197,6 @@ namespace Tizen.NUI } } - /// - /// To make watch time instance be disposed. - /// - /// 4 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WatchTime obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; @@ -348,21 +305,13 @@ namespace Tizen.NUI /// /// DisposeTypes /// 4 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -379,7 +328,5 @@ namespace Tizen.NUI disposed = true; } - } - } diff --git a/src/Tizen.NUI/src/public/Wheel.cs b/src/Tizen.NUI/src/public/Wheel.cs index 216558044..fd666a5bf 100755 --- a/src/Tizen.NUI/src/public/Wheel.cs +++ b/src/Tizen.NUI/src/public/Wheel.cs @@ -17,7 +17,6 @@ namespace Tizen.NUI { - /// /// The wheel event structure is used to store a wheel rolling, it facilitates processing of the wheel rolling and passing to other libraries like Toolkit.
/// There is a key modifier which relates to keys like Alt, Shift, and Ctrl functions are supplied to check if they have been pressed when the wheel is being rolled.
@@ -25,7 +24,7 @@ namespace Tizen.NUI /// The mouse wheel event can be sent to the specific actor but the custom wheel event will be sent to the window.
///
/// 3 - public class Wheel : global::System.IDisposable + public class Wheel : Disposable { /// /// swigCMemOwn. @@ -33,17 +32,8 @@ namespace Tizen.NUI /// 3 protected bool swigCMemOwn; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// /// The default constructor. /// @@ -74,19 +64,6 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } - /// - /// Destructor. - /// - /// 3 - ~Wheel() - { - if(!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - /// /// The type of the wheel event. /// @@ -306,29 +283,6 @@ namespace Tizen.NUI return ret; } - /// - /// Dispose. - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Wheel obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; @@ -346,20 +300,13 @@ namespace Tizen.NUI /// /// The type dispose, it could be from user, or called by DisposeQueue. /// 3 - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -373,9 +320,7 @@ namespace Tizen.NUI } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - disposed = true; + base.Dispose(type); } - } - } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Widget.cs b/src/Tizen.NUI/src/public/Widget.cs index 43130bb54..2043943f8 100755 --- a/src/Tizen.NUI/src/public/Widget.cs +++ b/src/Tizen.NUI/src/public/Widget.cs @@ -166,13 +166,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) diff --git a/src/Tizen.NUI/src/public/WidgetView.cs b/src/Tizen.NUI/src/public/WidgetView.cs index 4c42e7b83..e40e8ef15 100755 --- a/src/Tizen.NUI/src/public/WidgetView.cs +++ b/src/Tizen.NUI/src/public/WidgetView.cs @@ -581,14 +581,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -635,7 +627,6 @@ namespace Tizen.NUI base.Dispose(type); } - // Callback for WidgetView WidgetAdded signal private void OnWidgetAdded(IntPtr data) { diff --git a/src/Tizen.NUI/src/public/WidgetViewManager.cs b/src/Tizen.NUI/src/public/WidgetViewManager.cs index 732f5eb50..8fbf4fbbc 100755 --- a/src/Tizen.NUI/src/public/WidgetViewManager.cs +++ b/src/Tizen.NUI/src/public/WidgetViewManager.cs @@ -27,7 +27,6 @@ namespace Tizen.NUI { - /// /// WidgetViewManager manages addition of WidgetView controls. /// This class provides the functionality of adding the widget views and controlling the widgets. @@ -102,13 +101,6 @@ namespace Tizen.NUI return; } - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - //Release your own unmanaged resources here. //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. @@ -123,7 +115,5 @@ namespace Tizen.NUI } base.Dispose(type); } - } - } \ No newline at end of file -- 2.34.1