Exemplo n.º 1
0
            public IYodiiEngineResult Clear()
            {
                if (_layers.Count == 0)
                {
                    return(_parent.Engine.SuccessResult);
                }
                IYodiiEngineResult result = _parent.OnConfigurationClearing();

                if (result.Success)
                {
                    _layers.Clear();
                    _parent.OnConfigurationChanged();
                }
                return(result);
            }
Exemplo n.º 2
0
        /// <summary>
        /// Stops and clears everything in this lab, including configuration manager entries.
        /// </summary>
        internal void ClearState()
        {
            if (_engine.IsRunning)
            {
                _engine.Stop();
            }

            _labPluginInfos.Clear();
            _labServiceInfos.Clear();
            _pluginInfos.Clear();
            _serviceInfos.Clear();

            // Clear configuration manager
            foreach (var l in Engine.Configuration.Layers.ToList())
            {
                var result = Engine.Configuration.Layers.Remove(l);
                Debug.Assert(result.Success);
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Called by YodiiEngine.Stop().
 /// </summary>
 internal void Clear()
 {
     _plugins.Clear();
     _services.Clear();
 }