/// <summary> /// Creates a new instance of this LabStateManager, as well as a new IYodiiEngine. /// </summary> internal LabStateManager() { YodiiEngine engine = new YodiiEngine(this); _engine = engine; Debug.Assert(_engine.LiveInfo != null); _engine.PropertyChanged += _engine_PropertyChanged; _engine.LiveInfo.Plugins.CollectionChanged += Plugins_CollectionChanged; _engine.LiveInfo.Services.CollectionChanged += Services_CollectionChanged; Debug.Assert(_engine.IsRunning == false); _serviceInfos = new CKObservableSortedArrayKeyList <ServiceInfo, string>(s => s.ServiceFullName, false); _pluginInfos = new CKObservableSortedArrayKeyList <PluginInfo, string>(p => p.PluginFullName, false); _labServiceInfos = new CKObservableSortedArrayKeyList <LabServiceInfo, ServiceInfo>(s => s.ServiceInfo, (x, y) => String.CompareOrdinal(x.ServiceFullName, y.ServiceFullName), false); _labPluginInfos = new CKObservableSortedArrayKeyList <LabPluginInfo, PluginInfo>(p => p.PluginInfo, (x, y) => String.CompareOrdinal(x.PluginFullName, y.PluginFullName), false); _runningPlugins = new ObservableCollection <IPluginInfo>(); _serviceInfos.CollectionChanged += _serviceInfos_CollectionChanged; _pluginInfos.CollectionChanged += _pluginInfos_CollectionChanged; UpdateEngineInfos(); }
internal LiveInfo(YodiiEngine engine) { Debug.Assert( engine != null ); _engine = engine; _plugins = new CKObservableSortedArrayKeyList<LivePluginInfo, string>( l => l.PluginInfo.PluginFullName ); _services = new CKObservableSortedArrayKeyList<LiveServiceInfo, string>( l => l.ServiceInfo.ServiceFullName ); }
internal ConfigurationItemCollection(ConfigurationLayer parent) { _items = new CKObservableSortedArrayKeyList <ConfigurationItem, string>(e => e.ServiceOrPluginFullName, (x, y) => StringComparer.Ordinal.Compare(x, y)); _layer = parent; _items.PropertyChanged += RetrievePropertyEvent; _items.CollectionChanged += RetrieveCollectionEvent; }
internal LiveInfo(YodiiEngine engine) { Debug.Assert(engine != null); _engine = engine; _plugins = new CKObservableSortedArrayKeyList <LivePluginInfo, string>(l => l.PluginInfo.PluginFullName); _services = new CKObservableSortedArrayKeyList <LiveServiceInfo, string>(l => l.ServiceInfo.ServiceFullName); }
internal ConfigurationLayerCollection(ConfigurationManager parent) { _parent = parent; _layers = new CKObservableSortedArrayKeyList <ConfigurationLayer, string>(e => e.LayerName, (x, y) => StringComparer.Ordinal.Compare(x, y), allowDuplicates: true); _layers.PropertyChanged += RetrievePropertyEvent; _layers.CollectionChanged += RetrieveCollectionEvent; }
internal VMZoneSimple( VMContextSimple ctx, IZone zone ) : base(ctx) { _zone = zone; _keys = new CKObservableSortedArrayKeyList<VMKeySimple, int>( k => k.Index ); foreach( IKey key in _zone.Keys ) { VMKeySimple k = Context.Obtain( key ); Keys.Add( k ); } }
public VMZoneEditable( VMContextEditable ctx, IZone zone ) : base(ctx) { _ctx = ctx; _zone = zone; _keys = new CKObservableSortedArrayKeyList<VMKeyEditable, int>( k => k.Index ); foreach( IKey key in _zone.Keys ) { VMKeyEditable k = Context.Obtain( key ); Keys.Add( k ); } }
internal VMZoneSimple( VMContextSimpleBase ctx, IZone zone, int index ) : base(ctx) { Debug.Assert( Dispatcher.CurrentDispatcher == Context.NoFocusManager.ExternalDispatcher, "This method should only be called by the ExternalThread." ); _zone = zone; _index = index; SafeUpdateLoopCount(); _keys = new CKObservableSortedArrayKeyList<VMKeySimple, int>( k => k.Index ); foreach( IKey key in _zone.Keys ) { VMKeySimple k = Context.Obtain( key ); Keys.Add( k ); } Context.Config.ConfigChanged += OnConfigChanged; }
internal ConfigurationLayerCollection( ConfigurationManager parent ) { _parent = parent; _layers = new CKObservableSortedArrayKeyList<ConfigurationLayer, string>( e => e.LayerName, ( x, y ) => StringComparer.Ordinal.Compare( x, y ), allowDuplicates: true ); _layers.PropertyChanged += RetrievePropertyEvent; _layers.CollectionChanged += RetrieveCollectionEvent; }
public VMZoneSimple( VMContextSimpleBase ctx ) : base(ctx) { Debug.Assert( Dispatcher.CurrentDispatcher == Context.NoFocusManager.ExternalDispatcher, "This method should only be called by the ExternalThread." ); _keys = new CKObservableSortedArrayKeyList<VMKeySimple, int>( k => k.Index ); }
/// <summary> /// Creates a new instance of this LabStateManager, as well as a new IYodiiEngine. /// </summary> internal LabStateManager() { YodiiEngine engine = new YodiiEngine( this ); _engine = engine; Debug.Assert( _engine.LiveInfo != null ); _engine.PropertyChanged += _engine_PropertyChanged; _engine.LiveInfo.Plugins.CollectionChanged += Plugins_CollectionChanged; _engine.LiveInfo.Services.CollectionChanged += Services_CollectionChanged; Debug.Assert( _engine.IsRunning == false ); _serviceInfos = new CKObservableSortedArrayKeyList<ServiceInfo, string>( s => s.ServiceFullName, false ); _pluginInfos = new CKObservableSortedArrayKeyList<PluginInfo, string>( p => p.PluginFullName, false ); _labServiceInfos = new CKObservableSortedArrayKeyList<LabServiceInfo, ServiceInfo>( s => s.ServiceInfo, ( x, y ) => String.CompareOrdinal( x.ServiceFullName, y.ServiceFullName ), false ); _labPluginInfos = new CKObservableSortedArrayKeyList<LabPluginInfo, PluginInfo>( p => p.PluginInfo, ( x, y ) => String.CompareOrdinal( x.PluginFullName, y.PluginFullName ), false ); _runningPlugins = new ObservableCollection<IPluginInfo>(); _serviceInfos.CollectionChanged += _serviceInfos_CollectionChanged; _pluginInfos.CollectionChanged += _pluginInfos_CollectionChanged; UpdateEngineInfos(); }