Since C# initialize static values when that namespace / class access first time,
We need to access some static values at static Preload() timing.
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
/// <since_tizen> 6 </since_tizen>
public class Disposable : global::System.IDisposable
{
+ static internal void Preload()
+ {
+ // Do nothing. Just call for load static values.
+ }
+
/// <summary>
/// The flag to check if it is already disposed of.
/// </summary>
{
}
+ static internal void Preload()
+ {
+ // Do nothing. Just call for load static values.
+ var temporalSwigExceptionHelper = swigExceptionHelper;
+ var temporalSwigStringHelper = swigStringHelper;
+ ThrowExceptionIfExists();
+ }
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_BaseHandle")]
public static extern void DeleteBaseHandle(global::System.Runtime.InteropServices.HandleRef jarg1);
/// <since_tizen> 3 </since_tizen>
public class Animatable : BaseHandle
{
+ static internal new void Preload()
+ {
+ BaseHandle.Preload();
+ // Do nothing. Just call for load static values.
+ }
/// <summary>
/// Create an instance of animatable.
static public void Preload()
{
Interop.Application.PreInitialize();
+
+ // Initialize some static utility
+ var disposalbeQueue = DisposeQueue.Instance;
+ var registry = Registry.Instance;
+
+ // Initialize some BaseComponent static variables now
+ BaseComponents.View.Preload();
+ BaseComponents.ImageView.Preload();
+ BaseComponents.TextLabel.Preload();
+ BaseComponents.TextEditor.Preload();
+ BaseComponents.TextField.Preload();
+ Disposable.Preload();
+
+ // Initialize exception tasks. It must be called end of Preload()
+ NDalicPINVOKE.Preload();
+
IsPreload = true;
}
{
static ImageView() { }
+ static internal new void Preload()
+ {
+ // Do not call View.Preload(), since we already call it
+
+ Property.Preload();
+ // Do nothing. Just call for load static values.
+ var temporalCachedImagePropertyKeyList = cachedImagePropertyKeyList;
+ }
+
private EventHandler<ResourceReadyEventArgs> _resourceReadyEventHandler;
private ResourceReadyEventCallbackType _resourceReadyEventCallback;
private EventHandler<ResourceLoadedEventArgs> _resourceLoadedEventHandler;
internal static readonly int PixelArea = Interop.ImageView.PixelAreaGet();
internal static readonly int PlaceHolderUrl = Interop.ImageView.PlaceHolderImageGet();
internal static readonly int TransitionEffect = Interop.ImageView.TransitionEffectGet();
+
+ internal static void Preload()
+ {
+ // Do nothing. Just call for load static values.
+ }
}
private enum ImageType
static TextEditor() { }
+ static internal new void Preload()
+ {
+ // Do not call View.Preload(), since we already call it
+
+ Property.Preload();
+ // Do nothing. Just call for load static values.
+ }
+
/// <summary>
/// Creates the TextEditor control.
/// </summary>
internal static readonly int InputFilter = Interop.TextEditor.InputFilterGet();
internal static readonly int Strikethrough = Interop.TextEditor.StrikethroughGet();
internal static readonly int CharacterSpacing = Interop.TextEditor.CharacterSpacingGet();
+
+ internal static void Preload()
+ {
+ // Do nothing. Just call for load static values.
+ }
}
internal class InputStyle
static TextField() { }
+ static internal new void Preload()
+ {
+ // Do not call View.Preload(), since we already call it
+
+ Property.Preload();
+ // Do nothing. Just call for load static values.
+ }
+
/// <summary>
/// Creates the TextField control.
/// </summary>
internal static readonly int InputFilter = Interop.TextField.InputFilterGet();
internal static readonly int Strikethrough = Interop.TextField.StrikethroughGet();
internal static readonly int CharacterSpacing = Interop.TextField.CharacterSpacingGet();
+
+ internal static void Preload()
+ {
+ // Do nothing. Just call for load static values.
+ }
}
internal class InputStyle
static TextLabel() { }
+ static internal new void Preload()
+ {
+ // Do not call View.Preload(), since we already call it
+
+ Property.Preload();
+ // Do nothing. Just call for load static values.
+ }
+
private static SystemFontTypeChanged systemFontTypeChanged = new SystemFontTypeChanged();
private static SystemLocaleLanguageChanged systemLocaleLanguageChanged = new SystemLocaleLanguageChanged();
static private string defaultStyleName = "Tizen.NUI.BaseComponents.TextLabel";
internal static readonly int EllipsisPosition = Interop.TextLabel.EllipsisPositionGet();
internal static readonly int Strikethrough = Interop.TextLabel.StrikethroughGet();
internal static readonly int CharacterSpacing = Interop.TextLabel.CharacterSpacingGet();
+
+ internal static void Preload()
+ {
+ // Do nothing. Just call for load static values.
+ }
}
private void OnShadowColorChanged(float x, float y, float z, float w)
RegisterAccessibilityDelegate();
}
+ static internal new void Preload()
+ {
+ Container.Preload();
+
+ // Do nothing. Just call for load static values.
+ var temporalPositionPropertyGroup = positionPropertyGroup;
+ var temporalSizePropertyGroup = sizePropertyGroup;
+ var temporalScalePropertyGroup = scalePropertyGroup;
+ }
+
/// <summary>
/// Accessibility mode for controlling View's Accessible implementation.
/// It is only relevant when deriving custom controls from View directly,
/// <since_tizen> 3 </since_tizen>
public class BaseHandle : Element, global::System.IDisposable
{
+ static internal void Preload()
+ {
+ // Do nothing. Just call for load static values.
+ }
+
/// <summary>
/// swigCMemOwn
/// </summary>
ResourceDictionary _resources;
bool IResourcesProvider.IsResourcesCreated => _resources != null;
+ static internal new void Preload()
+ {
+ Animatable.Preload();
+
+ // Do nothing. Just call for load static values.
+ var temporalXamlStyleProperty = XamlStyleProperty;
+ }
+
internal Container(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
// No un-managed data hence no need to store a native ptr