Close() public method

public Close ( ) : void
return void
示例#1
0
文件: IoOps.cs 项目: ltwlf/IronSP
 public static void Close(RubyIO /*!*/ self)
 {
     if (self.Closed)
     {
         throw RubyExceptions.CreateIOError("closed stream");
     }
     self.Close();
 }
示例#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);
            }
        }
示例#3
0
 public static void Close(RubyIO/*!*/ self) {
     if (self.Closed) {
         throw RubyExceptions.CreateIOError("closed stream");
     }
     self.Close();
 }
示例#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;
            }
        }
示例#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();
            }
        }