예제 #1
0
        /// <summary>
        /// Use Protobuf Serialization to serialize objects
        /// </summary>
        /// <returns></returns>
        public static ObjectTransportAssemblyLine UseProtobufSerialization(this ObjectTransportAssemblyLine objectTranposrtAssemblyLine)
        {
            var protobufSerialization = new ProtobufSerializer();

            objectTranposrtAssemblyLine.SetSerializer(protobufSerialization);

            return(objectTranposrtAssemblyLine);
        }
예제 #2
0
        /// <summary>
        /// Use Json serialization to serialize objects
        /// </summary>
        /// <returns></returns>
        public static ObjectTransportAssemblyLine UseJSONserialization(this ObjectTransportAssemblyLine objectTranposrtAssemblyLine)
        {
            var jsonSerialization = new JSONserializer();

            objectTranposrtAssemblyLine.SetSerializer(jsonSerialization);

            return(objectTranposrtAssemblyLine);
        }