private static long SaveTransmissionToFile(Transmission transmission, IPlatformFile file) { using (Stream stream = file.Open()) { transmission.Save(stream); return(stream.Length); } }
private static Transmission LoadFromTemporaryFile(IPlatformFile file, out long fileSize) { using (Stream stream = file.Open()) { try { fileSize = stream.Length; return(TransmissionExtensions.Load(stream)); } catch (FormatException exp) { fileSize = 0; TelemetryChannelEventSource.Log.IncorrectFileFormatWarning(exp.Message); return(null); } } }
private static long SaveTransmissionToFile(Transmission transmission, IPlatformFile file) { using (Stream stream = file.Open()) { transmission.Save(stream); return stream.Length; } }
private static Transmission LoadFromTemporaryFile(IPlatformFile file, out long fileSize) { using (Stream stream = file.Open()) { try { fileSize = stream.Length; return TransmissionExtensions.Load(stream); } catch (FormatException exp) { fileSize = 0; TelemetryChannelEventSource.Log.IncorrectFileFormatWarning(exp.Message); return null; } } }