public void CanRoundtripException()
        {
            // generate "authentic" exception with stack trace and everything :)
            string toSerialize;

            try
            {
                throw new ApplicationException("uh oh, something bad has happened!");
            }
            catch (Exception e)
            {
                toSerialize = e.ToString().Replace(Environment.NewLine, "|");
            }

            var dictionaryWithExceptionMessages = new Dictionary <string, object> {
                { "exception-message", toSerialize }
            };
            var str = serializer.Serialize(dictionaryWithExceptionMessages);

            Console.WriteLine(@"

here it is:

{0}

", str);

            var deserializedDictionary = serializer.Deserialize(str);

            deserializedDictionary.ShouldBe(dictionaryWithExceptionMessages);
        }
Beispiel #2
0
        /// <summary>
        /// Writes to the MSMQ message, assuming that the given object is a <see cref="TransportMessageToSend"/> -
        /// otherwise, an <see cref="ArgumentException"/> will be thrown
        /// </summary>
        public void Write(Message message, object obj)
        {
            var transportMessage = obj as TransportMessageToSend;

            if (transportMessage == null)
            {
                throw new ArgumentException(
                          string.Format("Object to serialize is not a TransportMessageToSend - it's a {0}",
                                        obj.GetType()));
            }
            message.BodyStream = new MemoryStream(transportMessage.Body);
            message.Extension  = HeaderEcoding.GetBytes(DictionarySerializer.Serialize(transportMessage.Headers));
            message.Label      = transportMessage.Label ?? "???";

            var expressDelivery = transportMessage.Headers.ContainsKey(Headers.Express);

            var hasTimeout = transportMessage.Headers.ContainsKey(Headers.TimeToBeReceived);

            // make undelivered messages go to the dead letter queue if they could disappear from the queue anyway
            message.UseDeadLetterQueue = !(expressDelivery || hasTimeout);
            message.Recoverable        = !expressDelivery;

            if (hasTimeout)
            {
                var timeToBeReceivedStr = (string)transportMessage.Headers[Headers.TimeToBeReceived];
                message.TimeToBeReceived = TimeSpan.Parse(timeToBeReceivedStr);
            }
        }
        /// <summary>
        /// Updates the settings store identified by the key <paramref name="key"/> using
        /// data from the specified parameter.
        /// </summary>
        /// <typeparam name="T">Type of the <paramref name="data"/> parameter.</typeparam>
        /// <param name="storeKey">The store key.</param>
        /// <param name="data">The data.</param>
        /// <remarks>
        /// The store's underlying xml file is saved when calling this method. This means
        /// the method will fail if the store is not associated with a file.
        /// </remarks>
        public void UpdateSettingsStore <T>(string storeKey, T data) where T : class
        {
            if (!Stores.ContainsKey(storeKey))
            {
                throw new ArgumentException(string.Format(
                                                "Settings store {0} doesn't exist", storeKey), "storeKey");
            }
            if (string.IsNullOrEmpty(Stores[storeKey].FileName))
            {
                throw new ApplicationException(string.Format(
                                                   "Can't update settings store {0}: it is not associated with a file. You should rather use SaveSettingsStore.", storeKey));
            }

            if (data == null)
            {
                return;
            }

            // First update our internal dictionary
            serializer.UpdateDictionary(Stores[storeKey].Settings, data);

            // Then save back the dictionary to the xml document and file.
            var store = Stores[storeKey];

            if (store.Document == null)
            {
                store.Document = new XmlDocument();
            }
            serializer.Serialize(store.Settings, store.Document);
            store.Document.Save(store.FileName);
        }
Beispiel #4
0
 public void DictionaryTest3()
 {
     var a = new TestStruct {
         a = 3, b = "testString"
     };
     var serializedData = DictionarySerializer.Serialize(a);
     var a_deserialized = DictionarySerializer.Deserialize <TestStruct>(serializedData);
 }
Beispiel #5
0
        public void DictionaryTest2()
        {
            var a = new DerivedA();

            a.SetValues();

            var serializedData = DictionarySerializer.Serialize(a);
            var a1             = DictionarySerializer.Deserialize <Interface>(serializedData);
        }
Beispiel #6
0
            public override void Serialize(ref NavigationMesh obj, ArchiveMode mode, SerializationStream stream)
            {
                // Serialize tile size because it is needed
                stream.Serialize(ref obj.TileSize);
                stream.Serialize(ref obj.CellSize);

                cacheSerializer.Serialize(ref obj.Cache, mode, stream);
                layersSerializer.Serialize(ref obj.LayersInternal, mode, stream);
            }
Beispiel #7
0
        public void DictionaryDictionaryTest()
        {
            var a = new DictionaryClass();

            a.SetValues();

            var serializedData = DictionarySerializer.Serialize(a);
            var a1             = DictionarySerializer.Deserialize <DictionaryClass>(serializedData);
        }
Beispiel #8
0
        /// <summary>
        /// Encoding bytes to huffman algorithm.
        /// </summary>
        /// <param name="bytes"> Source bytes </param>
        /// <returns> Encoded bytes </returns>
        public static byte[] Encode(byte[] bytes)
        {
            var dictionary = BytesCalculator.Calculate(bytes);

            var header = DictionarySerializer.Serialize(dictionary);
            var body   = Encode(bytes,
                                BitTable.BuildTable(TreeBuilder.BuildTree(new TreeBuilderQueue(dictionary))));

            return(Merage(header, body));
        }
Beispiel #9
0
        static void Main(string[] args)
        {
            List <string> level1 = new List <string> {
                "Hey",
                "I am",
                "Level One",
            };
            var lstSeri = level1.Serialize();
            var lvl1de  = lstSeri.DeSerialize <string>();

            lvl1de.DoSerializion();


            //Let's create a dummy dictionary with some entities
            Dictionary <string, string> myDictionary = new Dictionary <string, string>();

            myDictionary["HalloWelt"]  = "lola";
            myDictionary["HalloWelt1"] = "lola2";

            //Serialize the dictionary to a byte array
            var serialized = myDictionary.Serialize();
            //Deserialize that byte array to a dictionary<string,string>
            var deseri = serialized.DeSerialize <string, string>();

            Console.WriteLine(deseri["HalloWelt"]);

            //Same, but not as pretty as the previous example
            serialized = DictionarySerializer <string, string> .Serialize(myDictionary);

            deseri = DictionarySerializer <string, string> .Deserialize(serialized);

            var myDictionary1 = new Dictionary <string, Dictionary <string, string> >
            {
                ["HalloWelt"] = new Dictionary <string, string>
                {
                    ["a"] = "b",
                    ["c"] = "ba",
                    ["d"] = "bs",
                    ["e"] = "bfa",
                },
                ["HalloWelt1"] = new Dictionary <string, string>
                {
                    ["xa"] = "xb",
                    ["xc"] = "xba",
                    ["xd"] = "xbs",
                    ["xe"] = "xbfa",
                },
            };

            serialized = myDictionary1.Serialize();
            var deserialized = serialized.DeSerialize <string, Dictionary <string, Dictionary <string, int> > >();

            Console.ReadLine();
        }
Beispiel #10
0
        }                              // default is move only

        public override string ToString()
        {
            var op = new Dictionary <string, object>();

            if (Copy)
            {
                op["copy"] = Copy;
            }

            return(DictionarySerializer <object> .Serialize((IDictionary <string, object>) op, separator : '|', assignment : ':'));
        }
