コード例 #1
0
 protected override void clearUp()
 {
   subscribeToStructure(false);
   if (m_disposeStructureOnDispose && m_underlyingStructure != null)
     m_underlyingStructure.Dispose();
   m_underlyingStructure = null;
 }
コード例 #2
0
    public RegStatLineCMTStructure(CMTStructure structure_, bool disposeStructureOnDispose_)
      : base(structure_.Definition.Description)
    {
      m_underlyingStructure = structure_;
      m_disposeStructureOnDispose = disposeStructureOnDispose_;

      SetValue(StatLineField.Level, m_underlyingStructure.Value);
      SetValue(StatLineField.Change, m_underlyingStructure.Change);

      subscribeToStructure();
    }
コード例 #3
0
    public CMTStructure GetStructureImpl(Focus focus_, CMTStructureDefinition def_)
    {
      if (def_ == null) return null;

      var key = GetKey(focus_, def_);

      lock (_instance)
      {
        if (m_underlyingCache.ContainsKey(key))
          return m_underlyingCache[key];

        var o = new CMTStructure(focus_, def_);
        m_underlyingCache.Add(key, o);
        return o;
      }
    }