[Xaml] Provide method so that user can dispose all xaml objects
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / EXaml / GlobalDataList.cs
1 /*
2  * Copyright(c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 using System;
18 using System.Collections.Generic;
19 using System.Reflection;
20 using System.Text;
21 using Tizen.NUI.Binding;
22
23 namespace Tizen.NUI.EXaml
24 {
25     internal class GlobalDataList
26     {
27         internal object Root
28         {
29             get;
30             set;
31         }
32
33         internal List<Operation> PreLoadOperations
34         {
35             get;
36         } = new List<Operation>();
37
38         internal List<Operation> Operations
39         {
40             get;
41         } = new List<Operation>();
42
43         internal List<Operation> RemoveEventOperations
44         {
45             get;
46         } = new List<Operation>();
47
48         internal List<object> GatheredInstances
49         {
50             get;
51         } = new List<object>();
52
53         internal List<object> ObjectsFromProperty
54         {
55             get;
56         } = new List<object>();
57
58         internal List<EventInfo> GatheredEvents
59         {
60             get;
61         } = new List<EventInfo>();
62
63         internal List<MethodInfo> GatheredMethods
64         {
65             get;
66         } = new List<MethodInfo>();
67
68         internal List<Type> GatheredTypes
69         {
70             get;
71         } = new List<Type>();
72
73         internal List<PropertyInfo> GatheredProperties
74         {
75             get;
76         } = new List<PropertyInfo>();
77
78         internal List<BindableProperty> GatheredBindableProperties
79         {
80             get;
81         } = new List<BindableProperty>();
82
83         private List<AssemblyName> assemblyNameList;
84         internal List<AssemblyName> AssemblyNameList
85         {
86             get
87             {
88                 if (null == assemblyNameList)
89                 {
90                     assemblyNameList = new List<AssemblyName>();
91                     assemblyNameList.Add(EXamlExtensions.MainAssembly.GetName());
92
93                     var assemblyNames = EXamlExtensions.MainAssembly.GetReferencedAssemblies();
94
95                     foreach (var name in assemblyNames)
96                     {
97                         assemblyNameList.Add(name);
98                     }
99                 }
100
101                 return assemblyNameList;
102             }
103         }
104
105         internal List<Assembly> GatheredAssemblies = new List<Assembly>();
106     }
107 }