Пример #1
0
        /// <summary>
        /// Serializes PXModel instance as PX-file to stream.
        /// </summary>
        /// <param name="px"></param>
        /// <param name="stream">Save to stream.</param>
        /// <param name="keysFormat">Whether to save in keys format.</param>
        public static void Save(this PXModel px, Stream stream, bool keysFormat)
        {
            PXFileSerializer serializer = new PXFileSerializer();

            serializer.SerializeInKeysFormat = keysFormat;
            serializer.Serialize(px, stream);
        }
Пример #2
0
        /// <summary>
        /// Serializes PXModel instance to PX-file.
        /// </summary>
        /// <param name="px"></param>
        /// <param name="path">Save to stream.</param>
        /// <param name="keysFormat">Whether to save in keys format.</param>
        public static void Save(this PXModel px, string path, bool keysFormat)
        {
            PXFileSerializer serializer = new PXFileSerializer();

            serializer.SerializeInKeysFormat = keysFormat;
            serializer.Serialize(px, path);
        }