Beispiel #11
0
        public void ReadonlyListTest()
        {
            //var lIn = new ListClass();
            var lIn = new ListContainerClassReadonly();

            lIn.list.Add("Hello");
            lIn.list.Add("My name is");
            lIn.list.Add("Bob!");
            var serializedData = DictionarySerializer.Serialize(lIn);
            var lOut           = DictionarySerializer.Deserialize <ListContainerClassReadonly>(serializedData);
        }
Beispiel #12
0
        public override string ToString()
        {
            var op = new Dictionary <string, object>();

            if (Overwrite)
            {
                op["overwrite"] = Overwrite;
            }

            if (NewParentId.HasValue)
            {
                op["pid"] = NewParentId;
            }

            return(DictionarySerializer <object> .Serialize((IDictionary <string, object>) op, separator : '|', assignment : ':'));
        }
Beispiel #13
0
        public void ListTest()
        {
            //var lIn = new ListClass();
            var lIn = new ListContainerClass {
                list = new List <string>()
            };

            lIn.list.Add("Hello");
            lIn.list.Add("My name is");
            lIn.list.Add("Bob!");
            var serializedData = DictionarySerializer.Serialize(lIn);

            DictionarySerializer.DeserializeList <ListClass>(new object[] { serializedData });
            //var lOut = DictionarySerializer.Deserialize<ListClass>(serializedData);
            var lOut = DictionarySerializer.Deserialize <ListContainerClass>(serializedData);
        }
