Ejemplo n.º 1
0
 /// <summary>
 /// Stores this object to the specified XmlSerializationContext.
 /// </summary>
 /// <param name="xmlsc">The specified XmlSerializationContext.</param>
 public override void SerializeTo(XmlSerializationContext xmlsc)
 {
     base.SerializeTo(xmlsc);
     xmlsc.StoreObject("Name", m_name);
     xmlsc.StoreObject("Guid", m_guid);
     xmlsc.StoreObject("SpecificGravity", m_specificGravity);
     xmlsc.StoreObject("SpecificHeat", m_specificHeat);
     xmlsc.StoreObject("LHOV", m_latentHeatOfVaporization);
 }
Ejemplo n.º 2
0
 public virtual void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("EventType", m_eventType);
     xmlsc.StoreObject("VertexCount", m_vertices.Length);
     for (int i = 0; i < m_vertices.Length; i++)
     {
         xmlsc.StoreObject("Vertex_" + i, m_vertices[i]);
     }
     // Skipping m_vsKey & m_executive.
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Serializes this object to the specified XmlSerializatonContext.
 /// </summary>
 /// <param name="xmlsc">The XmlSerializatonContext into which this object is to be stored.</param>
 public void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("NumberOfEntries", m_nEntries);
     //xmlsc.StoreObject("XVals",m_xVals);
     //xmlsc.StoreObject("YVals",m_yVals);
     for (int i = 0; i < m_nEntries; i++)
     {
         xmlsc.StoreObject("XVals_" + i, m_xVals[i]);
         xmlsc.StoreObject("YVals_" + i, m_yVals[i]);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Serializes this object to the specified XmlSerializatonContext.
 /// </summary>
 /// <param name="xmlsc">The XmlSerializatonContext into which this object is to be stored.</param>
 public void SerializeTo(XmlSerializationContext xmlsc)
 {
     if (xmlsc != null)
     {
         xmlsc.StoreObject("MaterialCatalog", m_materialCatalog);
         xmlsc.StoreObject("ReactionProcessor", m_reactionProcessor);
     }
     else
     {
         throw new ApplicationException("SerializeTo(...) called with a null XmlSerializationContext.");
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Stores this object to the specified XmlSerializationContext.
        /// </summary>
        /// <param name="xmlsc">The specified XmlSerializationContext.</param>
        public override void SerializeTo(XmlSerializationContext xmlsc)
        {
            base.SerializeTo(xmlsc);
            xmlsc.StoreObject("Guid", m_guid);
            xmlsc.StoreObject("KeepingTimingData", m_keepingTimingData);

            /*xmlsc.StoreObject("MinDelay",m_minDelay);
             * xmlsc.StoreObject("MaxDelay",m_maxDelay);
             * xmlsc.StoreObject("AggDelay",m_aggDelay);
             * xmlsc.StoreObject("DelaysExplicitlySet",m_delaysExplicitlySet);
             * xmlsc.StoreObject("NumDelays",m_numDelays);
             * xmlsc.StoreObject("ExplicitlySet",m_delaysExplicitlySet);*/
        }
Ejemplo n.º 6
0
        private void storeXML(TestGraph1 tg1)
        {
            XmlSerializationContext xmlsc = new XmlSerializationContext();

            xmlsc.StoreObject("TG", tg1);
            xmlsc.Save(System.Environment.GetEnvironmentVariable("TEMP") + "\\TestGraphPersistence.xml");
        }
Ejemplo n.º 7
0
 public virtual void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("Name", m_name);
     xmlsc.StoreObject("PostEdges", PostEdges);
     xmlsc.StoreObject("PreEdges", PreEdges);
     xmlsc.StoreObject("PrincipalEdge", m_principalEdge);
     xmlsc.StoreObject("Role", m_role);
     xmlsc.StoreObject("RoleIsKnown", m_roleIsKnown);
     xmlsc.StoreObject("Synchronizer", m_synchronizer);
     xmlsc.StoreObject("TriggerDelegate", m_triggerDelegate);
     // What about Trigger Delegate?
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Stores this object to the specified XmlSerializationContext.
 /// </summary>
 /// <param name="xmlsc">The specified XmlSerializationContext.</param>
 public void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("Name", m_name);
     xmlsc.StoreObject("Guid", m_guid);
     xmlsc.StoreObject("Capacity", Capacity);
     xmlsc.StoreObject("Overbookability", m_permissibleOverbook);
     // We skip serialization of 'Available' - it'll be 100% on load.
     xmlsc.StoreObject("IsAtomic", IsAtomic);
     xmlsc.StoreObject("IsDiscrete", IsDiscrete);
     xmlsc.StoreObject("IsPersistent", IsPersistent);
     xmlsc.StoreObject("WrappedByWhom", m_wrappedByWhom);
     // We skip serialization of the manager - the manager will need to add it in on reconstitution.
 }
Ejemplo n.º 9
0
 public virtual void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("ExecEventType", m_eet);
     xmlsc.StoreObject("Guid", m_guid);
     xmlsc.StoreObject("KeepGCs", m_keepGraphContexts);
     xmlsc.StoreObject("MasterTask", m_masterTask);
     xmlsc.StoreObject("Name", m_name);
     xmlsc.StoreObject("StartCondSpec", m_startConditionsSpecified);
     xmlsc.StoreObject("When", m_when);
 }
Ejemplo n.º 10
0
        public virtual void SerializeTo(XmlSerializationContext xmlsc)
        {
            xmlsc.StoreObject("key", Key);
            xmlsc.StoreObject("InitType", m_initType);
            switch (m_initType)
            {
            case InitType.Bool: {
                xmlsc.StoreObject("Value", BoolValue);           break;
            }

            case InitType.Double: {
                xmlsc.StoreObject("Value", DoubleValue); break;
            }

            case InitType.String: {
                xmlsc.StoreObject("Value", StringValue); break;
            }

            default: {
                throw new ApplicationException("Serialization attempted on unknown type of InitType");
            }
            }
        }
Ejemplo n.º 11
0
 /// <summary>
 /// Stores this object to the specified XmlSerializationContext.
 /// </summary>
 /// <param name="xmlsc">The specified XmlSerializationContext.</param>
 public void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("Name", m_name);
     xmlsc.StoreObject("Guid", m_guid);
     xmlsc.StoreObject("Energy", m_energy);
     xmlsc.StoreObject("Products", m_products);
     xmlsc.StoreObject("Reactants", m_reactants);
     xmlsc.StoreObject("ReactionPercentage", m_rxPct);
 }
