Changeset 3396
- Timestamp:
- 02/10/08 21:56:52
- Files:
-
- trunk/bindings/dotnet/tny/Makefile.am (modified) (1 diff)
- trunk/bindings/dotnet/tny/TnyException.cs (moved) (moved from trunk/bindings/dotnet/tny/Error.cs) (3 diffs)
- trunk/bindings/dotnet/tny/libtinymail.metadata (modified) (1 diff)
- trunk/tests/dotnet-demo/MainWindow.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/bindings/dotnet/tny/Makefile.am
r3394 r3396 9 9 glue_includes = 10 10 11 sources = Error.cs11 sources = TnyException.cs 12 12 13 13 customs = trunk/bindings/dotnet/tny/TnyException.cs
r3395 r3396 5 5 using System.Runtime.InteropServices; 6 6 7 public class Error{7 public class TnyException : System.Exception { 8 8 IntPtr handle; 9 9 … … 23 23 static extern int tny_error_get_code (IntPtr Handle); 24 24 25 public string Message {25 public override string Message { 26 26 get { 27 27 if (Handle != IntPtr.Zero) … … 40 40 } 41 41 42 public Error(IntPtr Handle) {42 public TnyException (IntPtr Handle) { 43 43 handle = Handle; 44 44 } 45 45 46 public static ErrorNew (IntPtr Handle) {47 return new Error(Handle);46 public static TnyException New (IntPtr Handle) { 47 return new TnyException (Handle); 48 48 } 49 49 } 50 51 50 52 } trunk/bindings/dotnet/tny/libtinymail.metadata
r3394 r3396 27 27 <attr path="/api/namespace/enum[@cname='TnyError']" name="name">ErrorEnum</attr> 28 28 29 <add-node path="/api"><symbol type="manual" cname="TError" name="Tny. Error"/></add-node>29 <add-node path="/api"><symbol type="manual" cname="TError" name="Tny.TnyException"/></add-node> 30 30 31 31 </metadata> trunk/tests/dotnet-demo/MainWindow.cs
r3394 r3396 55 55 } 56 56 57 private void GetHeadersCallback (Tny.Folder folder, bool cancel, Tny.List model, Tny. Error err)57 private void GetHeadersCallback (Tny.Folder folder, bool cancel, Tny.List model, Tny.TnyException ex) 58 58 { 59 Console.WriteLine (e rr.Message);59 Console.WriteLine (ex.Message); 60 60 61 61 if (model != null && !cancel) … … 68 68 } 69 69 70 private void GetMsgCallBack (Tny.Folder folder, bool cancel, Tny.Msg msg, Tny. Error err)70 private void GetMsgCallBack (Tny.Folder folder, bool cancel, Tny.Msg msg, Tny.TnyException ex) 71 71 { 72 Console.WriteLine (e rr.Message);72 Console.WriteLine (ex.Message); 73 73 74 74 if (msg != null && !cancel)
