protected override void _ReadContent(XElement element, Sequence sequence)
 {
     ScriptSequence scriptSequence = (ScriptSequence)sequence;
     element = element.Element("Script");
     _ReadLanguage(element, scriptSequence);
     _ReadClassName(element, scriptSequence);
     _ReadSourceFiles(element, scriptSequence);
     _ReadFrameworkAssemblies(element, scriptSequence);
     _ReadExternalAssemblies(element, scriptSequence);
 }
 protected override XElement _WriteContent(Sequence sequence)
 {
     if(!(sequence is ScriptSequence)) throw new InvalidOperationException("Attempt to serialize a " + sequence.GetType().ToString() + " as a ScriptSequence.");
     ScriptSequence scriptSequence = (ScriptSequence)sequence;
     return new XElement("Script",
         _WriteLanguage(scriptSequence),
         _WriteClassName(scriptSequence),
         _WriteSourceFiles(scriptSequence),
         _WriteFrameworkAssemblies(scriptSequence),
         _WriteExternalAssemblies(scriptSequence));
 }
        public virtual bool Read(string filePath, Vixen.Sys.Sequence sequence)
        {
            // A sequence is a bit different because a specific instance type has
            // to be created from a module, so this method cannot create the instance.

            // A sequence's name is coupled to its file name.
            sequence.Name = Path.GetFileName(filePath);
            XElement element = Helper.LoadXml(filePath);

            Vixen.Sys.Sequence.ReadXml(element, sequence);
            return(true);
        }
Exemple #4
0
 protected Sequence(Sequence original)
 {
     FilePath = original.FilePath;
     InsertDataListener = new InsertDataListenerStack();
     InsertDataListener += _DataListener;
     Data = new DataStreams(original.Data);
     _sequenceFilterStreamId = original._sequenceFilterStreamId;
     TimingProvider = new TimingProviders(this, original.TimingProvider);
     RuntimeBehaviors = Modules.ModuleManagement.GetAllRuntimeBehavior();
     ModuleDataSet = (ModuleLocalDataSet)original.ModuleDataSet.Clone();
     Length = original.Length;
 }
Exemple #5
0
 protected override void _PopulateObject(Sequence obj, XElement element)
 {
     throw new NotImplementedException();
 }
 public void Write(string filePath, Vixen.Sys.Sequence sequence)
 {
     // A sequence's name is coupled to its file name.
     sequence.Name = Path.GetFileName(filePath);
     Vixen.Sys.Sequence.WriteXml(sequence).Save(filePath);
 }