public WpfWorkspaceUnitWrapper(Dispatcher dispatch, WorkspaceUnit unit) { if (unit == null) throw new ArgumentNullException("unit"); if (dispatch == null) throw new ArgumentNullException("dispatch"); m_unit = unit; m_unit.PropertyChanged += UnitPropertyChanged; Dispatch = dispatch; }
/// <summary> /// Creates the workspace unit. /// </summary> /// <param name="unitName">Name of the unit.</param> /// <returns></returns> internal WorkspaceUnit CreateWorkspaceUnit(string unitName) { string dataPath = GetDataPath(unitName); string cachePath = GetCachePath(unitName); // Create the WorkspaceUnit that we'll use for deserialization var serializer = new CachingSerializer(m_streamManager, dataPath, cachePath, m_supportedTypes.Values.ToArray(), m_writeUnitsToDisc, false); var dataUnit = new WorkspaceUnit(unitName, serializer); return(dataUnit); }
// HERZUM SPRINT 3: TLAB-86 internal bool SearchValueMetricVariable(string nameMetricVariable, out string typeMetricVariable, out string valueMetricVariable) { foreach (object[] unit in m_workspaceStore) { TraceLab.Core.Workspaces.WorkspaceUnit row = unit[0] as TraceLab.Core.Workspaces.WorkspaceUnit; if (row.FriendlyUnitName.Equals(nameMetricVariable)) { typeMetricVariable = row.Type.ToString(); valueMetricVariable = row.Data.ToString(); return(true); } } typeMetricVariable = ""; valueMetricVariable = ""; return(false); }
private void AddDataUnit(WorkspaceUnit workspaceUnit) { m_dataUnits.Add(workspaceUnit.RealUnitName, workspaceUnit); m_unitsViewCollection.Add(workspaceUnit); }
/// <summary> /// Creates the workspace unit. /// </summary> /// <param name="unitName">Name of the unit.</param> /// <returns></returns> internal WorkspaceUnit CreateWorkspaceUnit(string unitName) { string dataPath = GetDataPath(unitName); string cachePath = GetCachePath(unitName); // Create the WorkspaceUnit that we'll use for deserialization var serializer = new CachingSerializer(m_streamManager, dataPath, cachePath, m_supportedTypes.Values.ToArray(), m_writeUnitsToDisc, false); var dataUnit = new WorkspaceUnit(unitName, serializer); return dataUnit; }
private void RemoveUnit(WorkspaceUnit unit) { Dispatch.Invoke(new Action(() => m_units.Remove(new WpfWorkspaceUnitWrapper(Dispatch, unit))), DispatcherPriority.Send); }
private void InsertUnit(WorkspaceUnit unit, int index) { Dispatch.Invoke(new Action(() => m_units.Insert(index, new WpfWorkspaceUnitWrapper(Dispatch, unit))), DispatcherPriority.Send); }
private void AddUnit(WorkspaceUnit unit) { Dispatch.Invoke(new Action<WorkspaceUnit>(DoAddUnit), DispatcherPriority.Send, unit); }
private void Dispose(bool disposing) { if (disposing) { m_unit = null; m_data = null; } }
private void AddUnit(WorkspaceUnit unit) { if (unit.RealUnitName.StartsWith(m_experimentId)) { m_workspaceStore.AppendValues(unit.FriendlyUnitName); } }
private void RemoveUnit(WorkspaceUnit unit) { if (unit.RealUnitName.StartsWith(m_experimentId)) { m_experimentWorkspaceUnits.Remove(unit); } }
private void InsertUnit(WorkspaceUnit unit, int index) { if (unit.RealUnitName.StartsWith(m_experimentId)) { m_experimentWorkspaceUnits.Insert(index, unit); } }