コード例 #1
0
 public void LogDoorLocked(int LockID)
 {
     W.Write("Log entry: ");
     W.WriteLine($"{DateTime.Now.ToShortTimeString()} {DateTime.Now.ToLongDateString()}");
     W.WriteLine($"Charging station locked using RFID: {LockID}");
     W.WriteLine("-------------------------------------------------------");
     W.Close();
 }
コード例 #2
0
 public void FileComplete()
 {
     _extendedStreamReader.Close();
     _extendedStreamReader.Dispose();
     _streamWriter.Close();
     _streamWriter.Dispose();
 }
コード例 #3
0
        public void FileComplete_ShouldCloseStreamWriter()
        {
            // Arrange
            var testee = CreateTestee(string.Empty);

            // Act
            testee.FileComplete();

            // Assert
            A.CallTo(() => _streamWriterMock.Close()).MustHaveHappened();
        }
コード例 #4
0
        void SendPacket(IStreamWriter stream)
        {
            var octets = stream.Close();

            SendPacket(octets);
        }
コード例 #5
0
 //------------------------------------------------------------------------------
 //
 // Method: Close
 //
 //------------------------------------------------------------------------------
 /// <summary>
 /// Closes the metric log file.
 /// </summary>
 public void Close()
 {
     streamWriter.Close();
 }