Ejemplo n.º 12
0
            /// <summary>
            /// A default constructor, to be used for creating an empty object prior to reconstitution from a serializer.
            /// </summary>
//			public TestGraph1(){}
            /// <summary>
            /// Serializes this object to the specified XmlSerializatonContext.
            /// </summary>
            /// <param name="xmlsc">The XmlSerializatonContext into which this object is to be stored.</param>
            public void SerializeTo(XmlSerializationContext xmlsc)
            {
                xmlsc.StoreObject("Parent", tp.MasterTask);
            }
Ejemplo n.º 13
0
 public override void SerializeTo(XmlSerializationContext xmlsc)
 {
     base.SerializeTo(xmlsc);
     xmlsc.StoreObject("Delay", m_delay);
     xmlsc.StoreObject("SVS", m_svs);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Stores this object to the specified XmlSerializationContext.
 /// </summary>
 /// <param name="xmlsc">The specified XmlSerializationContext.</param>
 public void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("MaterialTypesByName", m_materialTypesByName);
     xmlsc.StoreObject("MaterialTypesByGuid", m_materialTypesByGuid);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Stores this object to the specified XmlSerializationContext.
 /// </summary>
 /// <param name="xmlsc">The specified XmlSerializationContext.</param>
 public void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("Mass", m_mass);
     xmlsc.StoreObject("Temp", Temp);
     xmlsc.StoreObject("Type", m_type);
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Serializes this object to the specified XmlSerializatonContext.
 /// </summary>
 /// <param name="xmlsc">The XmlSerializatonContext into which this object is to be stored.</param>
 public void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("Name", m_name);
     xmlsc.StoreObject("Guid", m_guid);
     xmlsc.StoreObject("Resources", m_resources);
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Serializes this object to the specified XmlSerializatonContext.
 /// </summary>
 /// <param name="xmlsc">The XmlSerializatonContext into which this object is to be stored.</param>
 public void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("Reactions", m_reactions);
 }
Ejemplo n.º 18
0
 public virtual void SerializeTo(XmlSerializationContext xmlsc)
 {
     xmlsc.StoreObject("MasterTask", m_masterTask);
     xmlsc.StoreObject("ChildTasks", m_list);
     // Don't need to store the hashtable.
 }