annotate Implab/Components/ServiceLocator.cs @ 190:1c2a16d071a7 v2

Слияние с ref20160224
author cin
date Fri, 22 Apr 2016 13:08:08 +0300
parents 240aa6994018
children bdfdba6b645b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
1 using System;
240aa6994018 component model refactoring
cin
parents:
diff changeset
2 using System.Collections.Generic;
240aa6994018 component model refactoring
cin
parents:
diff changeset
3
240aa6994018 component model refactoring
cin
parents:
diff changeset
4 namespace Implab.Components {
240aa6994018 component model refactoring
cin
parents:
diff changeset
5 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
6 /// Коллекция сервисов, позволяет регистрировать и получать сервисы.
240aa6994018 component model refactoring
cin
parents:
diff changeset
7 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
8 public class ServiceLocator: Disposable, IServiceLocator, IServiceProvider {
240aa6994018 component model refactoring
cin
parents:
diff changeset
9 // запись о сервисе
240aa6994018 component model refactoring
cin
parents:
diff changeset
10 struct ServiceEntry : IDisposable {
240aa6994018 component model refactoring
cin
parents:
diff changeset
11 public object service; // сервис
240aa6994018 component model refactoring
cin
parents:
diff changeset
12 public bool shared; // признак того, что сервис НЕ нужно освобождать
240aa6994018 component model refactoring
cin
parents:
diff changeset
13 public Func<object> activator; // активатор сервиса при первом обращении
240aa6994018 component model refactoring
cin
parents:
diff changeset
14 public Action<object> cleanup; // функция для очистки сервиса
240aa6994018 component model refactoring
cin
parents:
diff changeset
15 public List<Type> associated; // ссылки на текущую запись
240aa6994018 component model refactoring
cin
parents:
diff changeset
16 public Type origin; // ссылка на оригинальную запись о сервисе
240aa6994018 component model refactoring
cin
parents:
diff changeset
17
240aa6994018 component model refactoring
cin
parents:
diff changeset
18 #region IDisposable implementation
240aa6994018 component model refactoring
cin
parents:
diff changeset
19
240aa6994018 component model refactoring
cin
parents:
diff changeset
20 public void Dispose() {
240aa6994018 component model refactoring
cin
parents:
diff changeset
21 if (shared)
240aa6994018 component model refactoring
cin
parents:
diff changeset
22 return;
240aa6994018 component model refactoring
cin
parents:
diff changeset
23 if (cleanup != null) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
24 if (service != null)
240aa6994018 component model refactoring
cin
parents:
diff changeset
25 cleanup(service);
240aa6994018 component model refactoring
cin
parents:
diff changeset
26 } else
240aa6994018 component model refactoring
cin
parents:
diff changeset
27 Safe.Dispose(service);
240aa6994018 component model refactoring
cin
parents:
diff changeset
28 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
29
240aa6994018 component model refactoring
cin
parents:
diff changeset
30 #endregion
240aa6994018 component model refactoring
cin
parents:
diff changeset
31 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
32
240aa6994018 component model refactoring
cin
parents:
diff changeset
33 // словарь существующих сервисов
240aa6994018 component model refactoring
cin
parents:
diff changeset
34 readonly Dictionary<Type, ServiceEntry> m_services = new Dictionary<Type,ServiceEntry>();
240aa6994018 component model refactoring
cin
parents:
diff changeset
35
240aa6994018 component model refactoring
cin
parents:
diff changeset
36 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
37 /// Получает объект предоставляющий сервис <typeparamref name="T"/>.
240aa6994018 component model refactoring
cin
parents:
diff changeset
38 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
39 /// <typeparam name="T">Тип запрашиваемого сервиса</typeparam>
240aa6994018 component model refactoring
cin
parents:
diff changeset
40 /// <returns>Объект, реализующий сервис</returns>
240aa6994018 component model refactoring
cin
parents:
diff changeset
41 /// <exception cref="KeyNotFoundException">Сервис не зарегистрирован</exception>
240aa6994018 component model refactoring
cin
parents:
diff changeset
42 public T GetService<T>() {
240aa6994018 component model refactoring
cin
parents:
diff changeset
43 object result;
240aa6994018 component model refactoring
cin
parents:
diff changeset
44 if (TryGetService(typeof(T), out result))
240aa6994018 component model refactoring
cin
parents:
diff changeset
45 return (T)result;
240aa6994018 component model refactoring
cin
parents:
diff changeset
46 throw new ApplicationException (String.Format ("{0} doesn't provide {1} service", this, typeof(T)));
240aa6994018 component model refactoring
cin
parents:
diff changeset
47 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
48
240aa6994018 component model refactoring
cin
parents:
diff changeset
49
240aa6994018 component model refactoring
cin
parents:
diff changeset
50 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
51 /// Пытается получить указанный сервис, в случае, если компонента не предоставляет требуемый сервис
240aa6994018 component model refactoring
cin
parents:
diff changeset
52 /// не возникает исключений.
240aa6994018 component model refactoring
cin
parents:
diff changeset
53 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
54 /// <typeparam name="T">Тип требуемого сервиса.</typeparam>
240aa6994018 component model refactoring
cin
parents:
diff changeset
55 /// <param name="service">Объект реализующий сервис, или <c>default(T)</c> если такового нет.</param>
240aa6994018 component model refactoring
cin
parents:
diff changeset
56 /// <returns><c>true</c> - сервис найден, <c>false</c> - сервис не зарегистрирован.</returns>
240aa6994018 component model refactoring
cin
parents:
diff changeset
57 public bool TryGetService<T>(out T service) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
58 object result;
240aa6994018 component model refactoring
cin
parents:
diff changeset
59 if (TryGetService(typeof(T), out result)) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
60 service = (T)result;
240aa6994018 component model refactoring
cin
parents:
diff changeset
61 return true;
240aa6994018 component model refactoring
cin
parents:
diff changeset
62 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
63 service = default(T);
240aa6994018 component model refactoring
cin
parents:
diff changeset
64 return false;
240aa6994018 component model refactoring
cin
parents:
diff changeset
65 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
66
240aa6994018 component model refactoring
cin
parents:
diff changeset
67 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
68 /// Получает объект предоставляющий сервис <paramref name="serviceType"/>
240aa6994018 component model refactoring
cin
parents:
diff changeset
69 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
70 /// <param name="serviceType">Тип запрашиваемого сервиса</param>
240aa6994018 component model refactoring
cin
parents:
diff changeset
71 /// <returns>Объект, реализующий сервис</returns>
240aa6994018 component model refactoring
cin
parents:
diff changeset
72 /// <exception cref="KeyNotFoundException">Сервис не зарегистрирован</exception>
240aa6994018 component model refactoring
cin
parents:
diff changeset
73 public object GetService(Type serviceType) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
74 object result;
240aa6994018 component model refactoring
cin
parents:
diff changeset
75 if (TryGetService(serviceType, out result))
240aa6994018 component model refactoring
cin
parents:
diff changeset
76 return result;
240aa6994018 component model refactoring
cin
parents:
diff changeset
77 throw new ApplicationException (String.Format ("{0} doesn't provide {1} service", this, serviceType));
240aa6994018 component model refactoring
cin
parents:
diff changeset
78 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
79
240aa6994018 component model refactoring
cin
parents:
diff changeset
80 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
81 /// Пытается получить требуемый сервис или совместимый с ним.
240aa6994018 component model refactoring
cin
parents:
diff changeset
82 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
83 /// <returns><c>true</c>, если сервис был найден, <c>false</c> в противном случае..</returns>
240aa6994018 component model refactoring
cin
parents:
diff changeset
84 /// <param name="serviceType">Тип запрашиваемого сервиса.</param>
240aa6994018 component model refactoring
cin
parents:
diff changeset
85 /// <param name="service">Искомый сервис.</param>
240aa6994018 component model refactoring
cin
parents:
diff changeset
86 public virtual bool TryGetService(Type serviceType, out object service) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
87 Safe.ArgumentNotNull(serviceType, "serviceType");
240aa6994018 component model refactoring
cin
parents:
diff changeset
88 AssertNotDisposed();
240aa6994018 component model refactoring
cin
parents:
diff changeset
89
240aa6994018 component model refactoring
cin
parents:
diff changeset
90 ServiceEntry se;
240aa6994018 component model refactoring
cin
parents:
diff changeset
91 if (!m_services.TryGetValue(serviceType, out se)) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
92 // ищем ближайщий объект, реализующий нужный сервис
240aa6994018 component model refactoring
cin
parents:
diff changeset
93 Type pt = null;
240aa6994018 component model refactoring
cin
parents:
diff changeset
94 foreach (var t in m_services.Keys)
240aa6994018 component model refactoring
cin
parents:
diff changeset
95 if (serviceType.IsAssignableFrom(t) && (pt == null || t.IsAssignableFrom(pt)))
240aa6994018 component model refactoring
cin
parents:
diff changeset
96 pt = t;
240aa6994018 component model refactoring
cin
parents:
diff changeset
97
240aa6994018 component model refactoring
cin
parents:
diff changeset
98 if (pt == null) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
99 // нет нужного сервиса
240aa6994018 component model refactoring
cin
parents:
diff changeset
100 service = null;
240aa6994018 component model refactoring
cin
parents:
diff changeset
101 return false;
240aa6994018 component model refactoring
cin
parents:
diff changeset
102 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
103
240aa6994018 component model refactoring
cin
parents:
diff changeset
104 var pe = m_services[pt];
240aa6994018 component model refactoring
cin
parents:
diff changeset
105
240aa6994018 component model refactoring
cin
parents:
diff changeset
106 // найденная запись может ссылаться на оригинальную запись с сервисом
240aa6994018 component model refactoring
cin
parents:
diff changeset
107 if(pe.origin != null) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
108 pt = pe.origin;
240aa6994018 component model refactoring
cin
parents:
diff changeset
109 pe = m_services[pt];
240aa6994018 component model refactoring
cin
parents:
diff changeset
110 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
111
240aa6994018 component model refactoring
cin
parents:
diff changeset
112 // добавляем список с обратными ссылками
240aa6994018 component model refactoring
cin
parents:
diff changeset
113 if (pe.associated == null)
240aa6994018 component model refactoring
cin
parents:
diff changeset
114 pe.associated = new List<Type>();
240aa6994018 component model refactoring
cin
parents:
diff changeset
115
240aa6994018 component model refactoring
cin
parents:
diff changeset
116 pe.associated.Add(serviceType);
240aa6994018 component model refactoring
cin
parents:
diff changeset
117
240aa6994018 component model refactoring
cin
parents:
diff changeset
118 // обновляем родительскую запись
240aa6994018 component model refactoring
cin
parents:
diff changeset
119 m_services[pt] = pe;
240aa6994018 component model refactoring
cin
parents:
diff changeset
120
240aa6994018 component model refactoring
cin
parents:
diff changeset
121 // создаем запись со ссылкой
240aa6994018 component model refactoring
cin
parents:
diff changeset
122 se = new ServiceEntry {
240aa6994018 component model refactoring
cin
parents:
diff changeset
123 service = pe.service,
240aa6994018 component model refactoring
cin
parents:
diff changeset
124 origin = pt,
240aa6994018 component model refactoring
cin
parents:
diff changeset
125 shared = true // предотвращаем множественные попытки освобождения
240aa6994018 component model refactoring
cin
parents:
diff changeset
126 };
240aa6994018 component model refactoring
cin
parents:
diff changeset
127
240aa6994018 component model refactoring
cin
parents:
diff changeset
128 m_services[serviceType] = se;
240aa6994018 component model refactoring
cin
parents:
diff changeset
129 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
130
240aa6994018 component model refactoring
cin
parents:
diff changeset
131 // запись содержит в себе информацию о сервисе
240aa6994018 component model refactoring
cin
parents:
diff changeset
132 if (se.service != null) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
133 service = se.service;
240aa6994018 component model refactoring
cin
parents:
diff changeset
134 return true;
240aa6994018 component model refactoring
cin
parents:
diff changeset
135 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
136
240aa6994018 component model refactoring
cin
parents:
diff changeset
137 // текущая запись является ссылкой
240aa6994018 component model refactoring
cin
parents:
diff changeset
138 if (se.origin != null) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
139 se.service = GetService(se.origin);
240aa6994018 component model refactoring
cin
parents:
diff changeset
140 m_services[serviceType] = se;
240aa6994018 component model refactoring
cin
parents:
diff changeset
141 service = se.service;
240aa6994018 component model refactoring
cin
parents:
diff changeset
142 return true;
240aa6994018 component model refactoring
cin
parents:
diff changeset
143 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
144
240aa6994018 component model refactoring
cin
parents:
diff changeset
145 // текущая запись не является ссылкой и не имеет информации о сервисе
240aa6994018 component model refactoring
cin
parents:
diff changeset
146 // она должна сожержать информацию об активации
240aa6994018 component model refactoring
cin
parents:
diff changeset
147 if (se.activator != null) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
148 se.service = se.activator();
240aa6994018 component model refactoring
cin
parents:
diff changeset
149
240aa6994018 component model refactoring
cin
parents:
diff changeset
150 m_services[serviceType] = se;
240aa6994018 component model refactoring
cin
parents:
diff changeset
151
240aa6994018 component model refactoring
cin
parents:
diff changeset
152 service = se.service;
240aa6994018 component model refactoring
cin
parents:
diff changeset
153 return true;
240aa6994018 component model refactoring
cin
parents:
diff changeset
154 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
155
240aa6994018 component model refactoring
cin
parents:
diff changeset
156 service = null;
240aa6994018 component model refactoring
cin
parents:
diff changeset
157 return false;
240aa6994018 component model refactoring
cin
parents:
diff changeset
158 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
159
240aa6994018 component model refactoring
cin
parents:
diff changeset
160 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
161 /// Регистрирует фабрику для активации сервиса по первому требованию.
240aa6994018 component model refactoring
cin
parents:
diff changeset
162 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
163 /// <typeparam name="T">Тип регистрируемого сервиса.</typeparam>
240aa6994018 component model refactoring
cin
parents:
diff changeset
164 /// <param name="activator">Фабрика для создания/получения объекта, предоставляющего сервис.</param>
240aa6994018 component model refactoring
cin
parents:
diff changeset
165 /// <param name = "cleanup">Метод для освобождения экземпляра сервиса, будет вызыван при освобождении сервис-локатора.</param>
240aa6994018 component model refactoring
cin
parents:
diff changeset
166 /// <remarks>При освобождении сервис-локатора, сервисы полученные в результате активации также будут освобождены.</remarks>
240aa6994018 component model refactoring
cin
parents:
diff changeset
167 public void Register<T>(Func<T> activator, Action<T> cleanup) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
168 Safe.ArgumentNotNull(activator, "activator");
240aa6994018 component model refactoring
cin
parents:
diff changeset
169
240aa6994018 component model refactoring
cin
parents:
diff changeset
170 AssertNotDisposed();
240aa6994018 component model refactoring
cin
parents:
diff changeset
171
240aa6994018 component model refactoring
cin
parents:
diff changeset
172 Unregister(typeof(T));
240aa6994018 component model refactoring
cin
parents:
diff changeset
173
240aa6994018 component model refactoring
cin
parents:
diff changeset
174 var serviceEntry = new ServiceEntry();
240aa6994018 component model refactoring
cin
parents:
diff changeset
175 serviceEntry.activator = () => activator();
240aa6994018 component model refactoring
cin
parents:
diff changeset
176 if (cleanup != null)
240aa6994018 component model refactoring
cin
parents:
diff changeset
177 serviceEntry.cleanup = instance => cleanup((T)instance);
240aa6994018 component model refactoring
cin
parents:
diff changeset
178 m_services[typeof(T)] = serviceEntry;
240aa6994018 component model refactoring
cin
parents:
diff changeset
179 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
180
240aa6994018 component model refactoring
cin
parents:
diff changeset
181 public void Register<T>(Func<T> activator) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
182 Register(activator, null);
240aa6994018 component model refactoring
cin
parents:
diff changeset
183 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
184
240aa6994018 component model refactoring
cin
parents:
diff changeset
185 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
186 /// Регистрирует объект, предоставляющий сервис.
240aa6994018 component model refactoring
cin
parents:
diff changeset
187 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
188 /// <typeparam name="T">Тип регистрируемого сервиса.</typeparam>
240aa6994018 component model refactoring
cin
parents:
diff changeset
189 /// <param name="service">Объект, предоставляющий сервис.</param>
240aa6994018 component model refactoring
cin
parents:
diff changeset
190 /// <exception cref="InvalidOperationException">Указанный сервис уже зарегистрирован.</exception>
240aa6994018 component model refactoring
cin
parents:
diff changeset
191 /// <remarks>Сервис-локатором не управляет временем жизни объекта для зарегистрированного сервиса.</remarks>
240aa6994018 component model refactoring
cin
parents:
diff changeset
192 public void Register<T>(T service) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
193 Register(service, true);
240aa6994018 component model refactoring
cin
parents:
diff changeset
194 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
195
240aa6994018 component model refactoring
cin
parents:
diff changeset
196 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
197 /// Регистрирует объект, предоставляющий сервис. Повторная регистрация отменяет уже существующую.
240aa6994018 component model refactoring
cin
parents:
diff changeset
198 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
199 /// <typeparam name="T">Тип регистрируемого сервиса.</typeparam>
240aa6994018 component model refactoring
cin
parents:
diff changeset
200 /// <param name="service">Объект, предоставляющий сервис.</param>
240aa6994018 component model refactoring
cin
parents:
diff changeset
201 /// <param name="shared">Признак того, что объект является разделяемым и сервис-локатор не должен его освобождать.</param>
240aa6994018 component model refactoring
cin
parents:
diff changeset
202 public void Register<T>(T service, bool shared) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
203 Safe.ArgumentNotNull(service, "service");
240aa6994018 component model refactoring
cin
parents:
diff changeset
204
240aa6994018 component model refactoring
cin
parents:
diff changeset
205 AssertNotDisposed();
240aa6994018 component model refactoring
cin
parents:
diff changeset
206
240aa6994018 component model refactoring
cin
parents:
diff changeset
207 Unregister(typeof(T));
240aa6994018 component model refactoring
cin
parents:
diff changeset
208
240aa6994018 component model refactoring
cin
parents:
diff changeset
209 m_services[typeof(T)] = new ServiceEntry { service = service, shared = shared };
240aa6994018 component model refactoring
cin
parents:
diff changeset
210 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
211
240aa6994018 component model refactoring
cin
parents:
diff changeset
212 public void Unregister(Type serviceType) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
213 Safe.ArgumentNotNull(serviceType, "serviceType");
240aa6994018 component model refactoring
cin
parents:
diff changeset
214
240aa6994018 component model refactoring
cin
parents:
diff changeset
215 AssertNotDisposed();
240aa6994018 component model refactoring
cin
parents:
diff changeset
216
240aa6994018 component model refactoring
cin
parents:
diff changeset
217 ServiceEntry se;
240aa6994018 component model refactoring
cin
parents:
diff changeset
218 if (m_services.TryGetValue(serviceType, out se)) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
219 if (se.origin != null) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
220 var pe = m_services[se.origin];
240aa6994018 component model refactoring
cin
parents:
diff changeset
221 pe.associated.Remove(serviceType);
240aa6994018 component model refactoring
cin
parents:
diff changeset
222 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
223 // освобождаем ресурсы
240aa6994018 component model refactoring
cin
parents:
diff changeset
224 se.Dispose();
240aa6994018 component model refactoring
cin
parents:
diff changeset
225 m_services.Remove(serviceType);
240aa6994018 component model refactoring
cin
parents:
diff changeset
226
240aa6994018 component model refactoring
cin
parents:
diff changeset
227 // убираем связанные записи
240aa6994018 component model refactoring
cin
parents:
diff changeset
228 if (se.associated != null)
240aa6994018 component model refactoring
cin
parents:
diff changeset
229 foreach (var item in se.associated)
240aa6994018 component model refactoring
cin
parents:
diff changeset
230 m_services.Remove(item);
240aa6994018 component model refactoring
cin
parents:
diff changeset
231 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
232 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
233
240aa6994018 component model refactoring
cin
parents:
diff changeset
234 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
235 /// Освобождает зарегистрированные сервисы (которые требуется освобоить).
240aa6994018 component model refactoring
cin
parents:
diff changeset
236 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
237 /// <param name="disposing">Призанак того, что нужно освободить ресурсы.</param>
240aa6994018 component model refactoring
cin
parents:
diff changeset
238 protected override void Dispose(bool disposing) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
239 if (disposing) {
240aa6994018 component model refactoring
cin
parents:
diff changeset
240
240aa6994018 component model refactoring
cin
parents:
diff changeset
241 foreach (var entry in m_services.Values)
240aa6994018 component model refactoring
cin
parents:
diff changeset
242 entry.Dispose();
240aa6994018 component model refactoring
cin
parents:
diff changeset
243
240aa6994018 component model refactoring
cin
parents:
diff changeset
244 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
245 base.Dispose(disposing);
240aa6994018 component model refactoring
cin
parents:
diff changeset
246 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
247 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
248 }