Close() public method

public Close ( ) : void
return void
Exemplo n.º 1
0
 public static void Close(RubyIO /*!*/ self)
 {
     if (self.Closed)
     {
         throw RubyExceptions.CreateIOError("closed stream");
     }
     self.Close();
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 3
0
 public static void Close(RubyIO/*!*/ self) {
     if (self.Closed) {
         throw RubyExceptions.CreateIOError("closed stream");
     }
     self.Close();
 }
Exemplo n.º 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;
            }
        }
Exemplo n.º 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();
            }
        }