Close() public method

public Close ( ) : void
return void
Beispiel #1
0
 public static void Close(RubyIO /*!*/ self)
 {
     if (self.Closed)
     {
         throw RubyExceptions.CreateIOError("closed stream");
     }
     self.Close();
 }
Beispiel #2
0
        internal static object TryInvokeOpenBlock(RubyContext /*!*/ context, BlockParam /*!*/ block, RubyIO /*!*/ io)
        {
            if (block == null)
            {
                return(io);
            }

            using (io) {
                object result;
                block.Yield(io, out result);
                io.Close();
                return(result);
            }
        }
Beispiel #3
0
 public static void Close(RubyIO/*!*/ self) {
     if (self.Closed) {
         throw RubyExceptions.CreateIOError("closed stream");
     }
     self.Close();
 }
Beispiel #4
0
        internal static object TryInvokeOpenBlock(RubyContext/*!*/ context, BlockParam/*!*/ block, RubyIO/*!*/ io) {
            if (block == null)
                return io;

            using (io) {
                object result;
                block.Yield(io, out result);
                io.Close();
                return result;
            }
        }
Beispiel #5
0
        // TODO: should call File#initialize

        private static object OpenWithBlock(BlockParam/*!*/ block, RubyIO file) {
            try {
                object result;
                block.Yield(file, out result);
                return result;
            } finally {
                file.Close();
            }
        }