wasCSharpSQLite – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /*
2 * FblockedCmd.java --
3 *
4 * Copyright (c) 1997 Sun Microsystems, Inc.
5 *
6 * See the file "license.terms" for information on usage and
7 * redistribution of this file, and for a DISCLAIMER OF ALL
8 * WARRANTIES.
9 *
10 * Included in SQLite3 port to C# for use in testharness only; 2008 Noah B Hart
11 *
12 * RCS @(#) $Id: FblockedCmd.java,v 1.5 2003/03/08 03:42:43 mdejong Exp $
13 *
14 */
15 using System;
16 namespace tcl.lang
17 {
18  
19 /// <summary> This class implements the built-in "fblocked" command in Tcl.</summary>
20  
21 class FblockedCmd : Command
22 {
23 /// <summary> This procedure is invoked to process the "fblocked" Tcl command.
24 /// See the user documentation for details on what it does.
25 ///
26 /// </summary>
27 /// <param name="interp">the current interpreter.
28 /// </param>
29 /// <param name="argv">command arguments.
30 /// </param>
31  
32 public TCL.CompletionCode cmdProc( Interp interp, TclObject[] argv )
33 {
34  
35 Channel chan; // The channel being operated on this method
36  
37 if ( argv.Length != 2 )
38 {
39 throw new TclNumArgsException( interp, 1, argv, "channelId" );
40 }
41  
42  
43 chan = TclIO.getChannel( interp, argv[1].ToString() );
44 if ( chan == null )
45 {
46  
47 throw new TclException( interp, "can not find channel named \"" + argv[1].ToString() + "\"" );
48 }
49  
50 interp.setResult( chan.isBlocked( interp ) );
51 return TCL.CompletionCode.RETURN;
52 }
53 }
54 }