/// <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); }
/// <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); }