/// <summary> /// Write the specified message. /// </summary> /// <param name="message">The message.</param> public void Write(SyslogMessage message) { if (message == null) { throw new ArgumentNullException(nameof(message)); } try { Stream stream = _streamProvider.GetStream(); byte[] data = SerializeMessage(message); stream.Write(data, 0, data.Length); } catch { _streamProvider.CloseStream(); throw; } }
private void OnCoreCloseFileStream(Windows.Storage.Streams.IRandomAccessStream stream) { StreamProvider.CloseStream(stream.AsStream()); }
private void OnCoreCloseFileStream(Stream stream) { StreamProvider.CloseStream(stream); }