Beispiel #1
0
 public WorkSpace(Guid id, IVarMgr varMgr, IElements elementsMgr, IPipes pipesMgr, IWorkSpaceOptionsMgr optionsMgr, IWorkSpaceSettingsMgr settingsMgr)
 {
     SettingsMgr = settingsMgr;
     OptionsMgr = optionsMgr;
     VarMgr = varMgr;
     ElementsMgr = elementsMgr;
     PipesMgr = pipesMgr;
     Id = id;
     _wsProperties = new WorkSpaceProperties(Id);
 }
Beispiel #2
0
 internal void _pipesMgr_Removed(IPipes sender, PipeCollectionEventArgs ea)
 {
     if (sender != null)
     {
         for (int i = 0; i < ea.Pipes.Length; i++)
         {
             ea.Pipes[i].StatusChanging -= new StatusChangeEventHandler<IPipe, PipeStatusChangeEventArgs>(pipe_StatusChanging);
             ea.Pipes[i].StatusChanged -= new StatusChangeEventHandler<IPipe, PipeStatusChangeEventArgs>(pipe_StatusChanged);
         }
         if (ea.Pipes.Length > 0)
         {
             PipeInstancesDeletedEventArgs arg = new PipeInstancesDeletedEventArgs(ea.Pipes);
             OnPipeInstancesDeleted(arg);
         }
     }
 }
Beispiel #3
0
 internal void _pipesMgr_Removing(IPipes sender, PipeCollectionEventArgs ea)
 {
     throw new NotImplementedException("The method or operation is not implemented.");
 }
Beispiel #4
0
 internal void _pipesMgr_Clearing(IPipes sender, ClearEventArgs ea)
 {
     throw new NotImplementedException("The method or operation is not implemented.");
 }
Beispiel #5
0
 public IWorkSpace Create(Guid id, IVarMgr varMgr, IElements elementsMgr, IPipes pipesMgr, IWorkSpaceOptionsMgr optionsMgr, IWorkSpaceSettingsMgr settingsMgr)
 {
     return new WorkSpace(id, varMgr, elementsMgr, pipesMgr, optionsMgr, settingsMgr);
 }
Beispiel #6
0
        internal void PersistPipes(IPipes pipes, System.Xml.XmlWriter writer)
        {
            writer.WriteStartElement("Pipes");

            IPipe pipe = null;
            foreach (KeyValuePair<Guid, IPipe> kvp in pipes)
            {
                pipe = kvp.Value;
                PersistPipe(pipe, writer);
            }

            writer.WriteEndElement();
        }
Beispiel #7
0
        internal void UnpersistPipes(IPipes pipes, System.Xml.XmlReader reader)
        {
            // Assumes reader has started the read of element "Pipes"

            if (reader.ReadToDescendant("Pipe"))
            {
                UnpersistPipe(pipes, reader);
                while (reader.ReadToNextSibling("Pipe"))
                {
                    UnpersistPipe(pipes, reader);
                }
            }
            if (reader.IsStartElement() && !reader.IsEmptyElement)
            {
                reader.Read();
            }
        }
Beispiel #8
0
 internal void UnpersistPipe(IPipes pipes, System.Xml.XmlReader reader)
 {
     PipeUnpersister.UnpersistPipe(reader);
     IPipeTicket ticket = PipeUnpersister.GetTicket();
     PipeTickets.Add(ticket.PipeId, ticket);
     IPipe pipe = PipeUnpersister.GetPipe();
     pipes.Add(pipe.Id, pipe);
     PipeUnpersister.Reset();
 }