Beispiel #14
0
        public void Can_round_trip()
        {
            var before = new Dictionary <string, string>
            {
                { "key1", "value1" },
                { "key2", "value2" },
                { "keyWithNull", null },
                { "keyWithEmpty", "" }
            };
            var serialize = DictionarySerializer.Serialize(before);

            Approver.Verify(serialize);

            var after = DictionarySerializer.DeSerialize(serialize);

            AssertDictionariesAreTheSame(before, after);
        }
Beispiel #15
0
        public void InterfaceTest()
        {
            var interfaceList = new List <Interface>();

            interfaceList.Add(new DerivedA {
                a = "a1"
            });
            interfaceList.Add(new DerivedA {
                a = "a2"
            });
            interfaceList.Add(new DerivedB {
                b = "b1"
            });
            var serializedData   = DictionarySerializer.Serialize(interfaceList);
            var interfaceListOut = DictionarySerializer.Deserialize <List <Interface> >(serializedData);

            Assert.AreEqual(interfaceList.Count, interfaceListOut.Count);
        }
Beispiel #16
0
        public void DictionaryTest1()
        {
            var a = new TestClassA();

            a.SetValues();

            var serializedData_noMask = DictionarySerializer.Serialize(a);
            var a_NoMask = DictionarySerializer.Deserialize <TestClassA>(serializedData_noMask);

            var serializedData_Mask_1 = DictionarySerializer.Serialize(a, SerializationMaskType.Public);
            var a_Mask_1 = DictionarySerializer.Deserialize <TestClassA>(serializedData_Mask_1);

            var serializedData_Mask_2 = DictionarySerializer.Serialize(a, SerializationMaskType.Private);
            var a_Mask_2 = DictionarySerializer.Deserialize <TestClassA>(serializedData_Mask_2);

            var serializedData_Mask_1_2 = DictionarySerializer.Serialize(a, SerializationMaskType.Public | SerializationMaskType.Private);
            var a_Mask_1_2 = DictionarySerializer.Deserialize <TestClassA>(serializedData_Mask_1_2);
        }
        public static void DeleteConfiguration(string ConnectionName)
        {
#if !IPHONE
            try
            {
                DictionarySerializer <String, PLCConnectionConfiguration> ConnectionsDicSer = new DictionarySerializer <string, PLCConnectionConfiguration>();

                Dictionary <String, PLCConnectionConfiguration> Connections = null;
                if (File.Exists(ConfigurationPathAndFilename))
                {
                    StreamReader strm = new StreamReader(ConfigurationPathAndFilename);
                    Connections = ConnectionsDicSer.Deserialize(strm);
                    //string txt = strm.ReadToEnd();
                    strm.Close();
                    //Connections = General.SerializeToString<Dictionary<String, PLCConnectionConfiguration>>.DeSerialize(txt);
                }
                if (Connections == null)
                {
                    Connections = new Dictionary <string, PLCConnectionConfiguration>();
                }

                if (Connections.ContainsKey(ConnectionName))
                {
                    Connections.Remove(ConnectionName);
                }

                Directory.CreateDirectory(Path.GetDirectoryName(ConfigurationPathAndFilename));
                StreamWriter sstrm = new StreamWriter(ConfigurationPathAndFilename, false);
                ConnectionsDicSer.Serialize(Connections, sstrm);
                //sstrm.Write(stxt);
                //sstrm.Flush();
                sstrm.Close();

                return;

                Registry.CurrentUser.DeleteSubKeyTree(
                    "Software\\JFKSolutions\\WPFToolboxForSiemensPLCs\\Connections\\" + ConnectionName);
            }
            catch (Exception)
            { }
#endif
        }
        public void Write(Message message, object obj)
        {
            var transportMessage = obj as TransportMessageToSend;

            if (transportMessage == null)
            {
                throw new ArgumentException(
                          string.Format("Object to serialize is not a TransportMessage - it's a {0}",
                                        obj.GetType()));
            }
            message.BodyStream = new MemoryStream(transportMessage.Body);
            message.Extension  = HeaderEcoding.GetBytes(DictionarySerializer.Serialize(transportMessage.Headers));
            message.Label      = transportMessage.Label ?? "???";

            if (transportMessage.Headers.ContainsKey(Headers.TimeToBeReceived))
            {
                var timeToBeReceivedStr = transportMessage.Headers[Headers.TimeToBeReceived];
                message.TimeToBeReceived = TimeSpan.Parse(timeToBeReceivedStr);
            }
        }
