https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1805
Let we don't initialize known values as default.
warning messages
```
TizenFX/src/Tizen.NUI/src/devel/Lite/UIRect.cs(66,35): warning CA1805: Member 'Zero' is explicitly initialized to its default value
TizenFX/src/Tizen.NUI/src/internal/Application/Application.cs(369,55): warning CA1805: Member 'rootIdleCallback' is explicitly initialized to its default value
...
```
For now, just resolve this errors for internal and devel and some non-touched public recently.
Warning counts 1817 -> 1519 (reduce 298 warnings)
Remained warnings for CA1805 : `BaseComponents`, `Color`, `Renderer`.
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
/// <summary>
/// Gets a <see cref="UIRect"/> structure with all coordinates and sizes set to zero.
/// </summary>
- public static UIRect Zero = new UIRect();
+ public static readonly UIRect Zero;
/// <summary>
/// Gets the y-coordinate of the top edge of the rectangle.
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void RootIdleCallbackType();
- private RootIdleCallbackType rootIdleCallback = null;
+ private RootIdleCallbackType rootIdleCallback;
private Dictionary<System.Delegate, bool> idleCallbackMap = new Dictionary<System.Delegate, bool>();
private void RootIdleCallback()
protected Application application;
private string stylesheet = "";
private NUIApplication.WindowMode windowMode = NUIApplication.WindowMode.Opaque;
- private Rectangle windowRectangle = null;
+ private Rectangle windowRectangle;
private WindowType defaultWindowType = WindowType.Normal;
private ICoreTask coreTask;
- private WindowData windowData = null;
+ private WindowData windowData;
/// <summary>
/// The Dictionary to contain each type of event callback.
{
private const int MaxBitWidth = 62;
private static readonly Dictionary<string, ulong> registeredStates = new Dictionary<string, ulong>();
- private static int nextBitPosition = 0;
+ private static int nextBitPosition;
/// <summary>
/// </summary>
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
private bool swigCMemOwn { get; set; }
- private bool isDisposeQueued = false;
+ private bool isDisposeQueued;
/// <summary>
/// Create an instance of Disposable.
private EventThreadCallback eventThreadCallback;
private EventThreadCallback.CallbackDelegate disposeQueueProcessDisposablesDelegate;
- private bool initialized = false;
- private bool processorRegistered = false;
- private bool eventThreadCallbackTriggered = false;
+ private bool initialized;
+ private bool processorRegistered;
+ private bool eventThreadCallbackTriggered;
- private bool incrementalDisposeSupported = false;
- private bool fullCollectRequested = false;
+ private bool incrementalDisposeSupported;
+ private bool fullCollectRequested;
private DisposeQueue()
{
private const string logTag = "Tizen.NUI";
private Window window;
private int resourceId;
- private bool disposed = false;
+ private bool disposed;
/// <summary>
/// Initializes the NUI Window class.
private const string logTag = "Tizen.NUI";
private Window window;
private int resourceId;
- private bool disposed = false;
+ private bool disposed;
/// <summary>
/// Initializes the NUI Window class.
/// </summary>
internal sealed class ProcessorController : Disposable
{
- private static ProcessorController instance = null;
- private static bool initialized = false;
+ private static ProcessorController instance;
+ private static bool initialized;
private ProcessorController() : this(true)
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate void ProcessorEventHandler();
- private ProcessorEventHandler processorCallback = null;
+ private ProcessorEventHandler processorCallback;
private uint onceEventIndex;
// Double buffered once event processing
/// </summary>
internal static class SystemFontSizeChangedManager
{
- private static SystemSettingsFontSize? fontSize = null;
+ private static SystemSettingsFontSize? fontSize;
private static WeakEvent<EventHandler<FontSizeChangedEventArgs>> proxy = new WeakEvent<EventHandler<FontSizeChangedEventArgs>>();
static SystemFontSizeChangedManager()
private string logTag = "NUI";
private readonly SafeFrameBrokerHandle handle;
private Dictionary<int, Interop.FrameBroker.AppControlResultCallback> resultCallbackMaps = new Dictionary<int, Interop.FrameBroker.AppControlResultCallback>();
- private int resultId = 0;
+ private int resultId;
private Interop.FrameBroker.FrameContextLifecycleCallbacks callbacks;
private IntPtr context = IntPtr.Zero;
- private bool disposed = false;
+ private bool disposed;
private Renderer renderer;
private TextureSet textureSet;
private const string logTag = "NUI";
private readonly IntPtr frame;
private int fd = -1;
- private uint size = 0;
+ private uint size;
internal FrameData(IntPtr frame)
{
private string logTag = "NUI";
private readonly SafeFrameProviderHandle handle;
private Interop.FrameProvider.FrameProviderEventCallbacks callbacks;
- private bool disposed = false;
+ private bool disposed;
/// <summary>
/// Initializes the FrameProvider class.
{
[global::System.ThreadStatic]
private static global::System.Exception pendingException = null;
- private static int numExceptionsPending = 0;
+ private static int numExceptionsPending;
private static readonly object exceptionPendingLock = new object();
/// <since_tizen> 3 </since_tizen>
private int maxColumnConut;
private float[] hLocations;
private float[] vLocations;
- private int totalHorizontalExpand = 0;
- private int totalVerticalExpand = 0;
+ private int totalHorizontalExpand;
+ private int totalVerticalExpand;
private List<GridChild> gridChildren = new List<GridChild>();
private float windowHeight;
private LayoutTransitionManager transitionManager;
- private int layoutCount = 0;
+ private int layoutCount;
/// <summary>
/// Constructs a LayoutController which controls the measuring and layouting.<br />
{
internal class LayoutTransitionManager : Disposable
{
- private bool overrideCoreAnimation = false;
+ private bool overrideCoreAnimation;
private Animation coreAnimation;
private List<LayoutData> layoutTransitionDataQueue;
private List<LayoutItem> itemRemovalQueue;
/// </summary>
internal class TransitionGroupItem : TransitionItemBase
{
- private List<TransitionItemBase> transitionItemList = null;
+ private List<TransitionItemBase> transitionItemList;
- private bool useGroupTimePeriod = false;
- private bool stepTransition = false;
- private bool useGroupAlphaFunction = false;
+ private bool useGroupTimePeriod;
+ private bool stepTransition;
+ private bool useGroupAlphaFunction;
- private View transitionView = null;
+ private View transitionView;
/// <summary>
/// Creates an initialized fade.<br />
private const int minGrow = 1;
private int capacity = initialcapacity;
- private int tail = 0;
+ private int tail;
private T[] heap = Array.Empty<T>();
public CustomHeap(Comparer<T> comparer)
[EditorBrowsable(EditorBrowsableState.Never)]
public class WebBackForwardList : Disposable
{
- private WebBackForwardSubList backwardItemList = null;
- private WebBackForwardSubList forwardItemList = null;
+ private WebBackForwardSubList backwardItemList;
+ private WebBackForwardSubList forwardItemList;
internal WebBackForwardList(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
private delegate void ParseValueFunc(string s, IFormatProvider provider);
- static private Dictionary<Type, ParseValueFunc> typeToParseValueFunc = null;
+ static private Dictionary<Type, ParseValueFunc> typeToParseValueFunc;
static private void BuildParseValueFunc()
{
public static readonly XmlName xArguments = new XmlName("x", "Arguments");
public static readonly XmlName xFactoryMethod = new XmlName("x", "FactoryMethod");
public static readonly XmlName xDataType = new XmlName("x", "DataType");
- public static readonly XmlName Empty = new XmlName();
+ public static readonly XmlName Empty;
public string NamespaceURI { get; }
public string LocalName { get; }
#endregion Event, Enum, Struct, ETC
#region Private
- private static Interop.Accessibility.EnabledDisabledSignalHandler enabledSignalHandler = null;
+ private static Interop.Accessibility.EnabledDisabledSignalHandler enabledSignalHandler;
- private static Interop.Accessibility.EnabledDisabledSignalHandler disabledSignalHandler = null;
+ private static Interop.Accessibility.EnabledDisabledSignalHandler disabledSignalHandler;
- private static Interop.Accessibility.EnabledDisabledSignalHandler screenReaderEnabledSignalHandler = null;
+ private static Interop.Accessibility.EnabledDisabledSignalHandler screenReaderEnabledSignalHandler;
- private static Interop.Accessibility.EnabledDisabledSignalHandler screenReaderDisabledSignalHandler = null;
+ private static Interop.Accessibility.EnabledDisabledSignalHandler screenReaderDisabledSignalHandler;
private static readonly IReadOnlyDictionary<string, SayFinishedState> sayFinishedStateDictionary = new Dictionary<string, SayFinishedState>
{
/// <since_tizen> 3 </since_tizen>
public class Animation : BaseHandle
{
- private static bool? disableAnimation = null;
+ private static bool? disableAnimation;
private AnimationFinishedEventCallbackType animationFinishedEventCallback;
private System.IntPtr finishedCallbackOfNative;
private AnimationProgressReachedEventCallbackType animationProgressReachedEventCallback;
- private string[] properties = null;
- private string[] destValue = null;
- private int[] startTime = null;
- private int[] endTime = null;
+ private string[] properties;
+ private string[] destValue;
+ private int[] startTime;
+ private int[] endTime;
- private List<string> propertyList = null;
- private List<string> destValueList = null;
- private List<int> startTimeList = null;
- private List<int> endTimeList = null;
+ private List<string> propertyList;
+ private List<string> destValueList;
+ private List<int> startTimeList;
+ private List<int> endTimeList;
- private List<System.Delegate> customAlphaFunctionDelegates = null;
+ private List<System.Delegate> customAlphaFunctionDelegates;
/// <summary>
/// Creates an initialized animation.<br />
/// <since_tizen> 9 </since_tizen>
public class TransitionOptions : IDisposable
{
- private bool disposed = false;
+ private bool disposed;
/// <summary>
/// Initializes the TransitionOptions class.
/// This is property for Page Transition.
/// </summary>
/// <since_tizen> 9 </since_tizen>
- public string TransitionTag { set; get; } = null;
+ public string TransitionTag { set; get; }
/// <summary>
/// Property for Page transition.
/// Default value is false
/// </summary>
/// <since_tizen> 9 </since_tizen>
- public bool TransitionWithChild { set; get; } = false;
+ public bool TransitionWithChild { set; get; }
/// <summary>
/// Hidden API (Inhouse API).
/// <summary>
/// The instance of ResourceManager.
/// </summary>
- private static System.Resources.ResourceManager resourceManager = null;
- private static string currentLoadedXaml = null;
+ private static System.Resources.ResourceManager resourceManager;
+ private static string currentLoadedXaml;
/// <summary>
/// The border window
/// </summary>
- private bool borderEnabled = false;
- private IBorderInterface borderInterface = null;
+ private bool borderEnabled;
+ private IBorderInterface borderInterface;
private States currentState = States.Invalid;
[EditorBrowsable(EditorBrowsableState.Never)]
public class NUIFrameComponent : FrameComponent
{
- private bool defaultWindowSet = false;
+ private bool defaultWindowSet;
internal NUIWindowInfo NUIWindowInfo
{
get;
[EditorBrowsable(EditorBrowsableState.Never)]
public class NUIWidgetComponent : WidgetComponent
{
- private bool defaultWindowSet = false;
+ private bool defaultWindowSet;
internal NUIWindowProxy NUIWindowProxy
{
get;
[EditorBrowsable(EditorBrowsableState.Never)]
public class WindowData : Disposable
{
- private IBorderInterface borderInterface = null;
+ private IBorderInterface borderInterface;
[EditorBrowsable(EditorBrowsableState.Never)]
public WindowData() : this(Interop.WindowData.New(), true)
[EditorBrowsable(EditorBrowsableState.Never)]
public class ApplicationTransitionManager : IDisposable
{
- private bool disposed = false;
+ private bool disposed;
private FrameProvider frameProvider;
private DefaultFrameBroker frameBroker;
private Window mainWindow;
static readonly IStyleProperty IsEnabledProperty = new StyleProperty<View, bool>((v, o) => v.IsEnabled = o);
private Dictionary<IStyleProperty, object> values = new Dictionary<IStyleProperty, object>();
- private bool disposed = false;
+ private bool disposed;
- private float? sizeDepth = null;
+ private float? sizeDepth;
static ViewStyle() { }
/// </remarks>
public delegate void ClipboardCallback(bool success, ClipEvent clipEvent);
- internal bool hasClipboardDataReceived = false;
+ internal bool hasClipboardDataReceived;
internal Dictionary<uint, ClipboardCallback> receivedCallbackDictionary = new Dictionary<uint, ClipboardCallback>();
private Clipboard(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
private bool registerMe;
//The flag to check who called Dispose(). (By User or DisposeQueue)
- private bool isDisposeQueued = false;
+ private bool isDisposeQueued;
/// <summary>
/// Create an instance of BaseHandle.
internal BaseHandle InternalParent;
private List<View> childViews = new List<View>();
- private MergedStyle mergedStyle = null;
+ private MergedStyle mergedStyle;
ResourceDictionary _resources;
bool IResourcesProvider.IsResourcesCreated => _resources != null;
/// <since_tizen> Only used by Tizen.NUI.Components, will not be opened </since_tizen>
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public delegate void ExtentsChangedCallback(ushort start, ushort end, ushort top, ushort bottom);
- private ExtentsChangedCallback callback = null;
+ private ExtentsChangedCallback callback;
/// <summary>
/// The Start extent.
[EditorBrowsable(EditorBrowsableState.Never)]
public partial class FrameUpdateCallbackInterface : Disposable
{
- private uint onUpdateCallbackVersion = 0u;
+ private uint onUpdateCallbackVersion;
/// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public class Layer : Container
{
private Window window;
- private int layoutCount = 0;
+ private int layoutCount;
private EventHandler<VisibilityChangedEventArgs> visibilityChangedEventHandler;
private VisibilityChangedEventCallbackType visibilityChangedEventCallback;
/// </summary>
internal struct FrameworkInformation
{
- public readonly static string ResourcePath = "/usr/share/dotnet.tizen/framework/res/";
+ public const string ResourcePath = "/usr/share/dotnet.tizen/framework/res/";
}
/// <summary>
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- private PositionChangedCallback callback = null;
+ private PositionChangedCallback callback;
}
}
[Tizen.NUI.Binding.TypeConverter(typeof(Position2DTypeConverter))]
public class Position2D : Disposable, ICloneable
{
- private Position2DChangedCallback callback = null;
+ private Position2DChangedCallback callback;
/// <summary>
/// The constructor.
}
internal delegate void RectangleChangedCallback(int x, int y, int width, int height);
- private RectangleChangedCallback callback = null;
+ private RectangleChangedCallback callback;
/// <summary>
/// The x position of the rectangle.
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal delegate void RelativeVector4ChangedCallback(float x, float y, float z, float w);
- private RelativeVector4ChangedCallback callback = null;
+ private RelativeVector4ChangedCallback callback;
/// <summary>
/// The x component.
depth = d;
}
- private SizeChangedCallback callback = null;
+ private SizeChangedCallback callback;
}
}
public class Size2D : Disposable, ICloneable
{
- private Size2DChangedCallback callback = null;
+ private Size2DChangedCallback callback;
/// <summary>
/// The constructor.
}
internal delegate void Vector2ChangedCallback(float x, float y);
- private Vector2ChangedCallback callback = null;
+ private Vector2ChangedCallback callback;
/// <summary>
/// Returns a Vector2 instance where both the x and y components are set to 1.0f.
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal delegate void Vector3ChangedCallback(float x, float y, float z);
- private Vector3ChangedCallback callback = null;
+ private Vector3ChangedCallback callback;
/// <summary>
/// Returns a Vector2 instance where both the x and y components are set to 1.0f.
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal delegate void Vector4ChangedCallback(float x, float y, float z, float w);
- private Vector4ChangedCallback callback = null;
+ private Vector4ChangedCallback callback;
/// <summary>
/// Returns a Vector2 instance where both the x and y components are set to 1.0f.
{
private const int addThreshold = 1000; // Experimetal constant
private const int listLengthThreshold = 1000; // Experimetal constant
- private int cleanUpAddCount = 0;
+ private int cleanUpAddCount;
private List<WeakHandler<T>> handlers = new List<WeakHandler<T>>();
/// <summary>
/// <summary>
/// ViewRegistry is a singleton.
/// </summary>
- private static CustomViewRegistry instance = null;
+ private static CustomViewRegistry instance;
private CreateControlDelegate createCallback;
private SetPropertyDelegate setPropertyCallback;
private Window mDragWindow;
private int shadowWidth;
private int shadowHeight;
- private int dragWindowOffsetX = 0;
- private int dragWindowOffsetY = 0;
+ private int dragWindowOffsetX;
+ private int dragWindowOffsetY;
private const int MinDragWindowWidth = 100;
private const int MinDragWindowHeight = 100;
[EditorBrowsable(EditorBrowsableState.Never)]
public class EncodedImageBuffer : BaseHandle
{
- private VectorUnsignedChar mCachedBuffer = null; // cached encoded raw buffer
+ private VectorUnsignedChar mCachedBuffer; // cached encoded raw buffer
/// <summary>
/// The list of type of encoded image buffer.
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void FocusedViewEnterKeyEventCallback2(IntPtr view);
- private View internalFocusIndicator = null;
- private View nullFocusIndicator = null;
+ private View internalFocusIndicator;
+ private View nullFocusIndicator;
/// <summary>
/// PreFocusChange will be triggered before the focus is going to be changed.<br />
/// <since_tizen> 3 </since_tizen>
public class InputMethod
{
- private PanelLayoutType? panelLayout = null;
- private ActionButtonTitleType? actionButton = null;
- private AutoCapitalType? autoCapital = null;
- private int? variation = null;
+ private PanelLayoutType? panelLayout;
+ private ActionButtonTitleType? actionButton;
+ private AutoCapitalType? autoCapital;
+ private int? variation;
/// <summary>
/// The default constructor of InputMethod.
/// </summary>
public class KeyValue : IDisposable
{
- private bool disposed = false;
+ private bool disposed;
/// <summary>
/// Int key.
/// </summary>
[SuppressMessage("Microsoft.Design", "CA1051:Do not declare visible instance fields")]
public PropertyValue TrueValue = null;
- private string key = null;
- private object originalValue = null;
- private object originalKey = null;
+ private string key;
+ private object originalValue;
+ private object originalKey;
/// <summary>
/// The default Constructor of KeyValue class.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty FlexGrowProperty = null;
- private static Dictionary<View, AlignmentType> flexAlignmentSelfMap = null;
- private static Dictionary<View, float> flexAspectRatioMap = null;
- private static Dictionary<View, float> flexBasisMap = null;
- private static Dictionary<View, float> flexShrinkMap = null;
- private static Dictionary<View, float> flexGrowMap = null;
+ private static Dictionary<View, AlignmentType> flexAlignmentSelfMap;
+ private static Dictionary<View, float> flexAspectRatioMap;
+ private static Dictionary<View, float> flexBasisMap;
+ private static Dictionary<View, float> flexShrinkMap;
+ private static Dictionary<View, float> flexGrowMap;
- private Dictionary<View, HandleRef> childHandleRefMap = null;
+ private Dictionary<View, HandleRef> childHandleRefMap;
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
private bool swigCMemOwn;
private bool disposed;
- private bool isDisposeQueued = false;
+ private bool isDisposeQueued;
private MeasureSpecification parentMeasureSpecificationWidth;
private MeasureSpecification parentMeasureSpecificationHeight;
[EditorBrowsable(EditorBrowsableState.Never)]
public const int AutoRow = int.MinValue;
- private static Dictionary<View, int> columnMap = null;
- private static Dictionary<View, int> columnSpanMap = null;
- private static Dictionary<View, int> rowMap = null;
- private static Dictionary<View, int> rowSpanMap = null;
- private static Dictionary<View, StretchFlags> horizontalStretchMap = null;
- private static Dictionary<View, StretchFlags> verticalStretchMap = null;
- private static Dictionary<View, Alignment> horizontalAlignmentMap = null;
- private static Dictionary<View, Alignment> verticalAlignmentMap = null;
+ private static Dictionary<View, int> columnMap;
+ private static Dictionary<View, int> columnSpanMap;
+ private static Dictionary<View, int> rowMap;
+ private static Dictionary<View, int> rowSpanMap;
+ private static Dictionary<View, StretchFlags> horizontalStretchMap;
+ private static Dictionary<View, StretchFlags> verticalStretchMap;
+ private static Dictionary<View, Alignment> horizontalAlignmentMap;
+ private static Dictionary<View, Alignment> verticalAlignmentMap;
private Orientation gridOrientation = Orientation.Horizontal;
private int columns = 1;
private int rows = 1;
- private float columnSpacing = 0;
- private float rowSpacing = 0;
+ private float columnSpacing;
+ private float rowSpacing;
/// <summary>
/// Enumeration for the direction in which the content is laid out
/// </summary>
public class LayoutItem : IDisposable
{
- private bool disposed = false;
+ private bool disposed;
private MeasureSpecification oldWidthMeasureSpec; // Store measure specification to compare against later
private MeasureSpecification oldHeightMeasureSpec; // Store measure specification to compare against later
private Extents padding;
private Extents margin;
- private bool parentReplacement = false;
+ private bool parentReplacement;
private bool setPositionByLayout = true;
/// <summary>
/// <since_tizen> 6 </since_tizen>
public class TransitionComponents : IDisposable
{
- private bool disposed = false;
+ private bool disposed;
/// <summary>
/// TransitionComponents default constructor.
/// </summary>
/// <since_tizen> 9 </since_tizen>
public VerticalAlignment VerticalAlignment { get; set; } = VerticalAlignment.Top;
- private float totalLength = 0.0f;
+ private float totalLength;
private Size2D cellPadding = new Size2D(0, 0);
private Orientation linearOrientation = Orientation.Horizontal;
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty FillVerticalProperty = null;
- private static Dictionary<View, View> leftTargetMap = null;
- private static Dictionary<View, View> rightTargetMap = null;
- private static Dictionary<View, View> topTargetMap = null;
- private static Dictionary<View, View> bottomTargetMap = null;
- private static Dictionary<View, float> leftRelativeOffsetMap = null;
- private static Dictionary<View, float> rightRelativeOffsetMap = null;
- private static Dictionary<View, float> topRelativeOffsetMap = null;
- private static Dictionary<View, float> bottomRelativeOffsetMap = null;
- private static Dictionary<View, Alignment> horizontalAlignmentMap = null;
- private static Dictionary<View, Alignment> verticalAlignmentMap = null;
- private static Dictionary<View, bool> fillHorizontalMap = null;
- private static Dictionary<View, bool> fillVerticalMap = null;
+ private static Dictionary<View, View> leftTargetMap;
+ private static Dictionary<View, View> rightTargetMap;
+ private static Dictionary<View, View> topTargetMap;
+ private static Dictionary<View, View> bottomTargetMap;
+ private static Dictionary<View, float> leftRelativeOffsetMap;
+ private static Dictionary<View, float> rightRelativeOffsetMap;
+ private static Dictionary<View, float> topRelativeOffsetMap;
+ private static Dictionary<View, float> bottomRelativeOffsetMap;
+ private static Dictionary<View, Alignment> horizontalAlignmentMap;
+ private static Dictionary<View, Alignment> verticalAlignmentMap;
+ private static Dictionary<View, bool> fillHorizontalMap;
+ private static Dictionary<View, bool> fillVerticalMap;
static RelativeLayout()
{
// Internal proxy object to be used on the update thread
internal ParticleEmitterProxy EmitterProxy => mProxy;
- private ParticleEmitterProxy mProxy = null;
+ private ParticleEmitterProxy mProxy;
}
/// <summary>
}
private static Interop.ParticleModifier.ParticleModifierUpdateInvokerType mOnUpdateInvoker = OnUpdateInvoker;
- private ParticleModifierInterface mInterface = null;
+ private ParticleModifierInterface mInterface;
private static IntPtr gRefObjectPtr;
}
}
// private fields
private static Interop.ParticleSource.ParticleSourceInitInvokerType mOnInitInvoker = OnInitInvoker;
private static Interop.ParticleSource.ParticleSourceUpdateInvokerType mOnUpdateInvoker = OnUpdateInvoker;
- private ParticleSourceInterface mInterface = null;
+ private ParticleSourceInterface mInterface;
private static IntPtr gRefObjectPtr;
}
}
public class Theme : BindableObject, IResourcesProvider
{
private readonly Dictionary<string, ViewStyle> map;
- private IEnumerable<KeyValuePair<string, string>> changedResources = null;
+ private IEnumerable<KeyValuePair<string, string>> changedResources;
private string baseTheme;
ResourceDictionary resources;
/// The version of the Theme.
/// </summary>
/// <since_tizen> 9 </since_tizen>
- public string Version { get; set; } = null;
+ public string Version { get; set; }
/// <summary>
/// The url of small broken image
internal int Count => map.Count;
- internal int PackageCount { get; set; } = 0;
+ internal int PackageCount { get; set; }
/// <summary>
/// Get an enumerator of the theme.
private static Theme themeForInitialize; // baseTheme + platformTheme + userTheme. It is used when the component is created.
private static readonly List<Theme> cachedPlatformThemes = new List<Theme>(); // Themes provided by framework.
private static readonly List<string> packages = new List<string>();// This is to store base theme creators by packages.
- private static bool platformThemeEnabled = false;
- private static bool isInEventProgress = false;
- private static bool updateThemeDirty = false;
+ private static bool platformThemeEnabled;
+ private static bool isInEventProgress;
+ private static bool updateThemeDirty;
static ThemeManager()
{
}
}
- internal static bool ApplicationThemeChangeSensitive { get; set; } = false;
+ internal static bool ApplicationThemeChangeSensitive { get; set; }
#if PROFILE_TV
internal const bool InitialThemeDisabled = true;
/// <since_tizen> 9 </since_tizen>
public class FadeTransition : TransitionBase
{
- private float opacity = 0.0f;
+ private float opacity;
/// <summary>
/// Create a FadeTransition for the View pair.
/// <since_tizen> 9 </since_tizen>
public class TransitionBase : Disposable
{
- private AlphaFunction alphaFunction = null;
- private TimePeriod timePeriod = null;
+ private AlphaFunction alphaFunction;
+ private TimePeriod timePeriod;
/// <summary>
/// Default constructor to create a TransitionBase
[EditorBrowsable(EditorBrowsableState.Never)]
public class TransitionGroup : TransitionBase
{
- private List<TransitionBase> transitionList = null;
+ private List<TransitionBase> transitionList;
/// <summary>
/// Create a FadeTransition for the View pair.
private const int mHistorySize = 20;
private uint mMaximumTime;
- private uint mLastEventTime = 0;
- private float mLastPosition = 0;
+ private uint mLastEventTime;
+ private float mLastPosition;
private uint mAssumePointerStoppedTime = 40; // 40ms
protected SortedDictionary<int, List<Movement>> mMovements;
/// <since_tizen> 3 </since_tizen>
public class Timer : BaseHandle
{
- private bool played = false;
+ private bool played;
private EventHandlerWithReturnType<object, TickEventArgs, bool> timerTickEventHandler;
private TickCallbackDelegate timerTickCallbackDelegate;
{
private struct Axis
{
- public static int X = 0;
- public static int Y = 1;
+ public const int X = 0;
+ public const int Y = 1;
}
private struct ComputedVelocity
}
}
- private int mPointerCount = 0;
- private bool mIsComputed = false;
+ private int mPointerCount;
+ private bool mIsComputed;
private ComputedVelocity mComputedVelocity;
private VelocityTrackerStrategy[] mConfiguredStrategies;
/// </summary>
internal class BackgroundExtraData : IDisposable
{
- private bool disposed = false;
+ private bool disposed;
internal BackgroundExtraData()
{
BorderlineColor = Tizen.NUI.Color.Black;
/// <summary>
/// Gets or sets the minimum width of the view.
/// </summary>
- public float MinimumWidth { get; set; } = 0;
+ public float MinimumWidth { get; set; }
/// <summary>
/// Gets or sets the minimum height of the view.
/// </summary>
- public float MinimumHeight { get; set; } = 0;
+ public float MinimumHeight { get; set; }
/// <summary>
/// Gets or sets the maximum width of the view.
[EditorBrowsable(EditorBrowsableState.Never)]
public class TextShadow : ICloneable, IDisposable
{
- private bool disposed = false;
- private readonly PropertyMap propertyMap = null;
+ private bool disposed;
+ private readonly PropertyMap propertyMap;
internal delegate void PropertyChangedCallback(TextShadow instance);
/// <since_tizen> 3 </since_tizen>
public class AnimatedImageVisual : VisualMap
{
- private List<string> urls = null;
- private int? batchSize = null;
- private int? cacheSize = null;
- private float? frameDelay = null;
- private float? loopCount = null;
+ private List<string> urls;
+ private int? batchSize;
+ private int? cacheSize;
+ private float? frameDelay;
+ private float? loopCount;
/// <summary>
/// Default constructor of AnimatedImageVisual class.
/// <since_tizen> 3 </since_tizen>
public class BorderVisual : VisualMap
{
- private Color color = null;
- private float? size = null;
- private bool? antiAliasing = null;
+ private Color color;
+ private float? size;
+ private bool? antiAliasing;
/// <summary>
/// Default constructor of BorderVisual class.
/// <since_tizen> 3 </since_tizen>
public class ColorVisual : VisualMap
{
- private Color mixColorForColorVisual = null;
+ private Color mixColorForColorVisual;
private bool? renderIfTransparent = false;
/// <summary>
/// <since_tizen> 3 </since_tizen>
public class GradientVisual : VisualMap
{
- private Vector2 _startPosition = null;
- private Vector2 _endPosition = null;
- private Vector2 _center = null;
- private float? _radius = null;
- private PropertyArray _stopOffset = null;
- private PropertyArray _stopColor = null;
- private GradientVisualUnitsType? _units = null;
- private GradientVisualSpreadMethodType? _spreadMethod = null;
+ private Vector2 _startPosition;
+ private Vector2 _endPosition;
+ private Vector2 _center;
+ private float? _radius;
+ private PropertyArray _stopOffset;
+ private PropertyArray _stopColor;
+ private GradientVisualUnitsType? _units;
+ private GradientVisualSpreadMethodType? _spreadMethod;
/// <summary>
/// Default constructor of GradientVisual.
/// <since_tizen> 3 </since_tizen>
public class ImageVisual : VisualMap
{
- private string url = null;
- private string alphaMaskUrl = null;
- private string auxiliaryImageUrl = null;
- private FittingModeType? fittingMode = null;
- private SamplingModeType? samplingMode = null;
- private int? desiredWidth = null;
- private int? desiredHeight = null;
+ private string url;
+ private string alphaMaskUrl;
+ private string auxiliaryImageUrl;
+ private FittingModeType? fittingMode;
+ private SamplingModeType? samplingMode;
+ private int? desiredWidth;
+ private int? desiredHeight;
private bool? synchronousLoading = false;
- private bool? borderOnly = null;
- private Vector4 pixelArea = null;
- private WrapModeType? wrapModeU = null;
- private WrapModeType? wrapModeV = null;
- private float? auxiliaryImageAlpha = null;
- private float? maskContentScale = null;
- private bool? cropToMask = null;
- private ReleasePolicyType? releasePolicy = null;
- private LoadPolicyType? loadPolicy = null;
+ private bool? borderOnly;
+ private Vector4 pixelArea;
+ private WrapModeType? wrapModeU;
+ private WrapModeType? wrapModeV;
+ private float? auxiliaryImageAlpha;
+ private float? maskContentScale;
+ private bool? cropToMask;
+ private ReleasePolicyType? releasePolicy;
+ private LoadPolicyType? loadPolicy;
private bool? orientationCorrection = true;
private bool? atlasing = false;
/// <since_tizen> 3 </since_tizen>
public class MeshVisual : VisualMap
{
- private string objectURL = null;
- private string materialURL = null;
- private string texturesPath = null;
- private MeshVisualShadingModeValue? shadingMode = null;
- private bool? useMipmapping = null;
- private bool? useSoftNormals = null;
- private Vector3 lightPosition = null;
+ private string objectURL;
+ private string materialURL;
+ private string texturesPath;
+ private MeshVisualShadingModeValue? shadingMode;
+ private bool? useMipmapping;
+ private bool? useSoftNormals;
+ private Vector3 lightPosition;
/// <summary>
/// Default constructor of MeshVisual class.
/// <since_tizen> 3 </since_tizen>
public class NPatchVisual : VisualMap
{
- private string url = null;
- private bool? borderOnly = null;
- private Rectangle border = null;
+ private string url;
+ private bool? borderOnly;
+ private Rectangle border;
/// <summary>
/// Default constructor of NPatchVisual class.
/// <since_tizen> 3 </since_tizen>
public class PrimitiveVisual : VisualMap
{
- private PrimitiveVisualShapeType? _shape = null;
- private Color _mixColorForPrimitiveVisual = null;
- private int? _slices = null;
- private int? _stacks = null;
- private float? _scaleTopRadius = null;
- private float? _scaleBottomRadius = null;
- private float? _scaleHeight = null;
- private float? _scaleRadius = null;
- private Vector3 _scaleDimensions = null;
- private float? _bevelPercentage = null;
- private float? _bevelSmoothness = null;
- private Vector3 _lightPosition = null;
+ private PrimitiveVisualShapeType? _shape;
+ private Color _mixColorForPrimitiveVisual;
+ private int? _slices;
+ private int? _stacks;
+ private float? _scaleTopRadius;
+ private float? _scaleBottomRadius;
+ private float? _scaleHeight;
+ private float? _scaleRadius;
+ private Vector3 _scaleDimensions;
+ private float? _bevelPercentage;
+ private float? _bevelSmoothness;
+ private Vector3 _lightPosition;
/// <summary>
/// Default constructor of PrimitiveVisual class.
/// <since_tizen> 3 </since_tizen>
public class SVGVisual : VisualMap
{
- private string url = null;
+ private string url;
/// <summary>
/// Default constructor of SVGVisual class.
public class TextVisual : VisualMap
{
static private float defaultPointSize = 18;
- private string text = null;
- private string fontFamily = null;
- private PropertyMap fontStyle = null;
+ private string text;
+ private string fontFamily;
+ private PropertyMap fontStyle;
private float pointSize = defaultPointSize;
- private bool? multiLine = null;
- private string horizontalAlignment = null;
- private string verticalAlignment = null;
- private Color textColor = null;
- private bool? enableMarkup = null;
- private PropertyMap shadow = null;
- private PropertyMap underline = null;
- private PropertyMap outline = null;
- private PropertyMap background = null;
+ private bool? multiLine;
+ private string horizontalAlignment;
+ private string verticalAlignment;
+ private Color textColor;
+ private bool? enableMarkup;
+ private PropertyMap shadow;
+ private PropertyMap underline;
+ private PropertyMap outline;
+ private PropertyMap background;
/// <summary>
/// Default constructor of TextVisual class.
/// <since_tizen> 3 </since_tizen>
public class VisualAnimator : VisualMap
{
- private string alphaFunction = null;
- private int startTime = 0;
- private int endTime = 0;
- private string target = null;
- private string propertyIndex = null;
- private object destinationValue = null;
+ private string alphaFunction;
+ private int startTime;
+ private int endTime;
+ private string target;
+ private string propertyIndex;
+ private object destinationValue;
/// <summary>
/// Create VisualAnimator object.
/// <since_tizen> 3 </since_tizen>
public class VisualMap : IDisposable
{
- private bool disposed = false;
+ private bool disposed;
/// <summary>
/// outputVisualMap.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1051:Do not declare visible instance fields", Justification = "<Pending>")]
protected VisualFittingModeType? _visualFittingMode = null;
- private Vector4 cornerRadius = null;
- private VisualTransformPolicyType? cornerRadiusPolicy = null;
- private float? borderlineWidth = null;
- private Color borderlineColor = null;
- private float? borderlineOffset = null;
+ private Vector4 cornerRadius;
+ private VisualTransformPolicyType? cornerRadiusPolicy;
+ private float? borderlineWidth;
+ private Color borderlineColor;
+ private float? borderlineOffset;
/// <summary>
/// The map for visual.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1051:Do not declare visible instance fields", Justification = "<Pending>")]
protected PropertyMap _commonlyUsedMap = null;
- private Vector2 visualSize = null;
- private Vector2 visualOffset = null;
- private Vector2 visualOffsetPolicy = null;
- private Vector2 visualSizePolicy = null;
- private Visual.AlignType? visualOrigin = null;
- private Visual.AlignType? visualAnchorPoint = null;
+ private Vector2 visualSize;
+ private Vector2 visualOffset;
+ private Vector2 visualOffsetPolicy;
+ private Vector2 visualSizePolicy;
+ private Visual.AlignType? visualOrigin;
+ private Visual.AlignType? visualAnchorPoint;
- private PropertyMap visualTransformMap = null;
+ private PropertyMap visualTransformMap;
- private int? depthIndex = null;
+ private int? depthIndex;
/// <summary>
/// Constructor.
/// Suppress UpdateVisual() to update properties to Parent.
/// If it is set to true, UpdateVisual() is ignored unless it is called with force.
/// </summary>
- internal bool SuppressUpdateVisual { get; set; } = false;
+ internal bool SuppressUpdateVisual { get; set; }
internal void UpdateVisual(bool force = false)
{
public class AdvancedTextVisual : Visuals.TextVisual
{
#region Internal
- private string textLabelSid = null;
+ private string textLabelSid;
private static Tizen.NUI.SystemLocaleLanguageChanged systemLocaleLanguageChanged = new Tizen.NUI.SystemLocaleLanguageChanged();
- private bool hasSystemLanguageChanged = false;
+ private bool hasSystemLanguageChanged;
#endregion
#region Constructor
internal static readonly int ActionJumpTo = Tizen.NUI.BaseComponents.AnimatedImageView.ActionJumpTo;
- private List<string> resourceUrls = null;
+ private List<string> resourceUrls;
#endregion
#region Constructor
{
#region Internal And Private
internal static readonly int ActionReload = Tizen.NUI.BaseComponents.ImageView.ActionReload;
- internal bool isResourceUrlValid = false;
+ internal bool isResourceUrlValid;
- private PropertyMap temperalStoredPropertyMap = null; // To store property map when resource url is not valid.
+ private PropertyMap temperalStoredPropertyMap; // To store property map when resource url is not valid.
#endregion
/// <summary>
public abstract class VisualBase : BaseHandle
{
#region Internal And Private
- internal PropertyMap cachedVisualPropertyMap = null;
- internal PropertyMap changedPropertyMap = null;
+ internal PropertyMap cachedVisualPropertyMap;
+ internal PropertyMap changedPropertyMap;
internal bool visualCreationRequiredFlag = true; // The first time should create visual.
- internal bool visualCreationManually = false;
+ internal bool visualCreationManually;
private int internalType = (int)Tizen.NUI.Visual.Type.Invalid;
- private bool visualPropertyUpdateProcessAttachedFlag = false;
+ private bool visualPropertyUpdateProcessAttachedFlag;
- private bool visualFittingModeApplied = false; // Whether we use fitting mode, or DontCare.
+ private bool visualFittingModeApplied; // Whether we use fitting mode, or DontCare.
internal class VisualTransformInfo : System.IDisposable
{
private EventHandler<WebViewUserMediaPermissionRequestEventArgs> userMediaPermissionRequestEventHandler;
private WebViewUserMediaPermissionRequestCallback userMediaPermissionRequestCallback;
- private WebContext webContext = null;
- private WebCookieManager webCookieManager = null;
+ private WebContext webContext;
+ private WebCookieManager webCookieManager;
/// <summary>
/// Default constructor to create a WebView.
}
private Dictionary<int, JavaScriptMessageHandler> _evaluateJavaScriptHandlerMap = new Dictionary<int, JavaScriptMessageHandler>();
- private int _evaluateJavaScriptCallbackId = 0;
+ private int _evaluateJavaScriptCallbackId;
/// <summary>
/// Evaluates JavaScript code represented as a string.
{
public partial class WebView
{
- private static readonly BindableProperty UrlProperty = null;
+ private static readonly BindableProperty UrlProperty;
internal static void SetInternalUrlProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalUrl();
}
- private static readonly BindableProperty UserAgentProperty = null;
+ private static readonly BindableProperty UserAgentProperty;
internal static void SetInternalUserAgentProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalUserAgent();
}
- private static readonly BindableProperty ScrollPositionProperty = null;
+ private static readonly BindableProperty ScrollPositionProperty;
internal static void SetInternalScrollPositionProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalScrollPosition();
}
- private static readonly BindableProperty ScrollSizeProperty = null;
+ private static readonly BindableProperty ScrollSizeProperty;
internal static object GetInternalScrollSizeProperty(BindableObject bindable)
{
return webview.GetInternalScrollSize();
}
- private static readonly BindableProperty ContentSizeProperty = null;
+ private static readonly BindableProperty ContentSizeProperty;
internal static object GetInternalContentSizeProperty(BindableObject bindable)
{
return webview.GetInternalContentSize();
}
- private static readonly BindableProperty TitleProperty = null;
+ private static readonly BindableProperty TitleProperty;
internal static object GetInternalTitleProperty(BindableObject bindable)
{
return webview.GetInternalTitle();
}
- private static readonly BindableProperty VideoHoleEnabledProperty = null;
+ private static readonly BindableProperty VideoHoleEnabledProperty;
internal static void SetInternalVideoHoleEnabledProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalVideoHoleEnabled();
}
- private static readonly BindableProperty MouseEventsEnabledProperty = null;
+ private static readonly BindableProperty MouseEventsEnabledProperty;
internal static void SetInternalMouseEventsEnabledProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalMouseEventsEnabled();
}
- private static readonly BindableProperty KeyEventsEnabledProperty = null;
+ private static readonly BindableProperty KeyEventsEnabledProperty;
internal static void SetInternalKeyEventsEnabledProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalKeyEventsEnabled();
}
- private static readonly BindableProperty ContentBackgroundColorProperty = null;
+ private static readonly BindableProperty ContentBackgroundColorProperty;
internal static void SetInternalContentBackgroundColorProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalContentBackgroundColor();
}
- private static readonly BindableProperty TilesClearedWhenHiddenProperty = null;
+ private static readonly BindableProperty TilesClearedWhenHiddenProperty;
internal static void SetInternalTilesClearedWhenHiddenProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalTilesClearedWhenHidden();
}
- private static readonly BindableProperty TileCoverAreaMultiplierProperty = null;
+ private static readonly BindableProperty TileCoverAreaMultiplierProperty;
internal static void SetInternalTileCoverAreaMultiplierProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalTileCoverAreaMultiplier();
}
- private static readonly BindableProperty CursorEnabledByClientProperty = null;
+ private static readonly BindableProperty CursorEnabledByClientProperty;
internal static void SetInternalCursorEnabledByClientProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalCursorEnabledByClient();
}
- private static readonly BindableProperty SelectedTextProperty = null;
+ private static readonly BindableProperty SelectedTextProperty;
internal static object GetInternalSelectedTextProperty(BindableObject bindable)
{
return webview.GetInternalSelectedText();
}
- private static readonly BindableProperty PageZoomFactorProperty = null;
+ private static readonly BindableProperty PageZoomFactorProperty;
internal static void SetInternalPageZoomFactorProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalPageZoomFactor();
}
- private static readonly BindableProperty TextZoomFactorProperty = null;
+ private static readonly BindableProperty TextZoomFactorProperty;
internal static void SetInternalTextZoomFactorProperty(BindableObject bindable, object oldValue, object newValue)
{
return webview.GetInternalTextZoomFactor();
}
- private static readonly BindableProperty LoadProgressPercentageProperty = null;
+ private static readonly BindableProperty LoadProgressPercentageProperty;
internal static object GetInternalLoadProgressPercentageProperty(BindableObject bindable)
{
#endregion //Constant Fields
#region Fields
- private IBorderInterface borderInterface = null;
- private Layer borderWindowRootLayer = null;
- private Layer borderWindowBottomLayer = null;
+ private IBorderInterface borderInterface;
+ private Layer borderWindowRootLayer;
+ private Layer borderWindowBottomLayer;
private WindowOrientation currentOrientation;
// for border area
- private View rootView = null;
- private BorderView borderView = null;
- private View topView = null;
- private View contentsView = null;
- private View bottomView = null;
- private float borderHeight = 0;
- private int screenWidth = 0;
- private int screenHeight = 0;
-
- private bool isBorderWindow = false;
- private bool hasTopView = false;
- private bool hasBottomView = false;
- private bool isEnabledOverlayMode = false;
- private bool isMaximized = false;
+ private View rootView;
+ private BorderView borderView;
+ private View topView;
+ private View contentsView;
+ private View bottomView;
+ private float borderHeight;
+ private int screenWidth;
+ private int screenHeight;
+
+ private bool isBorderWindow;
+ private bool hasTopView;
+ private bool hasBottomView;
+ private bool isEnabledOverlayMode;
+ private bool isMaximized;
// for config
- private Size2D minSize = null;
- private Size2D maxSize = null;
- private uint borderLineThickness = 0;
+ private Size2D minSize;
+ private Size2D maxSize;
+ private uint borderLineThickness;
private BorderResizePolicyType borderResizePolicy = BorderResizePolicyType.Free;
#endregion //Fields
#region Delegates
internal delegate void BorderCloseDelegate();
- private BorderCloseDelegate borderCloseDelegate = null;
+ private BorderCloseDelegate borderCloseDelegate;
#endregion //Delegates
// View class for border view.
private class BorderView : View
{
- private bool isEnabledOverlay = false;
+ private bool isEnabledOverlay;
private Extents prePadding = new Extents(0, 0, 0, 0);
internal BorderView() : base()
#region Fields
- private bool disposed = false;
+ private bool disposed;
private Color backgroundColor;
private View borderView;
private ImageView rightCornerIcon;
private Window.BorderDirection direction = Window.BorderDirection.None;
- private float preScale = 0;
+ private float preScale;
- private View windowView = null;
private Timer overlayTimer;
private uint borderLineThickness;
if (disposing)
{
borderView?.Dispose();
- windowView?.Dispose();
borderPanGestureDetector?.Dispose();
backgroundColor?.Dispose();
minimalizeIcon?.Dispose();
private static readonly object locker = new object();
- private static int key = 0;
+ private static int key;
private static FrameCallbackType internalHookFrameCallback = OnInternalHookFrameCallback;
HydrationContext Context { get; }
public object TargetObject { get; }
- public object TargetProperty { get; internal set; } = null;
+ public object TargetProperty { get; internal set; }
IEnumerable<object> IProvideParentValues.ParentObjects
{
[EditorBrowsable(EditorBrowsableState.Never)]
public BindableProperty Property { get; set; }
- private bool isOriginalValue = false;
+ private bool isOriginalValue;
private object value;
[EditorBrowsable(EditorBrowsableState.Never)]