コード例 #1
0
        /// <summary>
        /// Closes this file input stream and releases any system resources
        /// associated with the stream.
        /// </summary>
        /// <exception cref="IOException">  if an I/O error occurs. </exception>
        public virtual void close()
        {
            if (fd != null)
            {
                fd.close();
            }
            else
            {
                throw new System.IO.IOException("1-Wire FileDescriptor is null");
            }

            fd = null;
        }
コード例 #2
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if (disposing)
     {
         if (fd != null)
         {
             fd.close();
         }
     }
 }