Beispiel #19
0
        public static void StressTest()
        {
            var dict = new Dictionary <string, string>
            {
                { "Key1", "Value1" },
                { "Key2", "Value2" }
            };

            using var writer = new PooledArrayBufferWriter <byte>();
            // serialize dictionary to memory
            using (var output = StreamSource.AsStream(writer))
            {
                DictionarySerializer.Serialize(dict, output);
            }
            // deserialize from memory
            using (var input = StreamSource.AsStream(writer.WrittenArray))
            {
                Equal(dict, DictionarySerializer.Deserialize(input));
            }
        }
        public void SaveMapping()
        {
            backupMapping = mapping.Clone();

            try
            {
                if (mapping == null)
                {
                    return;
                }

                String mappingFilePath = GetMappingFilePath();

                DictionarySerializer.Serialize(mapping.Controls.Mappings, mappingFilePath);
            }
            catch (Exception e)
            {
                throw new Exception("There was an error while writing the input mapping for device \"" + DeviceName + "\": " + e.Message);
            }
        }
Beispiel #21
0
            public override void Serialize(ref NavigationMesh obj, ArchiveMode mode, SerializationStream stream)
            {
                // Serialize tile size because it is needed
                stream.Serialize(ref obj.BuildSettings.TileSize);
                stream.Serialize(ref obj.BuildSettings.CellSize);

                boundingBoxSerializer.Serialize(ref obj.BoundingBox, mode, stream);

                int numLayers = obj.Layers.Count;

                stream.Serialize(ref numLayers);
                if (mode == ArchiveMode.Deserialize)
                {
                    obj.LayersInternal.Clear();
                }

                for (int l = 0; l < numLayers; l++)
                {
                    NavigationMeshLayer layer;
                    if (mode == ArchiveMode.Deserialize)
                    {
                        // Create a new layer
                        layer = new NavigationMeshLayer();
                        obj.LayersInternal.Add(layer);
                    }
                    else
                    {
                        layer = obj.LayersInternal[l];
                    }

                    tilesSerializer.Serialize(ref layer.TilesInternal, mode, stream);
                }

                if (mode == ArchiveMode.Deserialize)
                {
                    obj.UpdateTileHash();
                }
            }
