コード例 #1
0
 /// <summary>
 /// Inicializa o repositório.
 /// </summary>
 public void Initialize()
 {
     if (!_initialized)
     {
         _initialized = true;
         _elements    = new List <Element>(_loader.GetElements());
     }
 }
コード例 #2
0
 /// <summary>
 /// Inicializa o repositório.
 /// </summary>
 public void Initialize()
 {
     if (!_initialized)
     {
         _initialized = true;
         lock (_objLock)
         {
             _elements    = new List <Element>();
             _elementsDic = new Dictionary <int, Element>();
             foreach (var i in _loader.GetElements())
             {
                 _elements.Add(i);
                 _elementsDic.Add(i.Uid, i);
             }
         }
     }
 }