Beispiel #22
0
        public void Serialize()
        {
            Dictionary <string, string> table = new Dictionary <string, string>();

            table["Test"]  = "1";
            table["Test2"] = "2";
            var data = instance.Serialize(table).ToArray();

            Assert.AreEqual(2, data.Length);
            var result = instance.Deserialize(data);

            Assert.AreEqual(2, result.Count);
            Assert.AreEqual("1", result["Test"]);
            Assert.AreEqual("2", result["Test2"]);

            List <KeyValuePair <string, string> > list = new List <KeyValuePair <string, string> >();

            list.AddRange(data);
            list.AddRange(data);
            var stream = instance.DeserializeStream(list).ToArray();

            Assert.AreEqual(2, stream.Length);
        }
        public void SaveConfiguration()
        {
            if (ConfigurationType == LibNodaveConnectionConfigurationType.RegistrySavedConfiguration)
            {
#if !IPHONE

                DictionarySerializer<String, PLCConnectionConfiguration> ConnectionsDicSer = new DictionarySerializer<string, PLCConnectionConfiguration>();
                    
                Dictionary<String, PLCConnectionConfiguration> Connections = null;
                if (File.Exists(ConfigurationPathAndFilename))
                {
                    StreamReader strm = new StreamReader(ConfigurationPathAndFilename);
                    Connections = ConnectionsDicSer.Deserialize(strm);
                    //string txt = strm.ReadToEnd();
                    strm.Close();
                    //Connections = General.SerializeToString<Dictionary<String, PLCConnectionConfiguration>>.DeSerialize(txt);                    
                }
                if (Connections == null)
                    Connections = new Dictionary<string, PLCConnectionConfiguration>();

                if (Connections.ContainsKey(ConnectionName))
                    Connections.Remove(ConnectionName);

                Connections.Add(ConnectionName, this);

                Directory.CreateDirectory(Path.GetDirectoryName(ConfigurationPathAndFilename));
                StreamWriter sstrm = new StreamWriter(ConfigurationPathAndFilename, false);
                ConnectionsDicSer.Serialize(Connections, sstrm);
                //sstrm.Write(stxt);
                //sstrm.Flush();
                sstrm.Close();

                return;

                RegistryKey myConnectionKey =
                    Registry.CurrentUser.CreateSubKey(
                        "Software\\JFKSolutions\\WPFToolboxForSiemensPLCs\\Connections\\" + ConnectionName);
                if (myConnectionKey != null)
                {
                    myConnectionKey.SetValue("EntryPoint", this.EntryPoint);
                    myConnectionKey.SetValue("CpuRack", this.CpuRack);
                    myConnectionKey.SetValue("CpuSlot", this.CpuSlot);
                    myConnectionKey.SetValue("CpuMpi", this.CpuMpi);
                    myConnectionKey.SetValue("CpuIP", this.CpuIP);
                    myConnectionKey.SetValue("LokalMpi", this.LokalMpi);
                    myConnectionKey.SetValue("ComPort", this.ComPort);
                    myConnectionKey.SetValue("ConnectionType", this.ConnectionType);
                    myConnectionKey.SetValue("BusSpeed", this.BusSpeed);
                    myConnectionKey.SetValue("NetLinkReset", this.NetLinkReset);
                    myConnectionKey.SetValue("ComPortSpeed", this.ComPortSpeed);
                    myConnectionKey.SetValue("ComPortParity", this.ComPortParity);
                    myConnectionKey.SetValue("Routing", this.Routing);
                    myConnectionKey.SetValue("RoutingDestinationRack", this.RoutingDestinationRack);
                    myConnectionKey.SetValue("RoutingDestinationSlot", this.RoutingDestinationSlot);
                    myConnectionKey.SetValue("RoutingSubnet1", this.RoutingSubnet1);
                    myConnectionKey.SetValue("RoutingSubnet2", this.RoutingSubnet2);
                    myConnectionKey.SetValue("RoutingDestination", this.RoutingDestination);
                    myConnectionKey.SetValue("Port", this.Port);
                    myConnectionKey.SetValue("PLCConnectionType", this.PLCConnectionType);
                    myConnectionKey.SetValue("RoutingPLCConnectionType", this.RoutingPLCConnectionType);
                    myConnectionKey.SetValue("Timeout", this.Timeout);
                    myConnectionKey.SetValue("TimeoutIPConnect", this.TimeoutIPConnect);
                }
#endif
            }
        }
        public static void DeleteConfiguration(string ConnectionName)
        {
#if !IPHONE
            try
            {
                DictionarySerializer<String, PLCConnectionConfiguration> ConnectionsDicSer = new DictionarySerializer<string, PLCConnectionConfiguration>();

                Dictionary<String, PLCConnectionConfiguration> Connections = null;
                if (File.Exists(ConfigurationPathAndFilename))
                {
                    StreamReader strm = new StreamReader(ConfigurationPathAndFilename);
                    Connections = ConnectionsDicSer.Deserialize(strm);
                    //string txt = strm.ReadToEnd();
                    strm.Close();
                    //Connections = General.SerializeToString<Dictionary<String, PLCConnectionConfiguration>>.DeSerialize(txt);                    
                }
                if (Connections == null)
                    Connections = new Dictionary<string, PLCConnectionConfiguration>();

                if (Connections.ContainsKey(ConnectionName))
                    Connections.Remove(ConnectionName);

                Directory.CreateDirectory(Path.GetDirectoryName(ConfigurationPathAndFilename));
                StreamWriter sstrm = new StreamWriter(ConfigurationPathAndFilename, false);
                ConnectionsDicSer.Serialize(Connections, sstrm);
                //sstrm.Write(stxt);
                //sstrm.Flush();
                sstrm.Close();

                return;

                Registry.CurrentUser.DeleteSubKeyTree(
                    "Software\\JFKSolutions\\WPFToolboxForSiemensPLCs\\Connections\\" + ConnectionName);
            }
            catch (Exception)
            { }
#endif
        }
Beispiel #25
0
        /// <summary>
        /// Sends the specified <see cref="TransportMessageToSend"/> to the logical queue specified by <paramref name="destinationQueueName"/>.
        /// What actually happens, is that a row is inserted into the messages table, setting the 'recipient' column to the specified
        /// queue.
        /// </summary>
        public void Send(string destinationQueueName, TransportMessageToSend message, ITransactionContext context)
        {
            var connection = GetConnectionPossiblyFromContext(context);

            try
            {
                using (var command = connection.CreateCommand())
                {
                    command.CommandText = string.Format(@"insert into [{0}] 
                                                            ([recipient], [headers], [label], [body], [priority]) 
                                                            values (@recipient, @headers, @label, @body, @priority)",
                                                        messageTableName);

                    var label = message.Label ?? "(no label)";
                    log.Debug("Sending message with label {0} to {1}", label, destinationQueueName);

                    var priority = GetMessagePriority(message);

                    command.Parameters.Add("recipient", SqlDbType.NVarChar, 200).Value = destinationQueueName;
                    command.Parameters.Add("headers", SqlDbType.NVarChar, Max).Value   = DictionarySerializer.Serialize(message.Headers);
                    command.Parameters.Add("label", SqlDbType.NVarChar, Max).Value     = label;
                    command.Parameters.Add("body", SqlDbType.VarBinary, Max).Value     = message.Body;
                    command.Parameters.Add("priority", SqlDbType.TinyInt, 1).Value     = priority;

                    command.ExecuteNonQuery();
                }

                if (!context.IsTransactional)
                {
                    commitAction(connection);
                }
            }
            finally
            {
                if (!context.IsTransactional)
                {
                    releaseConnection(connection);
                }
            }
        }
        public void SaveConfiguration()
        {
            if (ConfigurationType == LibNodaveConnectionConfigurationType.RegistrySavedConfiguration)
            {
#if !IPHONE
                DictionarySerializer <String, PLCConnectionConfiguration> ConnectionsDicSer = new DictionarySerializer <string, PLCConnectionConfiguration>();

                Dictionary <String, PLCConnectionConfiguration> Connections = null;
                if (File.Exists(ConfigurationPathAndFilename))
                {
                    StreamReader strm = new StreamReader(ConfigurationPathAndFilename);
                    Connections = ConnectionsDicSer.Deserialize(strm);
                    //string txt = strm.ReadToEnd();
                    strm.Close();
                    //Connections = General.SerializeToString<Dictionary<String, PLCConnectionConfiguration>>.DeSerialize(txt);
                }
                if (Connections == null)
                {
                    Connections = new Dictionary <string, PLCConnectionConfiguration>();
                }

                if (Connections.ContainsKey(ConnectionName))
                {
                    Connections.Remove(ConnectionName);
                }

                Connections.Add(ConnectionName, this);

                Directory.CreateDirectory(Path.GetDirectoryName(ConfigurationPathAndFilename));
                StreamWriter sstrm = new StreamWriter(ConfigurationPathAndFilename, false);
                ConnectionsDicSer.Serialize(Connections, sstrm);
                //sstrm.Write(stxt);
                //sstrm.Flush();
                sstrm.Close();

                return;

                RegistryKey myConnectionKey =
                    Registry.CurrentUser.CreateSubKey(
                        "Software\\JFKSolutions\\WPFToolboxForSiemensPLCs\\Connections\\" + ConnectionName);
                if (myConnectionKey != null)
                {
                    myConnectionKey.SetValue("EntryPoint", this.EntryPoint);
                    myConnectionKey.SetValue("CpuRack", this.CpuRack);
                    myConnectionKey.SetValue("CpuSlot", this.CpuSlot);
                    myConnectionKey.SetValue("CpuMpi", this.CpuMpi);
                    myConnectionKey.SetValue("CpuIP", this.CpuIP);
                    myConnectionKey.SetValue("LokalMpi", this.LokalMpi);
                    myConnectionKey.SetValue("ComPort", this.ComPort);
                    myConnectionKey.SetValue("ConnectionType", this.ConnectionType);
                    myConnectionKey.SetValue("BusSpeed", this.BusSpeed);
                    myConnectionKey.SetValue("NetLinkReset", this.NetLinkReset);
                    myConnectionKey.SetValue("ComPortSpeed", this.ComPortSpeed);
                    myConnectionKey.SetValue("ComPortParity", this.ComPortParity);
                    myConnectionKey.SetValue("Routing", this.Routing);
                    myConnectionKey.SetValue("RoutingDestinationRack", this.RoutingDestinationRack);
                    myConnectionKey.SetValue("RoutingDestinationSlot", this.RoutingDestinationSlot);
                    myConnectionKey.SetValue("RoutingSubnet1", this.RoutingSubnet1);
                    myConnectionKey.SetValue("RoutingSubnet2", this.RoutingSubnet2);
                    myConnectionKey.SetValue("RoutingDestination", this.RoutingDestination);
                    myConnectionKey.SetValue("Port", this.Port);
                    myConnectionKey.SetValue("WritePort", this.WritePort);
                    myConnectionKey.SetValue("PLCConnectionType", this.PLCConnectionType);
                    myConnectionKey.SetValue("RoutingPLCConnectionType", this.RoutingPLCConnectionType);
                    myConnectionKey.SetValue("Timeout", this.Timeout);
                    myConnectionKey.SetValue("TimeoutIPConnect", this.TimeoutIPConnect);
                }
#endif
            }
        }
Beispiel #27
0
 public override void Serialize(ref NavigationMeshLayer obj, ArchiveMode mode, SerializationStream stream)
 {
     tilesSerializer.Serialize(ref obj.TilesInternal, mode, stream);
 }