mantisconnect-cvs Mailing List for MantisConnect (Page 3)
Brought to you by:
vboctor
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(20) |
Oct
(16) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(7) |
Mar
(7) |
Apr
|
May
(19) |
Jun
(22) |
Jul
(1) |
Aug
(2) |
Sep
(63) |
Oct
(1) |
Nov
|
Dec
(4) |
2006 |
Jan
|
Feb
(11) |
Mar
(26) |
Apr
(22) |
May
(13) |
Jun
|
Jul
|
Aug
(34) |
Sep
(15) |
Oct
(28) |
Nov
(7) |
Dec
|
2007 |
Jan
(14) |
Feb
|
Mar
(23) |
Apr
(3) |
May
(3) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(4) |
2008 |
Jan
(11) |
Feb
(34) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(7) |
2011 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <pl...@us...> - 2008-01-31 15:29:26
|
Revision: 159 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=159&view=rev Author: planser Date: 2008-01-31 07:29:19 -0800 (Thu, 31 Jan 2008) Log Message: ----------- Some refactorings regarding handling of attachments. Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSubmitter.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AttachmentsPart.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitPanel.java Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSubmitter.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSubmitter.java 2008-01-22 11:22:04 UTC (rev 158) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/DefaultSubmitter.java 2008-01-31 15:29:19 UTC (rev 159) @@ -14,6 +14,7 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; +import java.util.Arrays; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; @@ -28,6 +29,15 @@ * @author Peter Lanser, pl...@us... */ public class DefaultSubmitter implements ISubmitter { + + // Compressed file types. Array must be sorted! + public final static String[] COMPRESSED_FILES = new String[] { + "bz2", "gif", "gz", "jpg", "png", "rar", "zip" + }; + + static { + Arrays.sort(COMPRESSED_FILES); + } private boolean compressAttachments; @@ -38,7 +48,7 @@ public DefaultSubmitter(boolean compressAttachments) { this.compressAttachments = compressAttachments; } - + public long submitAttachment(IMCSession session, long issueId, File file) throws MCException { try { byte[] data = Utilities.readFile(file); @@ -49,13 +59,22 @@ } else { filename = file.getName(); } - return session.addIssueAttachment(issueId, filename, Utilities.getMimeType(filename), - data); + return addAttachment(session, issueId, data, filename); } catch (IOException e) { throw new MCException(e); - } + } } + public long submitAttachment(IMCSession session, long issueId, IIssueAttachment attachment) throws MCException { + return submitAttachment(session, issueId, new File(attachment.getFilename())); + } + + protected long addAttachment(IMCSession session, long issueId, byte[] data, + String filename) throws MCException { + return session.addIssueAttachment(issueId, filename, Utilities + .getMimeType(filename), data); + } + protected byte[] compress(byte[] data, String filename) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ZipOutputStream zos = new ZipOutputStream(baos); @@ -80,7 +99,8 @@ String filename = file.getName(); int lastSeparator = filename.lastIndexOf('.'); if (lastSeparator > 0 && lastSeparator < filename.length()) { - return filename.substring(lastSeparator).equalsIgnoreCase(".zip"); + String type = filename.substring(lastSeparator + 1).toLowerCase(); + return Arrays.binarySearch(COMPRESSED_FILES, type) >= 0; } else { return false; } @@ -94,7 +114,7 @@ long issueId = session.addIssue(issue); if (attachments != null) { for (int i = 0; i < attachments.length; i++) { - submitAttachment(session, issueId, new File(attachments[i].getFilename())); + submitAttachment(session, issueId, attachments[i]); } } if (notes != null) { Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AttachmentsPart.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AttachmentsPart.java 2008-01-22 11:22:04 UTC (rev 158) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/AttachmentsPart.java 2008-01-31 15:29:19 UTC (rev 159) @@ -91,10 +91,8 @@ List array = new ArrayList(); DefaultListModel model = (DefaultListModel) attachments.getModel(); for (int i = 0; i < model.getSize(); i++) { - File file = (File) model.getElementAt(i); - IssueAttachment attachmentData = new IssueAttachment(); - attachmentData.setFilename(file.toString()); - array.add(attachmentData); + IIssueAttachment attachment = (IIssueAttachment) model.getElementAt(i); + array.add(attachment); } issue .setAttachments((IIssueAttachment[]) array.toArray(new IIssueAttachment[array @@ -110,8 +108,7 @@ IIssueAttachment[] issueAttachments = issue.getAttachments(); if (issueAttachments != null) { for (int i = 0; i < issueAttachments.length; i++) { - ((DefaultListModel) attachments.getModel()).addElement(new File(issueAttachments[i] - .getFilename())); + ((DefaultListModel) attachments.getModel()).addElement(issueAttachments[i]); } } } @@ -140,9 +137,10 @@ JFileChooser chooser = getFileChooser(); if (chooser.showOpenDialog(getOwner()) == JFileChooser.APPROVE_OPTION) { DefaultListModel model = (DefaultListModel) attachments.getModel(); - if (!model.contains(chooser.getSelectedFile())) { - ((DefaultListModel) attachments.getModel()).addElement(chooser - .getSelectedFile()); + IssueAttachment attachment = new IssueAttachment(); + attachment.setFilename(chooser.getSelectedFile().toString()); + if (!model.contains(attachment)) { + ((DefaultListModel) attachments.getModel()).addElement(attachment); } } } @@ -182,14 +180,17 @@ setBackground(list.getBackground()); setForeground(list.getForeground()); } - File file = (File) value; + IIssueAttachment attachment = (IIssueAttachment) value; + File file = new File(attachment.getFilename()); StringBuffer text = new StringBuffer(file.toString()); if (submitter.doCompress(file)) { text .append(" ").append(Messages.getString("AttachmentsPart.Message.WillBeCompressed")); //$NON-NLS-1$ //$NON-NLS-2$ } setText(text.toString()); - setIcon(getFileChooser().getIcon(file)); + if (file.exists()) { + setIcon(getFileChooser().getIcon(file)); + } return this; } Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitPanel.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitPanel.java 2008-01-22 11:22:04 UTC (rev 158) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitPanel.java 2008-01-31 15:29:19 UTC (rev 159) @@ -19,6 +19,7 @@ import java.util.Vector; import javax.swing.JPanel; +import javax.swing.JSeparator; import javax.swing.JTabbedPane; import org.mantisbt.connect.Enumeration; @@ -98,7 +99,9 @@ if (additional != null) { gc.gridy = 1; gc.weighty = 0; - add(createAdditionalControls(), gc); + add(additional, gc); + gc.gridy = 2; + add(new JSeparator(), gc); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2008-01-22 11:22:16
|
Revision: 158 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=158&view=rev Author: planser Date: 2008-01-22 03:22:04 -0800 (Tue, 22 Jan 2008) Log Message: ----------- 0000359: Improve error reporting for 'updateversion' ant task Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionUpdateTask.java Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionUpdateTask.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionUpdateTask.java 2008-01-18 13:33:08 UTC (rev 157) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionUpdateTask.java 2008-01-22 11:22:04 UTC (rev 158) @@ -135,7 +135,6 @@ log("Updated version '" + name + "' of project '" + project + "' at '" + getUrl() + "' (ID " + existing.getId() + ")"); } catch (MCException e) { - e.printStackTrace(); throw new BuildException("Could not update version.", e); } } catch (BuildException e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2008-01-18 13:33:52
|
Revision: 157 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=157&view=rev Author: planser Date: 2008-01-18 05:33:08 -0800 (Fri, 18 Jan 2008) Log Message: ----------- Fixed 0000359: Improve error reporting for 'updateversion' ant task Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/.classpath Added Paths: ----------- mantisconnect/trunk/clients/java/client-api/lib/axis-REV609819.jar Removed Paths: ------------- mantisconnect/trunk/clients/java/client-api/lib/axis.jar Modified: mantisconnect/trunk/clients/java/client-api/.classpath =================================================================== --- mantisconnect/trunk/clients/java/client-api/.classpath 2008-01-15 15:18:40 UTC (rev 156) +++ mantisconnect/trunk/clients/java/client-api/.classpath 2008-01-18 13:33:08 UTC (rev 157) @@ -5,7 +5,6 @@ <classpathentry kind="src" path="src/test"/> <classpathentry kind="lib" path="lib/junit.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="lib" path="lib/axis.jar" sourcepath="C:/ToolsNLibs/axis-1_4/src"/> <classpathentry kind="lib" path="lib/axis-ant.jar"/> <classpathentry kind="lib" path="lib/commons-discovery-0.2.jar"/> <classpathentry kind="lib" path="lib/commons-logging-1.0.4.jar"/> @@ -22,5 +21,6 @@ <attribute name="javadoc_location" value="file:/C:/ToolsNLibs/jmock-1.1.0/javadoc-1.1.0/"/> </attributes> </classpathentry> + <classpathentry kind="lib" path="lib/axis-REV609819.jar"/> <classpathentry kind="output" path="classes"/> </classpath> Added: mantisconnect/trunk/clients/java/client-api/lib/axis-REV609819.jar =================================================================== (Binary files differ) Property changes on: mantisconnect/trunk/clients/java/client-api/lib/axis-REV609819.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: mantisconnect/trunk/clients/java/client-api/lib/axis.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2008-01-15 15:18:43
|
Revision: 156 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=156&view=rev Author: planser Date: 2008-01-15 07:18:40 -0800 (Tue, 15 Jan 2008) Log Message: ----------- Fixed #357: Consider adding antlib.xml to mantisconnect-client-api jar Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/build.xml Added Paths: ----------- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/antlib.xml Modified: mantisconnect/trunk/clients/java/client-api/build.xml =================================================================== --- mantisconnect/trunk/clients/java/client-api/build.xml 2008-01-11 14:03:56 UTC (rev 155) +++ mantisconnect/trunk/clients/java/client-api/build.xml 2008-01-15 15:18:40 UTC (rev 156) @@ -65,6 +65,9 @@ <delete file="${dist.name}.zip"/> <delete dir="${dist.dir}"/> <mkdir dir="${dist.dir}"/> + <copy todir="${build.prod.dir}"> + <fileset dir="${main.src.dir}" includes="*/**/*.xml"/> + </copy> <jar destfile="${dist.dir}/${dist.name}.jar" basedir="${build.prod.dir}"/> <javadoc sourcepath="${main.src.dir}" packagenames="org.mantisbt.connect.*" destdir="${dist.doc.dir}" author="true"/> <copy todir="${dist.lib.dir}"> Added: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/antlib.xml =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/antlib.xml (rev 0) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/antlib.xml 2008-01-15 15:18:40 UTC (rev 156) @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<antlib> + <typedef name="submitissue" classname="org.mantisbt.connect.ant.taskdefs.IssueSubmitTask"/> + <typedef name="addversion" classname="org.mantisbt.connect.ant.taskdefs.VersionAddTask"/> + <typedef name="deleteversion" classname="org.mantisbt.connect.ant.taskdefs.VersionDeleteTask"/> + <typedef name="updateversion" classname="org.mantisbt.connect.ant.taskdefs.VersionUpdateTask"/> +</antlib> \ No newline at end of file Property changes on: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/antlib.xml ___________________________________________________________________ Name: svn:mime-type + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2008-01-11 14:04:03
|
Revision: 155 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=155&view=rev Author: planser Date: 2008-01-11 06:03:56 -0800 (Fri, 11 Jan 2008) Log Message: ----------- Removed unused imports Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java 2008-01-10 16:10:28 UTC (rev 154) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java 2008-01-11 14:03:56 UTC (rev 155) @@ -24,22 +24,6 @@ import junit.framework.TestCase; -import org.mantisbt.connect.axis.AccountData; -import org.mantisbt.connect.axis.AttachmentData; -import org.mantisbt.connect.axis.CustomFieldDefinitionData; -import org.mantisbt.connect.axis.CustomFieldValueForIssueData; -import org.mantisbt.connect.axis.FilterData; -import org.mantisbt.connect.axis.IssueData; -import org.mantisbt.connect.axis.IssueHeaderData; -import org.mantisbt.connect.axis.IssueNoteData; -import org.mantisbt.connect.axis.MantisConnectLocator; -import org.mantisbt.connect.axis.MantisConnectPortType; -import org.mantisbt.connect.axis.ObjectRef; -import org.mantisbt.connect.axis.ProjectAttachmentData; -import org.mantisbt.connect.axis.ProjectData; -import org.mantisbt.connect.axis.ProjectVersionData; -import org.mantisbt.connect.axis.RelationshipData; - /** * <p> * Testcases for the MantisConnect webservice. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2008-01-10 16:10:29
|
Revision: 154 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=154&view=rev Author: planser Date: 2008-01-10 08:10:28 -0800 (Thu, 10 Jan 2008) Log Message: ----------- Updated documentation Modified Paths: -------------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/README.txt Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/README.txt =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/README.txt 2008-01-10 16:01:16 UTC (rev 153) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/README.txt 2008-01-10 16:10:28 UTC (rev 154) @@ -19,7 +19,7 @@ 2. Requirements =============== -The plugin was developed for Eclipse 3.2.x. +The plugin was developed for Eclipse 3.3.x. Currently it depends on: @@ -62,7 +62,7 @@ - (Re)start Eclipse - Open Window - Preferences - Team - MantisConnect and define at least one connection (URL must point to mantisconnect.php - e.g. - http://localhost/mantis/mc/mantisconnect.php) + http://localhost/mantis/api/soap/mantisconnect.php) - Open Window - Show View - Other... and select Team - MantisConnect - Now you should see a view named Mantis - Open the top right drop down menu and select the connection just defind in This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2008-01-10 16:01:24
|
Revision: 153 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=153&view=rev Author: planser Date: 2008-01-10 08:01:16 -0800 (Thu, 10 Jan 2008) Log Message: ----------- Restored needed attributes. Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/build.properties.sample Modified: mantisconnect/trunk/clients/java/client-api/build.properties.sample =================================================================== --- mantisconnect/trunk/clients/java/client-api/build.properties.sample 2008-01-10 14:45:56 UTC (rev 152) +++ mantisconnect/trunk/clients/java/client-api/build.properties.sample 2008-01-10 16:01:16 UTC (rev 153) @@ -24,4 +24,10 @@ # Each of them should return at least one issue. test.project.filters = ReportedByMe;AssignedToMe # Names of custom fields expected for issues -test.project.customfields = ADateField;AStringField \ No newline at end of file +test.project.customfields = ADateField;AStringField +# Name of the custom field we want to submit with test issues +test.project.customfield.name = ADateField +# Value of the custom field we want to submit - must be a date +test.project.customfield.value = 02.05.1978 +# Format of the custom field we want to submit (date) +test.project.customfield.format = dd.MM.yy \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2008-01-10 14:47:07
|
Revision: 152 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=152&view=rev Author: planser Date: 2008-01-10 06:45:56 -0800 (Thu, 10 Jan 2008) Log Message: ----------- Updated documentation Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/README.txt mantisconnect/trunk/clients/java/client-api/build.properties.sample mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/IssueSubmitTask.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionAddTask.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionDeleteTask.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionUpdateTask.java mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitFrame.java Modified: mantisconnect/trunk/clients/java/client-api/README.txt =================================================================== --- mantisconnect/trunk/clients/java/client-api/README.txt 2008-01-10 12:28:33 UTC (rev 151) +++ mantisconnect/trunk/clients/java/client-api/README.txt 2008-01-10 14:45:56 UTC (rev 152) @@ -1,16 +1,18 @@ MantisConnect Client API for Java -Copyright (C) 2007 Peter Lanser - pl...@us... +Copyright (C) 2008 Peter Lanser - pl...@us... =============================================================================== 1. Overview 2. Requirements - Versioning schema 3. Building the source distribution 4. Running the TestSuite -5. Getting started -6.1 Obtaining a session -6.2 Retrieving Issues -6.3 Adding a new Issue -7. Further reading +5. Getting started with the API +5.1 Obtaining a session +5.2 Retrieving Issues +5.3 Adding a new Issue +6. Swing UI +7. Ant Tasks +8. Further reading 1. Overview =========== @@ -21,7 +23,7 @@ The most important is org.mantisbt.connect.IMCSession. The default implementation for org.mantisbt.connect.IMCSession makes use of the infrastructure offered by Axis. Besides that it caches some information (see -JavaDoc for org.mantisbt.connect.IMCSession). +JavaDoc for org.mantisbt.connect.axis.MCSession). 2. Requirements - Versioning schema =================================== @@ -39,7 +41,7 @@ versioned 1.1 respectively 1.1.x (first two parts). It is the first version of the Client API (1.0 - the second two parts). -The next bugfix release for the Client API would be named 1.1.1.1. +The next bugfix release for the Java Client API would be named 1.1.1.1. 3. Building the source distribution =================================== @@ -80,8 +82,8 @@ Running the TestSuite may be a bit tricky. I'm going to provide a better solution in the near future. -5. Getting started -================== +5. Getting started with the API +=============================== 5.1 Obtaining a Session ======================= @@ -93,9 +95,19 @@ The package org.mantisbt.connect.axis also contains a class named Proxy which can be used to configure a proxy server: +[...] + +import org.mantisbt.connect.IMCSession; +import org.mantisbt.connect.axis.MCSession; +import org.mantisbt.connect.axis.Proxy; + +[...] + Proxy.setProxy("localhost", 8080); IMCSession session = new MCSession(url, user, pwd); +[...] + It is important to mention that at this point no exception is thrown if the user/password combination is invalid. An appropriate exception will be thrown if any method is invoked which requires a valid user/password combination. @@ -155,8 +167,34 @@ session.addIssue(issue); -6. Further reading +6. Swing UI +=========== + +The library contains a simple UI for adding an issue to a Mantis site. + +You can either provide the settings as programm arguments or define them in +the UI. + +java org.mantisbt.connect.ui.swing.IssueSubmitFrame <url> <user> <pwd> + +Note: The url must point to http://<server>/api/soap/mantisconnect.php + +7. Ant Tasks +============ + +Up to now the Java Client API offers Ant tasks for submitting issues and +for adding, deleting and updating project versions. + +See the JavaDocs for the appropriate tasks within the package +org.mantisbt.connect.ant.taskdefs. + +8. Further reading ================== The rest of the API is pretty intuitive. Have a look at the JavaDocs for -org.mantisbt.connect.IMCSession. \ No newline at end of file +org.mantisbt.connect.IMCSession. + +I'll try to post some examples and code snippets under +http://www.two-toned.at/mc. + +Feel free to contact me under planser __@__ users.sourceforge.net. \ No newline at end of file Modified: mantisconnect/trunk/clients/java/client-api/build.properties.sample =================================================================== --- mantisconnect/trunk/clients/java/client-api/build.properties.sample 2008-01-10 12:28:33 UTC (rev 151) +++ mantisconnect/trunk/clients/java/client-api/build.properties.sample 2008-01-10 14:45:56 UTC (rev 152) @@ -2,7 +2,7 @@ mantis.url = http://localhost/mc/mantisconnect.php # The expected version of MantisConnect -test.version = 1.1.0-SVN +test.version = 1.1.1-SVN # The site we're testing against test.url = ${mantis.url} # Proxy settings, empty values allowed. @@ -24,10 +24,4 @@ # Each of them should return at least one issue. test.project.filters = ReportedByMe;AssignedToMe # Names of custom fields expected for issues -test.project.customfields = ADateField;AStringField -# Name of the custom field we want to submit with test issues -test.project.customfield.name = ADateField -# Value of the custom field we want to submit - must be a date -test.project.customfield.value = 02.05.1978 -# Format of the custom field we want to submit (date) -test.project.customfield.format = dd.MM.yy \ No newline at end of file +test.project.customfields = ADateField;AStringField \ No newline at end of file Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/IssueSubmitTask.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/IssueSubmitTask.java 2008-01-10 12:28:33 UTC (rev 151) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/IssueSubmitTask.java 2008-01-10 14:45:56 UTC (rev 152) @@ -152,6 +152,8 @@ * * </p> * + * @see org.mantisbt.connect.ant.taskdefs.MantisConnectTask + * * @author Peter Lanser, pl...@us... */ public class IssueSubmitTask extends MantisConnectTask { Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionAddTask.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionAddTask.java 2008-01-10 12:28:33 UTC (rev 151) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionAddTask.java 2008-01-10 14:45:56 UTC (rev 152) @@ -82,6 +82,8 @@ * * </p> * + * @see org.mantisbt.connect.ant.taskdefs.MantisConnectTask + * * @author Peter Lanser, pl...@us... */ public class VersionAddTask extends MantisConnectTask { Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionDeleteTask.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionDeleteTask.java 2008-01-10 12:28:33 UTC (rev 151) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionDeleteTask.java 2008-01-10 14:45:56 UTC (rev 152) @@ -64,6 +64,8 @@ * * </p> * + * @see org.mantisbt.connect.ant.taskdefs.MantisConnectTask + * * @author Peter Lanser, pl...@us... */ public class VersionDeleteTask extends MantisConnectTask { Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionUpdateTask.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionUpdateTask.java 2008-01-10 12:28:33 UTC (rev 151) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ant/taskdefs/VersionUpdateTask.java 2008-01-10 14:45:56 UTC (rev 152) @@ -83,6 +83,8 @@ * * </p> * + * @see org.mantisbt.connect.ant.taskdefs.MantisConnectTask + * * @author Peter Lanser, pl...@us... */ public class VersionUpdateTask extends MantisConnectTask { Modified: mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitFrame.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitFrame.java 2008-01-10 12:28:33 UTC (rev 151) +++ mantisconnect/trunk/clients/java/client-api/src/main/org/mantisbt/connect/ui/swing/IssueSubmitFrame.java 2008-01-10 14:45:56 UTC (rev 152) @@ -36,6 +36,14 @@ import org.mantisbt.connect.ui.Messages; /** + * <p> + * A UI for adding issues to a Mantis site. + * </p> + * <p> + * The program may either be started without any argument or with the three + * arguments <url> <user> <password>. + * </p> + * * @author Peter Lanser, pl...@us... */ public class IssueSubmitFrame extends JFrame implements IIssueSubmitListener { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2008-01-10 12:28:37
|
Revision: 151 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=151&view=rev Author: planser Date: 2008-01-10 04:28:33 -0800 (Thu, 10 Jan 2008) Log Message: ----------- Property Changed: ---------------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/ Property changes on: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse ___________________________________________________________________ Name: svn:ignore - classes mantisconnect.jar mantisconnectsrc.zip org.mantisbt.connect.eclipse_0.0.6.zip + classes mantisconnect.jar mantisconnectsrc.zip org.mantisbt.connect.eclipse_0.0.6.zip This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-12-27 12:40:04
|
Revision: 150 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=150&view=rev Author: planser Date: 2007-12-27 04:39:47 -0800 (Thu, 27 Dec 2007) Log Message: ----------- Adapted some testcases Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java 2007-12-07 13:47:05 UTC (rev 149) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java 2007-12-27 12:39:47 UTC (rev 150) @@ -627,17 +627,16 @@ } // Read attachments = getFirstProjectAttachments(); + assertNotNull(attachments); assertEquals(cntOld + 1, attachments.length); - if (attachments == null) { - fail("Could not get project attachment information."); - } - ProjectAttachmentData description = attachments[attachments.length - 1]; - assertEquals("ATitle", description.getTitle()); - assertEquals("ADescription", description.getDescription()); + ProjectAttachmentData newData = findProjectAttachmentById(attachments, newId); + assertNotNull(newData); + assertEquals("ATitle", newData.getTitle()); + assertEquals("ADescription", newData.getDescription()); try { byte[] attachmentData = portType.mc_project_attachment_get(user, pwd, newId); assertTrue(attachmentData != null && attachmentData.length > 0); - assertEquals(attachmentData.length, description.getSize().longValue()); + assertEquals(attachmentData.length, newData.getSize().longValue()); } catch (RemoteException e) { fail(e.toString()); } @@ -655,6 +654,17 @@ System.out.println("Project attachment added, read and deleted (ID = " + newId + ")"); } + private ProjectAttachmentData findProjectAttachmentById(ProjectAttachmentData[] attachments, BigInteger id) { + if (attachments != null) { + for (int i = 0; i < attachments.length; i++) { + if (attachments[i].getId().equals(id)) { + return attachments[i]; + } + } + } + return null; + } + /** * Create, read, update and delete issue. */ @@ -988,10 +998,12 @@ } catch (RemoteException e) { fail(e.toString()); } - assertEquals(newVersionId, newData[0].getId()); - assertEquals(name, newData[0].getName()); - assertEquals(description, newData[0].getDescription()); - assertFalse(newData[0].getReleased().booleanValue()); + ProjectVersionData data = findProjectVersionById(newData, newVersionId); + assertNotNull(data); + assertEquals(newVersionId, data.getId()); + assertEquals(name, data.getName()); + assertEquals(description, data.getDescription()); + assertFalse(data.getReleased().booleanValue()); // delete try { assertTrue(portType.mc_project_version_delete(user, pwd, newVersionId)); @@ -1007,4 +1019,15 @@ System.out.println("Version added, read, updated and deleted (ID = " + newVersionId + ")"); } + private ProjectVersionData findProjectVersionById(ProjectVersionData[] versions, BigInteger id) { + if (versions != null) { + for (int i = 0; i < versions.length; i++) { + if (versions[i].getId().equals(id)) { + return versions[i]; + } + } + } + return null; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-12-07 13:47:14
|
Revision: 149 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=149&view=rev Author: planser Date: 2007-12-07 05:47:05 -0800 (Fri, 07 Dec 2007) Log Message: ----------- - Some UI changes - Move towards Eclipse 3.3 Modified Paths: -------------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/lib/mantisconnect-client-api-1.1.1.0-SVN.jar mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/MantisConnectPlugin.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/actions/NewIssueAction.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/dialogs/ConnectionSettingsDialog.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/GeneralPage.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/MainAttributesSection.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPage.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/TextSection.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java Added Paths: ----------- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/org.eclipse.jdt.core.prefs mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/org.eclipse.jdt.ui.prefs mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/InitProjectJob.java mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/InitSessionJob.java Added: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/org.eclipse.jdt.core.prefs =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/org.eclipse.jdt.core.prefs 2007-12-07 13:47:05 UTC (rev 149) @@ -0,0 +1,256 @@ +#Tue Nov 06 10:34:43 CET 2007 +eclipse.preferences.version=1 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=100 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true Property changes on: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/org.eclipse.jdt.core.prefs ___________________________________________________________________ Name: svn:mime-type + text/plain Added: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/org.eclipse.jdt.ui.prefs (rev 0) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/org.eclipse.jdt.ui.prefs 2007-12-07 13:47:05 UTC (rev 149) @@ -0,0 +1,4 @@ +#Tue Nov 06 10:34:43 CET 2007 +eclipse.preferences.version=1 +formatter_profile=_Eclipse [built-in] 100 +formatter_settings_version=11 Property changes on: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/.settings/org.eclipse.jdt.ui.prefs ___________________________________________________________________ Name: svn:mime-type + text/plain Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/lib/mantisconnect-client-api-1.1.1.0-SVN.jar =================================================================== (Binary files differ) Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/MantisConnectPlugin.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/MantisConnectPlugin.java 2007-12-07 13:12:48 UTC (rev 148) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/MantisConnectPlugin.java 2007-12-07 13:47:05 UTC (rev 149) @@ -91,13 +91,11 @@ public static final String PREF_CHANGED = "Changed"; - public final static String MC_ENDPOINT_FILENAME = "mantisconnect.php"; - public final static String MANTIS_INDEX_FILENAME = "index.php"; public final static String MANTIS_VIEW_ISSUE_FILENAME = "view.php"; - public final static String MC_ENDPOINT_DEFAULT_PATH = "mc"; + public final static String MC_ENDPOINT_REL_DEFAULT_PATH = "api/soap/mantisconnect.php"; private static MantisConnectPlugin plugin; Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/actions/NewIssueAction.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/actions/NewIssueAction.java 2007-12-07 13:12:48 UTC (rev 148) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/actions/NewIssueAction.java 2007-12-07 13:47:05 UTC (rev 149) @@ -11,14 +11,18 @@ */ package org.mantisbt.connect.eclipse.actions; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.jobs.IJobChangeEvent; +import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.widgets.Shell; +import org.mantisbt.connect.IMCSession; import org.mantisbt.connect.MCException; import org.mantisbt.connect.eclipse.MantisConnectPlugin; +import org.mantisbt.connect.eclipse.StatusInfo; import org.mantisbt.connect.eclipse.dialogs.IssueDialog; import org.mantisbt.connect.eclipse.views.AddIssueJob; import org.mantisbt.connect.eclipse.views.ErrorRunnable; @@ -47,43 +51,74 @@ if (view.getSession() == null || view.getCurrentProject() == null) { return; } - final IIssue[] issue = new IIssue[1]; - final Throwable[] error = new Throwable[1]; - BusyIndicator.showWhile(shell.getDisplay(), new Runnable() { - public void run() { - try { - issue[0] = view.getSession().newIssue(view.getCurrentProject().getId()); - view.getSession().getCategories(view.getCurrentProject().getId()); - } catch (MCException e) { - error[0] = e; + NewIssueJob job = new NewIssueJob(view.getSession(), view.getCurrentProject().getId()); + job.setUser(true); + job.addJobChangeListener(new JobChangeAdapter() { + public void done(final IJobChangeEvent event) { + if (event.getResult().getSeverity() == IStatus.OK) { + shell.getDisplay().asyncExec(new Runnable() { + public void run() { + showIssueDialog(((NewIssueJob) event.getJob()).getIssue()); + } + }); + } else { + MantisConnectPlugin.getDefault().error("Could not create new issue.", + event.getJob().getResult().getException(), true); } } }); - if (error[0] == null) { - IssueDialog dialog = new IssueDialog(shell, issue[0], view.getSession()); - if (dialog.open() == Dialog.OK) { - AddIssueJob job = new AddIssueJob(view.getSession(), issue[0]); - job.setUser(true); - job.addJobChangeListener(new JobChangeAdapter() { - public void done(IJobChangeEvent event) { - AddIssueJob job = (AddIssueJob) event.getJob(); - if (job.getError() != null) { - shell.getDisplay().syncExec( - new ErrorRunnable("Error adding issue.", job.getError(), true, - false, view)); + view.getProgressService().schedule(job); + } + + private void showIssueDialog(IIssue issue) { + IssueDialog dialog = new IssueDialog(shell, issue, view.getSession()); + if (dialog.open() == Dialog.OK) { + AddIssueJob job = new AddIssueJob(view.getSession(), issue); + job.setUser(true); + job.addJobChangeListener(new JobChangeAdapter() { + public void done(IJobChangeEvent event) { + AddIssueJob job = (AddIssueJob) event.getJob(); + if (job.getError() != null) { + shell.getDisplay().syncExec( + new ErrorRunnable("Error adding issue.", job.getError(), true, + false, view)); + } + shell.getDisplay().syncExec(new Runnable() { + public void run() { + view.updateIssues(); } - shell.getDisplay().syncExec(new Runnable() { - public void run() { - view.updateIssues(); - } - }); - } - }); - view.getProgressService().schedule(job); + }); + } + }); + view.getProgressService().schedule(job); + } + } + + private class NewIssueJob extends Job { + + private IMCSession session; + private long projectId; + private IIssue issue; + + public NewIssueJob(IMCSession session, long projectId) { + super("Creating new Issue"); + this.session = session; + this.projectId = projectId; + } + + protected IStatus run(IProgressMonitor monitor) { + try { + issue = session.newIssue(projectId); + return StatusInfo.OK; + } catch (MCException e) { + return new StatusInfo("Error while creating new issue", e); } - } else { - MantisConnectPlugin.getDefault().error("Could not create new issue.", error[0], true); } + + public IIssue getIssue() { + return issue; + } + } } Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/dialogs/ConnectionSettingsDialog.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/dialogs/ConnectionSettingsDialog.java 2007-12-07 13:12:48 UTC (rev 148) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/dialogs/ConnectionSettingsDialog.java 2007-12-07 13:47:05 UTC (rev 149) @@ -362,18 +362,9 @@ private String guessBrowserUrl() { String mcUrl = mantisConnectUrl.getText().trim(); - if (mcUrl.endsWith(MantisConnectPlugin.MC_ENDPOINT_FILENAME)) { + if (mcUrl.endsWith(MantisConnectPlugin.MC_ENDPOINT_REL_DEFAULT_PATH)) { String result = mcUrl.substring(0, mcUrl.length() - - MantisConnectPlugin.MC_ENDPOINT_FILENAME.length()); - if (result.endsWith("/")) { - result = result.substring(0, result.length() - 1); - } - if (result - .endsWith(MantisConnectPlugin.MC_ENDPOINT_DEFAULT_PATH)) { - result = result.substring(0, result.length() - - MantisConnectPlugin.MC_ENDPOINT_DEFAULT_PATH - .length()); - } + - MantisConnectPlugin.MC_ENDPOINT_REL_DEFAULT_PATH.length()); result += MantisConnectPlugin.MANTIS_VIEW_ISSUE_FILENAME + "?id=" + BrowserUrlVariable.ISSUE_ID; return result; Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/GeneralPage.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/GeneralPage.java 2007-12-07 13:12:48 UTC (rev 148) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/GeneralPage.java 2007-12-07 13:47:05 UTC (rev 149) @@ -111,6 +111,8 @@ protected void createFormContent(IManagedForm managedForm) { super.createFormContent(managedForm); ScrolledForm form = managedForm.getForm(); + form.setText("Issue " + getEditor().getEditorInput().getName() + " - General"); + managedForm.getToolkit().decorateFormHeading(form.getForm()); createLayout(form.getBody()); managedForm.addPart(createMainAttributesSection(form.getBody())); managedForm.addPart(createDetailSection(form.getBody())); Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/MainAttributesSection.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/MainAttributesSection.java 2007-12-07 13:12:48 UTC (rev 148) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/MainAttributesSection.java 2007-12-07 13:47:05 UTC (rev 149) @@ -88,9 +88,7 @@ } protected void createClient(Section section, FormToolkit toolkit) { - AccountDataLabelProvider accountDataLabelProvider = new AccountDataLabelProvider(); - Composite container = toolkit.createComposite(section); TableWrapLayout layout = new TableWrapLayout(); layout.numColumns = 4; Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPage.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPage.java 2007-12-07 13:12:48 UTC (rev 148) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/NotesPage.java 2007-12-07 13:47:05 UTC (rev 149) @@ -71,6 +71,8 @@ protected void createFormContent(IManagedForm managedForm) { final ScrolledForm form = managedForm.getForm(); + form.setText("Issue " + getEditor().getEditorInput().getName() + " - Notes"); + managedForm.getToolkit().decorateFormHeading(form.getForm()); createLayout(form); newNoteSection = createNewNoteSection(form.getBody()); managedForm.addPart(newNoteSection); Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/TextSection.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/TextSection.java 2007-12-07 13:12:48 UTC (rev 148) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/editors/TextSection.java 2007-12-07 13:47:05 UTC (rev 149) @@ -59,6 +59,7 @@ description.addModifyListener(validateListener); toolkit.paintBordersFor(container); section.setClient(container); + } public void commit(boolean onSave) { Added: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/InitProjectJob.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/InitProjectJob.java (rev 0) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/InitProjectJob.java 2007-12-07 13:47:05 UTC (rev 149) @@ -0,0 +1,42 @@ +package org.mantisbt.connect.eclipse.views; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.jobs.Job; +import org.mantisbt.connect.IMCSession; +import org.mantisbt.connect.MCException; +import org.mantisbt.connect.eclipse.StatusInfo; + +public class InitProjectJob extends Job { + + private IMCSession session; + + private long projectId; + + public InitProjectJob(IMCSession session, long projectId) { + super("Initializing project"); + this.session = session; + this.projectId = projectId; + } + + protected IStatus run(IProgressMonitor monitor) { + try { + monitor.beginTask("Initializing project", 3); + monitor.subTask("Fetching categories"); + session.getCategories(projectId); + monitor.worked(1); + monitor.subTask("Fetching released versions"); + session.getReleasedVersions(projectId); + monitor.worked(1); + monitor.subTask("Fetching custom field definitions"); + session.getCustomFieldDefinitions(projectId); + monitor.worked(1); + return StatusInfo.OK; + } catch (MCException e) { + return new StatusInfo("Error while initializing project", e); + } finally { + monitor.done(); + } + } + +} Property changes on: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/InitProjectJob.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/InitSessionJob.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/InitSessionJob.java (rev 0) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/InitSessionJob.java 2007-12-07 13:47:05 UTC (rev 149) @@ -0,0 +1,43 @@ +package org.mantisbt.connect.eclipse.views; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.jobs.Job; +import org.mantisbt.connect.IMCSession; +import org.mantisbt.connect.MCException; +import org.mantisbt.connect.eclipse.StatusInfo; + +public class InitSessionJob extends Job { + + private IMCSession session; + + public InitSessionJob(IMCSession session) { + super("Initializing session"); + this.session = session; + } + + @Override + protected IStatus run(IProgressMonitor monitor) { + try { + monitor.beginTask("Initializing session", 4); + monitor.subTask("Fetching default issue severity"); + session.getDefaultIssueSeverity(); + monitor.worked(1); + monitor.subTask("Fetching default issue priority"); + session.getDefaultIssuePriority(); + monitor.worked(1); + monitor.subTask("Fetching default issue viewstate"); + session.getDefaultIssueViewState(); + monitor.worked(1); + monitor.subTask("Fetching default note viewstate"); + session.getDefaultNoteViewState(); + monitor.worked(1); + return StatusInfo.OK; + } catch (MCException e) { + return new StatusInfo("Error while initializing project", e); + } finally { + monitor.done(); + } + } + +} Property changes on: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/InitSessionJob.java ___________________________________________________________________ Name: svn:mime-type + text/plain Modified: mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java =================================================================== --- mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java 2007-12-07 13:12:48 UTC (rev 148) +++ mantisconnect/trunk/clients/java/eclipse/org.mantisbt.connect.eclipse/src/org/mantisbt/connect/eclipse/views/MantisConnectView.java 2007-12-07 13:47:05 UTC (rev 149) @@ -809,6 +809,8 @@ } }); getProgressService().schedule(job); + InitProjectJob job2 = new InitProjectJob(session, projectNode.getProjectData().getId()); + getProgressService().schedule(job2); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-12-07 13:12:54
|
Revision: 148 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=148&view=rev Author: planser Date: 2007-12-07 05:12:48 -0800 (Fri, 07 Dec 2007) Log Message: ----------- Removed dependency into 1.5 Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/ListCustomFieldFormatTest.java Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/ListCustomFieldFormatTest.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/ListCustomFieldFormatTest.java 2007-12-04 18:35:57 UTC (rev 147) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/text/ListCustomFieldFormatTest.java 2007-12-07 13:12:48 UTC (rev 148) @@ -11,8 +11,6 @@ */ package org.mantisbt.connect.text; -import java.util.Arrays; - import junit.framework.TestCase; import org.mantisbt.connect.CustomFieldType; @@ -46,8 +44,18 @@ public void testParse() { ListCustomFieldFormat format = new ListCustomFieldFormat(definition); try { - assertTrue(Arrays.deepEquals(new String[] { "Value1" }, (String[]) format.parse("Value1"))); - assertTrue(Arrays.deepEquals(new String[] { "Value1", "Value2" }, (String[]) format.parse("Value1|Value2"))); + String[] expected = new String[] { "Value1" }; + String[] result = (String[]) format.parse("Value1"); + assertEquals(expected.length, result.length); + for (int i = 0; i < expected.length; i++) { + assertEquals(expected[i], result[i]); + } + expected = new String[] { "Value1", "Value12" }; + result = (String[]) format.parse("Value1|Value2"); + assertEquals(expected.length, result.length); + for (int i = 0; i < expected.length; i++) { + assertEquals(expected[i], result[i]); + } } catch (CustomFieldFormatException e) { fail("Unexpected CustomFieldFormatException occurred."); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pl...@us...> - 2007-12-04 18:36:00
|
Revision: 147 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=147&view=rev Author: planser Date: 2007-12-04 10:35:57 -0800 (Tue, 04 Dec 2007) Log Message: ----------- Some minor changes regarding tests Modified Paths: -------------- mantisconnect/trunk/clients/java/client-api/build.properties.sample mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java Property Changed: ---------------- mantisconnect/trunk/clients/java/client-api/ Property changes on: mantisconnect/trunk/clients/java/client-api ___________________________________________________________________ Name: svn:ignore - classes dist build.properties + classes dist build.properties build Modified: mantisconnect/trunk/clients/java/client-api/build.properties.sample =================================================================== --- mantisconnect/trunk/clients/java/client-api/build.properties.sample 2007-11-01 15:40:48 UTC (rev 146) +++ mantisconnect/trunk/clients/java/client-api/build.properties.sample 2007-12-04 18:35:57 UTC (rev 147) @@ -6,8 +6,8 @@ # The site we're testing against test.url = ${mantis.url} # Proxy settings, empty values allowed. -test.proxy.host = -test.proxy.port = +test.proxyHost = +test.proxyPort = test.user = administrator test.password = root # Projects which are accessible by the given user (separated by semicolon) @@ -21,7 +21,7 @@ # All future versions of the project with the id above (separated by semicolon) test.project.versions.future = 2.0 # All filters we get with the project (separated by semicolon) -# The first filter should return at least one issue. +# Each of them should return at least one issue. test.project.filters = ReportedByMe;AssignedToMe # Names of custom fields expected for issues test.project.customfields = ADateField;AStringField Modified: mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java =================================================================== --- mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java 2007-11-01 15:40:48 UTC (rev 146) +++ mantisconnect/trunk/clients/java/client-api/src/test/org/mantisbt/connect/axis/MantisConnectPortTypeTest.java 2007-12-04 18:35:57 UTC (rev 147) @@ -130,9 +130,8 @@ private IssueData getFirstIssue() { try { - FilterData filter = portType.mc_filter_get(user, pwd, getAccessibleProject())[0]; - IssueData issue = portType.mc_filter_get_issues(user, pwd, getAccessibleProject(), - filter.getId(), BigInteger.valueOf(1), BigInteger.valueOf(10))[0]; + IssueData issue = portType.mc_project_get_issues(user, pwd, getAccessibleProject(), + BigInteger.valueOf(1), BigInteger.valueOf(10))[0]; return issue; } catch (RemoteException e) { return null; @@ -141,9 +140,8 @@ private IssueData getLastIssue() { try { - FilterData filter = portType.mc_filter_get(user, pwd, getAccessibleProject())[0]; - IssueData[] issues = portType.mc_filter_get_issues(user, pwd, getAccessibleProject(), - filter.getId(), BigInteger.valueOf(1), BigInteger.valueOf(10)); + IssueData[] issues = portType.mc_project_get_issues(user, pwd, getAccessibleProject(), + BigInteger.valueOf(1), BigInteger.valueOf(10)); return issues[issues.length - 1]; } catch (RemoteException e) { return null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-11-01 15:40:50
|
Revision: 146 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=146&view=rev Author: vboctor Date: 2007-11-01 08:40:48 -0700 (Thu, 01 Nov 2007) Log Message: ----------- 1. Some unit test fixes. 2. When sending data to webservice, set the date submitted and last updated. Mantis can then override them as necessary. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Issue.cs Modified: mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs 2007-10-20 23:09:12 UTC (rev 145) +++ mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs 2007-11-01 15:40:48 UTC (rev 146) @@ -34,7 +34,7 @@ protected string Url { - get { return "http://localhost:8008/mantisbt/mc/mantisconnect.php"; } + get { return "http://localhost:8008/mantisbt/api/soap/mantisconnect.php"; } } protected void Connect() Modified: mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs 2007-10-20 23:09:12 UTC (rev 145) +++ mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs 2007-11-01 15:40:48 UTC (rev 146) @@ -179,7 +179,7 @@ { const string VersionName = "VersionName"; const string VersionDescription = "VersionDescription"; - DateTime now = DateTime.Now; + DateTime now = DateTime.Today; // Use today to avoid approximation errors ProjectVersion version = new ProjectVersion(); version.ProjectId = this.FirstProjectId; @@ -198,11 +198,11 @@ ProjectVersion versionAdded = GetProjectVersionById(versionId); - Assert.AreEqual(versionAdded.Id, versionId); - Assert.AreEqual(versionAdded.Name, VersionName); - Assert.AreEqual(versionAdded.Description, VersionDescription); - Assert.AreEqual(versionAdded.DateOrder, now); - Assert.AreEqual(versionAdded.IsReleased, released); + Assert.AreEqual(versionId, versionAdded.Id); + Assert.AreEqual(VersionName, versionAdded.Name); + Assert.AreEqual(VersionDescription, versionAdded.Description); + Assert.AreEqual(now, versionAdded.DateOrder); + Assert.AreEqual(released, versionAdded.IsReleased); } finally { Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Issue.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Issue.cs 2007-10-20 23:09:12 UTC (rev 145) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Issue.cs 2007-11-01 15:40:48 UTC (rev 146) @@ -100,10 +100,12 @@ issueData.status = this.Status.ToWebservice(); issueData.reporter = this.ReportedBy.ToWebservice(); issueData.handler = this.AssignedTo == null ? null : this.AssignedTo.ToWebservice(); + issueData.date_submitted = this.dateSubmitted; + issueData.last_updated = this.lastUpdated; - issueData.notes = IssueNote.ConvertArrayToWebservice( this.Notes ); + issueData.notes = IssueNote.ConvertArrayToWebservice( this.Notes ); - // TODO: Attachments + // TODO: Attachments // TODO: Relationships return issueData; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-10-20 23:09:13
|
Revision: 145 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=145&view=rev Author: vboctor Date: 2007-10-20 16:09:12 -0700 (Sat, 20 Oct 2007) Log Message: ----------- Fixed #306: SubmitIssue.cs is trying to use the System.Configuration.ConfigurationSettings.AppSettings method. Fixed #351: Increase minimum .NET requirement to .NET 2.0. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs mantisconnect/trunk/clients/dotnet/everything.build mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotify.csproj mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotifyForm.cs Modified: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj 2007-10-20 23:09:12 UTC (rev 145) @@ -37,6 +37,7 @@ <HintPath>Libs\Skybound.VisualStyles.dll</HintPath> </Reference> <Reference Include="System" /> + <Reference Include="System.configuration" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Web.Services" /> Modified: mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj 2007-10-20 23:09:12 UTC (rev 145) @@ -76,6 +76,7 @@ <Reference Include="System"> <Name>System</Name> </Reference> + <Reference Include="System.configuration" /> <Reference Include="System.Data"> <Name>System.Data</Name> </Reference> Modified: mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFiltersForm.cs 2007-10-20 23:09:12 UTC (rev 145) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004 Victor Boctor +#region Copyright \xA9 2004-2007 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -13,6 +13,7 @@ using System; using System.Drawing; using System.Collections; +using System.Collections.Specialized; using System.ComponentModel; using System.Configuration; using System.Data; @@ -31,6 +32,7 @@ private System.Windows.Forms.ComboBox filtersComboBox; private System.Windows.Forms.DataGrid dataGrid1; private System.Windows.Forms.Button getIssuesButton; + /// <summary> /// Required designer variable. /// </summary> @@ -131,26 +133,25 @@ { MessageBox.Show( ex.Message, "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); } - catch - { - MessageBox.Show( "Unknown Exception", "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); - } } private void MantisFiltersForm_Load(object sender, System.EventArgs e) { NetworkCredential nc = null; - string basicHttpAuthUserName = ConfigurationSettings.AppSettings["BasicHttpAuthUserName"]; - string basicHttpAuthPassword = ConfigurationSettings.AppSettings["BasicHttpAuthPassword"]; - if ( ( basicHttpAuthUserName != null ) && ( basicHttpAuthUserName.Length > 0 ) && ( basicHttpAuthPassword != null ) ) - nc = new NetworkCredential( basicHttpAuthUserName, basicHttpAuthPassword ); + NameValueCollection appSettings = ConfigurationManager.AppSettings; + string basicHttpAuthUserName = appSettings["BasicHttpAuthUserName"]; + string basicHttpAuthPassword = appSettings["BasicHttpAuthPassword"]; + if (!String.IsNullOrEmpty(basicHttpAuthUserName) && basicHttpAuthPassword != null) + { + nc = new NetworkCredential(basicHttpAuthUserName, basicHttpAuthPassword); + } - string mantisConnectUrl = ConfigurationSettings.AppSettings["MantisConnectUrl"]; - string mantisUserName = ConfigurationSettings.AppSettings["MantisUserName"]; - string mantisPassword = ConfigurationSettings.AppSettings["MantisPassword"]; + string mantisConnectUrl = appSettings["MantisConnectUrl"]; + string mantisUserName = appSettings["MantisUserName"]; + string mantisPassword = appSettings["MantisPassword"]; - session = new Session( mantisConnectUrl, mantisUserName, mantisPassword, nc ); + session = new Session(mantisConnectUrl, mantisUserName, mantisPassword, nc); session.Connect(); populating = true; Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/MantisSubmit.csproj 2007-10-20 23:09:12 UTC (rev 145) @@ -76,6 +76,7 @@ <Reference Include="System"> <Name>System</Name> </Reference> + <Reference Include="System.configuration" /> <Reference Include="System.Data"> <Name>System.Data</Name> </Reference> Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs 2007-10-20 23:09:12 UTC (rev 145) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004 Victor Boctor +#region Copyright \xA9 2004-2007 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -13,6 +13,7 @@ using System; using System.Drawing; using System.Collections; +using System.Collections.Specialized; using System.Configuration; using System.ComponentModel; using System.IO; @@ -403,17 +404,21 @@ { NetworkCredential nc = null; - string basicHttpAuthUserName = ConfigurationSettings.AppSettings["BasicHttpAuthUserName"]; - string basicHttpAuthPassword = ConfigurationSettings.AppSettings["BasicHttpAuthPassword"]; - if ( ( basicHttpAuthUserName != null ) && ( basicHttpAuthUserName.Length > 0 ) && ( basicHttpAuthPassword != null ) ) - nc = new NetworkCredential( basicHttpAuthUserName, basicHttpAuthPassword ); + NameValueCollection appSettings = ConfigurationManager.AppSettings; - string mantisConnectUrl = ConfigurationSettings.AppSettings["MantisConnectUrl"]; - string mantisUserName = ConfigurationSettings.AppSettings["MantisUserName"]; - string mantisPassword = ConfigurationSettings.AppSettings["MantisPassword"]; + string basicHttpAuthUserName = appSettings["BasicHttpAuthUserName"]; + string basicHttpAuthPassword = appSettings["BasicHttpAuthPassword"]; + if (!String.IsNullOrEmpty(basicHttpAuthUserName) && basicHttpAuthPassword != null) + { + nc = new NetworkCredential(basicHttpAuthUserName, basicHttpAuthPassword); + } - session = new Session( mantisConnectUrl, mantisUserName, mantisPassword, nc ); + string mantisConnectUrl = appSettings["MantisConnectUrl"]; + string mantisUserName = appSettings["MantisUserName"]; + string mantisPassword = appSettings["MantisPassword"]; + session = new Session(mantisConnectUrl, mantisUserName, mantisPassword, nc); + session.Connect(); populating = true; @@ -433,10 +438,6 @@ { MessageBox.Show( ex.Message, "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); } - catch - { - MessageBox.Show( "Unknown Exception", "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); - } } /// <summary> @@ -501,11 +502,6 @@ MessageBox.Show( ex.ToString(), "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); statusBar.Text = string.Empty; } - catch - { - MessageBox.Show( "Unknown Exception", "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); - statusBar.Text = string.Empty; - } } /// <summary> @@ -561,10 +557,6 @@ { MessageBox.Show( ex.Message, "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); } - catch - { - MessageBox.Show( "Unknown Exception", "Webservice Error", MessageBoxButtons.OK, MessageBoxIcon.Stop ); - } } /// <summary> Modified: mantisconnect/trunk/clients/dotnet/everything.build =================================================================== --- mantisconnect/trunk/clients/dotnet/everything.build 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/everything.build 2007-10-20 23:09:12 UTC (rev 145) @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <project name="MantisConnect" default="all"> - <property name="nant.settings.currentframework" value="net-1.1" /> + <property name="nant.settings.currentframework" value="net-2.0" /> <echo message="Using '${nant.settings.currentframework}' framework on '${nant.platform.name}' platform."/> @@ -52,16 +52,7 @@ </target> <target name="portability"> - <property name="nant.settings.currentframework" value="net-1.1" /> - <call target="all_using_dotnetframework" /> - - <property name="nant.settings.currentframework" value="net-1.0" /> - <call target="all_using_dotnetframework" /> - - <property name="nant.settings.currentframework" value="netcf-1.0" /> - <call target="all_using_dotnetframework" /> - <property name="nant.settings.currentframework" value="net-2.0" /> <call target="all_using_dotnetframework" /> </target> -</project> \ No newline at end of file +</project> Modified: mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotify.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotify.csproj 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotify.csproj 2007-10-20 23:09:12 UTC (rev 145) @@ -76,6 +76,7 @@ <Reference Include="System"> <Name>System</Name> </Reference> + <Reference Include="System.configuration" /> <Reference Include="System.Data"> <Name>System.Data</Name> </Reference> Modified: mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotifyForm.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotifyForm.cs 2007-10-20 22:06:19 UTC (rev 144) +++ mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotifyForm.cs 2007-10-20 23:09:12 UTC (rev 145) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004 Victor Boctor +#region Copyright \xA9 2004-2007 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -13,11 +13,12 @@ using System; using System.Drawing; using System.Collections; +using System.Collections.Specialized; using System.ComponentModel; -using System.Windows.Forms; +using System.Configuration; using System.Data; using System.Net; -using System.Configuration; +using System.Windows.Forms; using CustomUIControls; @@ -299,10 +300,11 @@ { Hide(); - checkMantisTimer.Interval = Convert.ToInt32( ConfigurationSettings.AppSettings["CheckForNewIssuesEverySecs"] ) * 1000; - timeToShowNotificationInMs = Convert.ToInt32( ConfigurationSettings.AppSettings["TimeToShowNotificationSecs"] ) * 1000; - timeToStayNotificationInMs = Convert.ToInt32( ConfigurationSettings.AppSettings["TimeToStayNotificationSecs"] ) * 1000;; - timeToHideNotificationInMs = Convert.ToInt32( ConfigurationSettings.AppSettings["TimeToHideNotificationSecs"] ) * 1000;; + NameValueCollection appSettings = ConfigurationManager.AppSettings; + checkMantisTimer.Interval = Convert.ToInt32(appSettings["CheckForNewIssuesEverySecs"]) * 1000; + timeToShowNotificationInMs = Convert.ToInt32(appSettings["TimeToShowNotificationSecs"]) * 1000; + timeToStayNotificationInMs = Convert.ToInt32(appSettings["TimeToStayNotificationSecs"]) * 1000; + timeToHideNotificationInMs = Convert.ToInt32(appSettings["TimeToHideNotificationSecs"]) * 1000; taskbarNotifier = new TaskbarNotifier(); taskbarNotifier.SetBackgroundBitmap( new Bitmap( GetType(), "skin.bmp"), Color.FromArgb( 255, 0, 255 ) ); @@ -326,14 +328,17 @@ { NetworkCredential nc = null; - string basicHttpAuthUserName = ConfigurationSettings.AppSettings["BasicHttpAuthUserName"]; - string basicHttpAuthPassword = ConfigurationSettings.AppSettings["BasicHttpAuthPassword"]; - if ( ( basicHttpAuthUserName != null ) && ( basicHttpAuthUserName.Length > 0 ) && ( basicHttpAuthPassword != null ) ) - nc = new NetworkCredential( basicHttpAuthUserName, basicHttpAuthPassword ); + NameValueCollection appSettings = ConfigurationManager.AppSettings; + string basicHttpAuthUserName = appSettings["BasicHttpAuthUserName"]; + string basicHttpAuthPassword = appSettings["BasicHttpAuthPassword"]; + if (!String.IsNullOrEmpty(basicHttpAuthUserName) && basicHttpAuthPassword != null) + { + nc = new NetworkCredential(basicHttpAuthUserName, basicHttpAuthPassword); + } - string mantisConnectUrl = ConfigurationSettings.AppSettings["MantisConnectUrl"]; - string mantisUserName = ConfigurationSettings.AppSettings["MantisUserName"]; - string mantisPassword = ConfigurationSettings.AppSettings["MantisPassword"]; + string mantisConnectUrl = appSettings["MantisConnectUrl"]; + string mantisUserName = appSettings["MantisUserName"]; + string mantisPassword = appSettings["MantisPassword"]; session = new Session( mantisConnectUrl, mantisUserName, mantisPassword, nc ); session.Connect(); @@ -357,7 +362,7 @@ private void TitleClick( object sender, EventArgs e ) { - string url = ConfigurationSettings.AppSettings["MantisConnectWebsite"]; + string url = ConfigurationManager.AppSettings["MantisConnectWebsite"]; if ( url != null ) { @@ -372,7 +377,7 @@ { get { - return ConfigurationSettings.AppSettings["BugtrackerUrl"]; + return ConfigurationManager.AppSettings["BugtrackerUrl"]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-10-20 22:06:23
|
Revision: 144 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=144&view=rev Author: vboctor Date: 2007-10-20 15:06:19 -0700 (Sat, 20 Oct 2007) Log Message: ----------- Fixed #350: Replace MantisEnum.Labels with MantisEnum.GetLabels() + several other enhancements Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs mantisconnect/trunk/clients/dotnet/UnitTests/RetrieveEnums.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Enumeration.cs Modified: mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs 2007-10-20 21:09:23 UTC (rev 143) +++ mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs 2007-10-20 22:06:19 UTC (rev 144) @@ -425,9 +425,9 @@ projectComboBox.SelectedIndex = 0; PopulateProjectDependentFields(); - priorityComboBox.DataSource = session.Config.PriorityEnum.Labels; - severityComboBox.DataSource = session.Config.SeverityEnum.Labels; - reproducibilityComboBox.DataSource = session.Config.ReproducibilityEnum.Labels; + priorityComboBox.DataSource = session.Config.PriorityEnum.GetLabels(); + severityComboBox.DataSource = session.Config.SeverityEnum.GetLabels(); + reproducibilityComboBox.DataSource = session.Config.ReproducibilityEnum.GetLabels(); } catch( Exception ex ) { Modified: mantisconnect/trunk/clients/dotnet/UnitTests/RetrieveEnums.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/RetrieveEnums.cs 2007-10-20 21:09:23 UTC (rev 143) +++ mantisconnect/trunk/clients/dotnet/UnitTests/RetrieveEnums.cs 2007-10-20 22:06:19 UTC (rev 144) @@ -11,6 +11,7 @@ #endregion using System; +using System.Collections.Generic; using System.Net; using System.Web.Services.Protocols; @@ -39,7 +40,7 @@ public void StatusEnum() { MantisEnum statusEnum = Session.Config.StatusEnum; - Assert.IsTrue( statusEnum.Labels.Length > 0 ); + Assert.IsTrue( statusEnum.Count > 0 ); WriteEnum( "Status", statusEnum ); } @@ -47,7 +48,7 @@ public void PriorityEnum() { MantisEnum priorityEnum = Session.Config.PriorityEnum; - Assert.IsTrue( priorityEnum.Labels.Length > 0 ); + Assert.IsTrue( priorityEnum.Count > 0 ); WriteEnum( "Priority", priorityEnum ); } @@ -55,7 +56,7 @@ public void SeverityEnum() { MantisEnum severityEnum = Session.Config.SeverityEnum; - Assert.IsTrue( severityEnum.Labels.Length > 0 ); + Assert.IsTrue( severityEnum.Count > 0 ); WriteEnum( "Severity", severityEnum ); } @@ -63,7 +64,7 @@ public void ProjectionEnum() { MantisEnum projectionEnum = Session.Config.ProjectionEnum; - Assert.IsTrue( projectionEnum.Labels.Length > 0 ); + Assert.IsTrue( projectionEnum.Count > 0 ); WriteEnum( "Projection", projectionEnum ); } @@ -71,7 +72,7 @@ public void EtaEnum() { MantisEnum etaEnum = Session.Config.EtaEnum; - Assert.IsTrue( etaEnum.Labels.Length > 0 ); + Assert.IsTrue( etaEnum.Count > 0 ); WriteEnum( "Eta", etaEnum ); } @@ -79,7 +80,7 @@ public void ReproducibilityEnum() { MantisEnum reproducibilityEnum = Session.Config.ReproducibilityEnum; - Assert.IsTrue( reproducibilityEnum.Labels.Length > 0 ); + Assert.IsTrue( reproducibilityEnum.Count > 0 ); WriteEnum( "Reproducibility", reproducibilityEnum ); } @@ -87,7 +88,7 @@ public void AccessLevelEnum() { MantisEnum accessLevelEnum = Session.Config.AccessLevelEnum; - Assert.IsTrue( accessLevelEnum.Labels.Length > 0 ); + Assert.IsTrue( accessLevelEnum.Count > 0 ); WriteEnum( "AccessLevel", accessLevelEnum ); } @@ -95,7 +96,7 @@ public void ResolutionEnum() { MantisEnum resolutionEnum = Session.Config.ResolutionEnum; - Assert.IsTrue( resolutionEnum.Labels.Length > 0 ); + Assert.IsTrue( resolutionEnum.Count > 0 ); WriteEnum( "Resolution", resolutionEnum ); } @@ -103,7 +104,7 @@ public void ViewStateEnum() { MantisEnum viewStateEnum = Session.Config.ViewStateEnum; - Assert.IsTrue( viewStateEnum.Labels.Length > 0 ); + Assert.IsTrue( viewStateEnum.Count > 0 ); WriteEnum( "ViewState", viewStateEnum ); } @@ -112,10 +113,12 @@ Console.WriteLine(); Console.WriteLine( enumType ); - string[] labels = mantisEnum.Labels; - - foreach( string label in labels ) - Console.WriteLine( label ); + ICollection<string> labels = mantisEnum.GetLabels(); + + foreach (string label in labels) + { + Console.WriteLine(label); + } } } } Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Enumeration.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Enumeration.cs 2007-10-20 21:09:23 UTC (rev 143) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Enumeration.cs 2007-10-20 22:06:19 UTC (rev 144) @@ -1,4 +1,4 @@ -#region Copyright \xA9 2004 Victor Boctor +#region Copyright \xA9 2004-2007 Victor Boctor // // MantisConnect is copyrighted to Victor Boctor // @@ -11,7 +11,8 @@ #endregion using System; -using System.Collections; +using System.Collections.Generic; +using System.Globalization; namespace Futureware.MantisConnect { @@ -25,33 +26,90 @@ public sealed class MantisEnum { /// <summary> + /// The enumeration string supplied at construction time. + /// </summary> + private readonly string enumeration; + + /// <summary> + /// A dictionary that maps labels to their corresponding code. + /// </summary> + private Dictionary<string, int> labelToCodeMap; + + /// <summary> + /// A dictionary that maps codes to their corresponding labels. + /// </summary> + private Dictionary<int, string> codeToLabelMap; + + /// <summary> /// Constructor /// </summary> /// <param name="enumeration">Enumeration string to work with.</param> - public MantisEnum( string enumeration ) + public MantisEnum(string enumeration) { + if (String.IsNullOrEmpty(enumeration)) + { + throw new ArgumentNullException(enumeration); + } + this.enumeration = enumeration; + + string[] entries = enumeration.Split(','); + + this.labelToCodeMap = new Dictionary<string, int>(entries.Length); + this.codeToLabelMap = new Dictionary<int, string>(entries.Length); + + int code; + string label; + + foreach (string entry in entries) + { + string[] details = entry.Split(':'); + if (details.Length != 2) + { + throw new FormatException(String.Format(CultureInfo.InvariantCulture, "Invalid enumeration '{0}'.", enumeration)); + } + + if (!Int32.TryParse(details[0].Trim(), out code)) + { + throw new FormatException(String.Format(CultureInfo.InvariantCulture, "Invalid code '{0}' in enumeration '{1}'.", details[0], enumeration)); + } + + label = details[1].Trim(); + if (label.Length == 0) + { + throw new FormatException(String.Format(CultureInfo.InvariantCulture, "Code '{0}' has an empty label in enumeration '{1}'", code, enumeration)); + } + + if (this.labelToCodeMap.ContainsKey(label)) + { + throw new FormatException(String.Format(CultureInfo.InvariantCulture, "Label '{0}' exists more than once in enumeration '{1}'", label, enumeration)); + } + + if (this.codeToLabelMap.ContainsKey(code)) + { + throw new FormatException(String.Format(CultureInfo.InvariantCulture, "Code '{0}' exists more than once in enumeration '{1}'", code, enumeration)); + } + + this.labelToCodeMap[label] = code; + this.codeToLabelMap[code] = label; + } } /// <summary> /// Given an id, this indexer returns the corresponding enumeration name. /// </summary> /// <param name="id">The enumeration value id.</param> - public string this [int id] + /// <returns>The enumeration label.</returns> + public string this[int id] { get { - string[] entries = enumeration.Split( ',' ); - - foreach ( string entry in entries ) + if (this.codeToLabelMap.ContainsKey(id)) { - string[] details = entry.Split( ':' ); - - if ( details[0] == id.ToString() ) - return details[1]; + return this.codeToLabelMap[id]; } - return string.Format( "@{0}@", id ); + return string.Format(CultureInfo.InvariantCulture, "@{0}@", id); } } @@ -59,18 +117,14 @@ /// Given a name, this indexer returns the corresponding enumeration id. /// </summary> /// <param name="name">The enumeration value name.</param> + /// <returns>The enumeration code.</returns> public int this [string name] { get { - string[] entries = enumeration.Split( ',' ); - - foreach ( string entry in entries ) + if (this.labelToCodeMap.ContainsKey(name)) { - string[] details = entry.Split( ':' ); - - if ( details[1] == name ) - return Convert.ToInt32( details[0] ); + return this.labelToCodeMap[name]; } return 0; @@ -78,32 +132,49 @@ } /// <summary> - /// Returns an array of strings containing the labels in the enumerations. + /// The number of values in the enumeration. /// </summary> - /// <value>Array of enumeration labels.</value> - public string[] Labels + public int Count { - get - { - string[] entries = enumeration.Split( ',' ); + get { return this.labelToCodeMap.Count; } + } - string[] labels = new string[ entries.Length ]; + /// <summary> + /// Returns a collection containing the labels in the enumeration. + /// </summary> + /// <returns>A collection of the labels.</returns> + public ICollection<string> GetLabels() + { + Dictionary<string, int>.KeyCollection keys = this.labelToCodeMap.Keys; - int i = 0; - foreach ( string entry in entries ) - { - string[] details = entry.Split( ':' ); - labels[i] = details[1]; - ++i; - } - - return labels; + string[] labels = new string[keys.Count]; + + int i = 0; + foreach ( string label in keys ) + { + labels[i++] = label; } + + return labels; } /// <summary> - /// The enumeration string supplied at construction time. + /// Returns a collection containing the codes in the enumeration. /// </summary> - private readonly string enumeration; + /// <returns>A collection of the codes.</returns> + public ICollection<int> GetCodes() + { + Dictionary<int, string>.KeyCollection keys = this.codeToLabelMap.Keys; + + int[] codes = new int[keys.Count]; + + int i = 0; + foreach (int code in keys) + { + codes[i++] = code; + } + + return codes; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-10-20 21:09:28
|
Revision: 143 http://mantisconnect.svn.sourceforge.net/mantisconnect/?rev=143&view=rev Author: vboctor Date: 2007-10-20 14:09:23 -0700 (Sat, 20 Oct 2007) Log Message: ----------- Fixed #349: Exception while typing the issue number Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/SendToMantis.cs Modified: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj 2007-07-16 03:43:38 UTC (rev 142) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj 2007-10-20 21:09:23 UTC (rev 143) @@ -39,6 +39,7 @@ <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> + <Reference Include="System.Web.Services" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> </ItemGroup> Modified: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs 2007-07-16 03:43:38 UTC (rev 142) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs 2007-10-20 21:09:23 UTC (rev 143) @@ -25,6 +25,7 @@ private string filePath; private ProcessImageHandler processImageHandler; private SentToMantisFormat sendToMantis; + private string issueIdBeingFetched; public delegate void ProcessImageHandler(int issueId, string filePath, string fileName, string note); @@ -97,7 +98,12 @@ private void issueIdTextBox_TextChanged(object sender, EventArgs e) { this.EnableControls(); - this.getIssueBackgroundWorker.RunWorkerAsync(); + + if (String.IsNullOrEmpty(this.issueIdBeingFetched)) + { + this.issueIdBeingFetched = this.issueIdTextBox.Text; + this.getIssueBackgroundWorker.RunWorkerAsync(); + } } /// <summary> @@ -132,7 +138,7 @@ this.issueSummaryTextBox.Text = "Retrieving issue summary..."; int issueId; - if (Int32.TryParse(this.issueIdTextBox.Text, out issueId)) + if (Int32.TryParse(this.issueIdBeingFetched, out issueId)) { e.Result = this.sendToMantis.GetIssueSummary(issueId); } @@ -145,6 +151,14 @@ private void getIssueBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { this.issueSummaryTextBox.Text = (string)e.Result; + + string temp = this.issueIdBeingFetched; + this.issueIdBeingFetched = null; + + if (!String.Equals(this.issueIdTextBox.Text, temp, StringComparison.OrdinalIgnoreCase)) + { + this.issueIdTextBox_TextChanged(this, null); + } } } } \ No newline at end of file Modified: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/SendToMantis.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/SendToMantis.cs 2007-07-16 03:43:38 UTC (rev 142) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/SendToMantis.cs 2007-10-20 21:09:23 UTC (rev 143) @@ -17,6 +17,7 @@ using System.IO; using System.Runtime.CompilerServices; using System.Text; +using System.Web.Services.Protocols; using System.Windows.Forms; using Fusion8.Cropper.Extensibility; @@ -87,10 +88,9 @@ string message = "Snapshot successfully uploaded"; MessageBox.Show(message, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); } - catch (Exception ex) + catch (SoapException ex) { MessageBox.Show(ex.Message, "Failure", MessageBoxButtons.OK, MessageBoxIcon.Error); - throw; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kin...@us...> - 2007-07-16 03:43:41
|
Revision: 142 http://svn.sourceforge.net/mantisconnect/?rev=142&view=rev Author: kingargyle1 Date: 2007-07-15 20:43:38 -0700 (Sun, 15 Jul 2007) Log Message: ----------- Property Changed: ---------------- mantisconnect/trunk/webservice/ Property changes on: mantisconnect/trunk/webservice ___________________________________________________________________ Name: svn:ignore + .project This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kin...@us...> - 2007-07-16 03:42:50
|
Revision: 141 http://svn.sourceforge.net/mantisconnect/?rev=141&view=rev Author: kingargyle1 Date: 2007-07-15 20:42:48 -0700 (Sun, 15 Jul 2007) Log Message: ----------- Issue 320: have mc_projects_get_user_accessible return an ALL PROJECTS record Implementation Modified Paths: -------------- mantisconnect/trunk/webservice/mc/mc_project_api.php Modified: mantisconnect/trunk/webservice/mc/mc_project_api.php =================================================================== --- mantisconnect/trunk/webservice/mc/mc_project_api.php 2007-07-11 19:13:10 UTC (rev 140) +++ mantisconnect/trunk/webservice/mc/mc_project_api.php 2007-07-16 03:42:48 UTC (rev 141) @@ -99,6 +99,17 @@ } $t_result = array(); + $t_result[] = array( + 'id'=>ALL_PROJECTS, + 'name'=>'*All Projects*', + 'status'=>array('id'=>50,'name'=>'stable'), + 'enabled'=>true, + 'view_state'=>array('id'=>10,'name'=>'public'), + 'access_min'=>array('id'=>10,'name'=>'viewer'), + 'file_path'=>'', + 'descriptionn'=>'All Projects Filter', + 'subprojects'=>array() + ); foreach( user_get_accessible_projects( $t_user_id ) as $t_project_id ) { $t_project_row = project_cache_row( $t_project_id ); $t_project = array(); @@ -482,7 +493,7 @@ $t_projects = array( $t_project_id ); } - $t_projects[] = ALL_PROJECTS; # add "ALL_PROJECTS to the list of projects to fetch + $t_projects[] = ALL_PROJECTS; # add ALL_PROJECTS to the list of projects to fetch $t_reqd_access = config_get( 'view_proj_doc_threshold' ); if ( is_array( $t_reqd_access ) ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kin...@us...> - 2007-07-11 19:13:15
|
Revision: 140 http://svn.sourceforge.net/mantisconnect/?rev=140&view=rev Author: kingargyle1 Date: 2007-07-11 12:13:10 -0700 (Wed, 11 Jul 2007) Log Message: ----------- Issue 337: Mantis defaults to ISO-8859-1 encoding instead of UTF-8 Modified Paths: -------------- mantisconnect/trunk/webservice/mc/mantisconnect.php Modified: mantisconnect/trunk/webservice/mc/mantisconnect.php =================================================================== --- mantisconnect/trunk/webservice/mc/mantisconnect.php 2007-05-30 06:17:55 UTC (rev 139) +++ mantisconnect/trunk/webservice/mc/mantisconnect.php 2007-07-11 19:13:10 UTC (rev 140) @@ -28,6 +28,14 @@ $l_oServer->debug_flag = false; $l_oServer->configureWSDL( 'MantisConnect', $t_namespace ); $l_oServer->wsdl->schemaTargetNamespace = $t_namespace; + // The following will make the default encoding UTF-8 instead of ISO-8859-1 + // WS-I Basic Profile requires UTF-8 or UTF-16 as the encoding for interoperabilty + // reasons. This will correctly handle a large number of languages besides English. + $l_oServer->xml_encoding = "UTF-8"; + $l_oServer->soap_defencoding = "UTF-8"; + $l_oServer->decode_utf8 = false; + + ### This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-05-30 06:17:56
|
Revision: 139 http://svn.sourceforge.net/mantisconnect/?rev=139&view=rev Author: vboctor Date: 2007-05-29 23:17:55 -0700 (Tue, 29 May 2007) Log Message: ----------- A cropper plug-in to upload screenshots to Mantis. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/MantisSubmit/SubmitIssue.cs mantisconnect/trunk/clients/dotnet/everything.sln Added Paths: ----------- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.Designer.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.resx mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Cropper.Extensibility.dll mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Skybound.VisualStyles.dll mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.Designer.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.resx mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectSettings.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Properties/ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Properties/AssemblyInfo.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.Designer.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.resx mantisconnect/trunk/clients/dotnet/Cropper.Mantis/SendToMantis.cs Property changes on: mantisconnect/trunk/clients/dotnet/Cropper.Mantis ___________________________________________________________________ Name: svn:ignore + bin obj *.user Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Cropper.Mantis.csproj 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,86 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{DC45223F-F5BC-4ED6-903C-343E4D70D155}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Cropper.Mantis</RootNamespace> + <AssemblyName>Cropper.Mantis</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Cropper.Extensibility, Version=1.9.1.89, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>Libs\Cropper.Extensibility.dll</HintPath> + </Reference> + <Reference Include="Skybound.VisualStyles, Version=2.0.0.0, Culture=neutral, PublicKeyToken=f2d73a45b3e75a83"> + <SpecificVersion>False</SpecificVersion> + <HintPath>Libs\Skybound.VisualStyles.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="MantisConnectOptionsForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="MantisConnectOptionsForm.Designer.cs"> + <DependentUpon>MantisConnectOptionsForm.cs</DependentUpon> + </Compile> + <Compile Include="MantisConnectSettings.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="ScreenshotDetailsForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="ScreenshotDetailsForm.Designer.cs"> + <DependentUpon>ScreenshotDetailsForm.cs</DependentUpon> + </Compile> + <Compile Include="SendToMantis.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\mantisconnect\MantisConnect.csproj"> + <Project>{F4391F6F-0239-48E2-B415-C39A6D920303}</Project> + <Name>MantisConnect</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="MantisConnectOptionsForm.resx"> + <SubType>Designer</SubType> + <DependentUpon>MantisConnectOptionsForm.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="ScreenshotDetailsForm.resx"> + <SubType>Designer</SubType> + <DependentUpon>ScreenshotDetailsForm.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.Designer.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.Designer.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.Designer.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,101 @@ +namespace Cropper.SendToFTP +{ + partial class FilenameInputDialog + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.btnOK = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.txtFilename = new System.Windows.Forms.TextBox(); + this.btnCancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // btnOK + // + this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; + this.btnOK.Location = new System.Drawing.Point(198, 39); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(75, 23); + this.btnOK.TabIndex = 1; + this.btnOK.Text = "OK"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(52, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Filename:"; + // + // txtFilename + // + this.txtFilename.Location = new System.Drawing.Point(72, 13); + this.txtFilename.Name = "txtFilename"; + this.txtFilename.Size = new System.Drawing.Size(201, 20); + this.txtFilename.TabIndex = 0; + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(117, 39); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 3; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + // + // FilenameInputDialog + // + this.AcceptButton = this.btnOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(282, 71); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.txtFilename); + this.Controls.Add(this.label1); + this.Controls.Add(this.btnOK); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "FilenameInputDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Input filename..."; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtFilename; + private System.Windows.Forms.Button btnCancel; + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Cropper.SendToFTP +{ + public partial class FilenameInputDialog : Form + { + private string _filename; + + public string Filename + { + get { return _filename; } + set { _filename = value; } + } + + + public FilenameInputDialog() + { + InitializeComponent(); + } + + private void btnOK_Click(object sender, EventArgs e) + { + this.Filename = txtFilename.Text; + base.Close(); + } + + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.resx =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.resx (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/FilenameInputDialog.resx 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Cropper.Extensibility.dll =================================================================== (Binary files differ) Property changes on: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Cropper.Extensibility.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Skybound.VisualStyles.dll =================================================================== (Binary files differ) Property changes on: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Libs/Skybound.VisualStyles.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.Designer.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.Designer.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.Designer.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,202 @@ +namespace Cropper.Mantis +{ + partial class MantisConnectOptionsForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.passwordTextBox = new System.Windows.Forms.TextBox(); + this.userNameTextBox = new System.Windows.Forms.TextBox(); + this.serverTextBox = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.themedTabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.SuspendLayout(); + // + // themedTabControl1 + // + this.themedTabControl1.Size = new System.Drawing.Size(324, 391); + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.label9); + this.tabPage1.Controls.Add(this.label8); + this.tabPage1.Controls.Add(this.label7); + this.tabPage1.Controls.Add(this.label6); + this.tabPage1.Controls.Add(this.label5); + this.tabPage1.Controls.Add(this.label4); + this.tabPage1.Controls.Add(this.passwordTextBox); + this.tabPage1.Controls.Add(this.userNameTextBox); + this.tabPage1.Controls.Add(this.serverTextBox); + this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.label2); + this.tabPage1.Controls.Add(this.label1); + this.tabPage1.Size = new System.Drawing.Size(316, 365); + // + // passwordTextBox + // + this.passwordTextBox.Location = new System.Drawing.Point(86, 120); + this.passwordTextBox.Name = "passwordTextBox"; + this.passwordTextBox.PasswordChar = '*'; + this.passwordTextBox.Size = new System.Drawing.Size(210, 20); + this.passwordTextBox.TabIndex = 11; + // + // userNameTextBox + // + this.userNameTextBox.Location = new System.Drawing.Point(86, 85); + this.userNameTextBox.Name = "userNameTextBox"; + this.userNameTextBox.Size = new System.Drawing.Size(210, 20); + this.userNameTextBox.TabIndex = 10; + // + // serverTextBox + // + this.serverTextBox.Location = new System.Drawing.Point(86, 32); + this.serverTextBox.Name = "serverTextBox"; + this.serverTextBox.Size = new System.Drawing.Size(210, 20); + this.serverTextBox.TabIndex = 9; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(9, 123); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(53, 13); + this.label3.TabIndex = 8; + this.label3.Text = "Password"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(9, 88); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(60, 13); + this.label2.TabIndex = 7; + this.label2.Text = "User Name"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(9, 32); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(38, 13); + this.label1.TabIndex = 6; + this.label1.Text = "Server"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(9, 55); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(297, 13); + this.label4.TabIndex = 12; + this.label4.Text = "e.g. http://www.example.com/mantis/mc/mantisconnect.php"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(9, 171); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(92, 13); + this.label5.TabIndex = 13; + this.label5.Text = "Dependencies:"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(9, 194); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(162, 13); + this.label6.TabIndex = 14; + this.label6.Text = "Mantis - http://www.mantisbt.org"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(9, 220); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(290, 13); + this.label7.TabIndex = 15; + this.label7.Text = "MantisConnect - http://www.futureware.biz/mantisconnect/"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.Location = new System.Drawing.Point(9, 249); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(55, 13); + this.label8.TabIndex = 16; + this.label8.Text = "License:"; + // + // label9 + // + this.label9.Location = new System.Drawing.Point(9, 271); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(290, 89); + this.label9.TabIndex = 17; + this.label9.Text = "The Mantis Cropper Plug-in is free for use for users with valid MantisConnect lic" + + "ense (see http://www.futureware.biz/mantisconnect/license.php)"; + // + // MantisConnectOptionsForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(324, 391); + this.Name = "MantisConnectOptionsForm"; + this.Text = "MantisConnectOptions"; + this.themedTabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TextBox passwordTextBox; + private System.Windows.Forms.TextBox userNameTextBox; + private System.Windows.Forms.TextBox serverTextBox; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label8; + + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,50 @@ +#region Copyright \xA9 2004-2007 Victor Boctor +// +// MantisConnect is copyrighted to Victor Boctor +// +// This program is distributed under the terms and conditions of the GPL +// See LICENSE file for details. +// +// For commercial applications to link with or modify MantisConnect, they require the +// purchase of a MantisConnect commerical license. +// +#endregion + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using Fusion8.Cropper.Extensibility; + +namespace Cropper.Mantis +{ + public partial class MantisConnectOptionsForm : BaseConfigurationForm + { + public MantisConnectOptionsForm() + { + InitializeComponent(); + } + + public string UserName + { + get { return this.userNameTextBox.Text; } + set { this.userNameTextBox.Text = value; } + } + + public string Password + { + get { return this.passwordTextBox.Text; } + set { this.passwordTextBox.Text = value; } + } + + public string Url + { + get { return this.serverTextBox.Text; } + set { this.serverTextBox.Text = value; } + } + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.resx =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.resx (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectOptionsForm.resx 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectSettings.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectSettings.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/MantisConnectSettings.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,52 @@ +#region Copyright \xA9 2004-2007 Victor Boctor +// +// MantisConnect is copyrighted to Victor Boctor +// +// This program is distributed under the terms and conditions of the GPL +// See LICENSE file for details. +// +// For commercial applications to link with or modify MantisConnect, they require the +// purchase of a MantisConnect commerical license. +// +#endregion + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Cropper.Mantis +{ + public class MantisConnectSettings + { + private string url = "http://localhost:8008/mantisbt/mc/mantisconnect.php"; + private string userName = "administrator"; + private string password = "root"; + + public string Url + { + get { return this.url; } + set { this.url = value; } + } + + public string UserName + { + get { return this.userName; } + set { this.userName = value; } + } + + public string Password + { + get { return this.password; } + set { this.password = value; } + } + + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("\nUrl:" + this.Url); + sb.Append("\nUserName:" + this.UserName); + sb.Append("\nPassword:" + this.Password); + return sb.ToString(); + } + } +} Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Properties/AssemblyInfo.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Properties/AssemblyInfo.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/Properties/AssemblyInfo.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,47 @@ +#region Copyright © 2004-2007 Victor Boctor +// +// MantisConnect is copyrighted to Victor Boctor +// +// This program is distributed under the terms and conditions of the GPL +// See LICENSE file for details. +// +// For commercial applications to link with or modify MantisConnect, they require the +// purchase of a MantisConnect commerical license. +// +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Mantis Cropper Plugin")] +[assembly: AssemblyDescription("A screen capture for Cropper")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Futureware")] +[assembly: AssemblyProduct("Mantis Cropper Plugin")] +[assembly: AssemblyCopyright("Copyright © Futureware 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("716c3ffb-a0e2-4bcc-84f0-d12cefbd2f06")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.Designer.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.Designer.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.Designer.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,196 @@ +namespace Cropper.Mantis +{ + partial class ScreenshotDetailsForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.issueIdTextBox = new System.Windows.Forms.TextBox(); + this.fileNameTextBox = new System.Windows.Forms.TextBox(); + this.uploadToMantisButton = new System.Windows.Forms.Button(); + this.cancelButton = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.noteTextBox = new System.Windows.Forms.TextBox(); + this.issueSummaryTextBox = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.getIssueBackgroundWorker = new System.ComponentModel.BackgroundWorker(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 18); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(42, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Issue #"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 47); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(54, 13); + this.label2.TabIndex = 2; + this.label2.Text = "File Name"; + // + // issueIdTextBox + // + this.issueIdTextBox.Location = new System.Drawing.Point(96, 18); + this.issueIdTextBox.Name = "issueIdTextBox"; + this.issueIdTextBox.Size = new System.Drawing.Size(100, 20); + this.issueIdTextBox.TabIndex = 1; + this.issueIdTextBox.TextChanged += new System.EventHandler(this.issueIdTextBox_TextChanged); + // + // fileNameTextBox + // + this.fileNameTextBox.Location = new System.Drawing.Point(96, 44); + this.fileNameTextBox.Name = "fileNameTextBox"; + this.fileNameTextBox.Size = new System.Drawing.Size(141, 20); + this.fileNameTextBox.TabIndex = 3; + this.fileNameTextBox.TextChanged += new System.EventHandler(this.fileNameTextBox_TextChanged); + // + // uploadToMantisButton + // + this.uploadToMantisButton.DialogResult = System.Windows.Forms.DialogResult.OK; + this.uploadToMantisButton.Enabled = false; + this.uploadToMantisButton.Location = new System.Drawing.Point(139, 318); + this.uploadToMantisButton.Name = "uploadToMantisButton"; + this.uploadToMantisButton.Size = new System.Drawing.Size(121, 23); + this.uploadToMantisButton.TabIndex = 9; + this.uploadToMantisButton.Text = "Upload to Mantis"; + this.uploadToMantisButton.UseVisualStyleBackColor = true; + this.uploadToMantisButton.Click += new System.EventHandler(this.uploadToMantisButton_Click); + // + // cancelButton + // + this.cancelButton.CausesValidation = false; + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Location = new System.Drawing.Point(288, 318); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(110, 23); + this.cancelButton.TabIndex = 10; + this.cancelButton.Text = "Cancel"; + this.cancelButton.UseVisualStyleBackColor = true; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(234, 47); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(24, 13); + this.label3.TabIndex = 4; + this.label3.Text = ".jpg"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(12, 96); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(78, 13); + this.label4.TabIndex = 7; + this.label4.Text = "Note (Optional)"; + // + // noteTextBox + // + this.noteTextBox.AcceptsReturn = true; + this.noteTextBox.Location = new System.Drawing.Point(96, 96); + this.noteTextBox.Multiline = true; + this.noteTextBox.Name = "noteTextBox"; + this.noteTextBox.Size = new System.Drawing.Size(454, 203); + this.noteTextBox.TabIndex = 8; + // + // issueSummaryTextBox + // + this.issueSummaryTextBox.Location = new System.Drawing.Point(96, 70); + this.issueSummaryTextBox.Name = "issueSummaryTextBox"; + this.issueSummaryTextBox.ReadOnly = true; + this.issueSummaryTextBox.Size = new System.Drawing.Size(454, 20); + this.issueSummaryTextBox.TabIndex = 6; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(12, 73); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(78, 13); + this.label5.TabIndex = 5; + this.label5.Text = "Issue Summary"; + // + // getIssueBackgroundWorker + // + this.getIssueBackgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.getIssueBackgroundWorker_DoWork); + this.getIssueBackgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.getIssueBackgroundWorker_RunWorkerCompleted); + // + // ScreenshotDetailsForm + // + this.AcceptButton = this.uploadToMantisButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelButton; + this.ClientSize = new System.Drawing.Size(562, 353); + this.ControlBox = false; + this.Controls.Add(this.issueSummaryTextBox); + this.Controls.Add(this.label5); + this.Controls.Add(this.noteTextBox); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.uploadToMantisButton); + this.Controls.Add(this.fileNameTextBox); + this.Controls.Add(this.issueIdTextBox); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "ScreenshotDetailsForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Screenshot Details"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox issueIdTextBox; + private System.Windows.Forms.TextBox fileNameTextBox; + private System.Windows.Forms.Button uploadToMantisButton; + private System.Windows.Forms.Button cancelButton; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox noteTextBox; + private System.Windows.Forms.TextBox issueSummaryTextBox; + private System.Windows.Forms.Label label5; + private System.ComponentModel.BackgroundWorker getIssueBackgroundWorker; + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.cs 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,150 @@ +#region Copyright \xA9 2004-2007 Victor Boctor +// +// MantisConnect is copyrighted to Victor Boctor +// +// This program is distributed under the terms and conditions of the GPL +// See LICENSE file for details. +// +// For commercial applications to link with or modify MantisConnect, they require the +// purchase of a MantisConnect commerical license. +// +#endregion + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Cropper.Mantis +{ + public partial class ScreenshotDetailsForm : Form + { + private string filePath; + private ProcessImageHandler processImageHandler; + private SentToMantisFormat sendToMantis; + + public delegate void ProcessImageHandler(int issueId, string filePath, string fileName, string note); + + /// <summary> + /// The constructor for the screenshot details form. + /// </summary> + /// <param name="filePath">The full file path of the screenshot.</param> + public ScreenshotDetailsForm(SentToMantisFormat sendToMantis, ProcessImageHandler processImageHandler, string filePath) + { + if (sendToMantis == null) + { + throw new ArgumentNullException("sendToMantis"); + } + + if (processImageHandler == null) + { + throw new ArgumentNullException("processImageHandler"); + } + + if (filePath == null) + { + throw new ArgumentNullException("filePath"); + } + + this.processImageHandler = processImageHandler; + this.filePath = filePath; + this.sendToMantis = sendToMantis; + + InitializeComponent(); + } + + /// <summary> + /// The file name dot extension that will appear on the View Issue page next to the screen capture. + /// </summary> + private string FileName + { + get + { + return this.fileNameTextBox.Text + ".jpg"; + } + } + + /// <summary> + /// The id of the issue that the screen capture will be attached to. + /// </summary> + private int IssueId + { + get + { + return int.Parse(this.issueIdTextBox.Text.Trim()); + } + } + + /// <summary> + /// The note to add along with attaching the screen capture. If empty, then no note will be added. + /// </summary> + private string Note + { + get + { + return this.noteTextBox.Text.Trim(); + } + } + + /// <summary> + /// Triggered when the issue id text box is modified. It enables/disables controls as appropriate. + /// </summary> + /// <param name="sender">not used</param> + /// <param name="e">not used</param> + private void issueIdTextBox_TextChanged(object sender, EventArgs e) + { + this.EnableControls(); + this.getIssueBackgroundWorker.RunWorkerAsync(); + } + + /// <summary> + /// Triggered when the file name is modified. It enables/disables controls as appropriate. + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void fileNameTextBox_TextChanged(object sender, EventArgs e) + { + this.EnableControls(); + } + + /// <summary> + /// A helper method that is called from events to enable/disable controls based on the data + /// entered by the user. + /// </summary> + private void EnableControls() + { + int issueId; + this.uploadToMantisButton.Enabled = this.fileNameTextBox.Text.Trim().Length > 0 && + this.issueIdTextBox.Text.Trim().Length > 0 && + Int32.TryParse(this.issueIdTextBox.Text, out issueId); + } + + private void uploadToMantisButton_Click(object sender, EventArgs e) + { + this.processImageHandler(this.IssueId, this.filePath, this.FileName, this.Note); + } + + private void getIssueBackgroundWorker_DoWork(object sender, DoWorkEventArgs e) + { + this.issueSummaryTextBox.Text = "Retrieving issue summary..."; + + int issueId; + if (Int32.TryParse(this.issueIdTextBox.Text, out issueId)) + { + e.Result = this.sendToMantis.GetIssueSummary(issueId); + } + else + { + e.Result = "<invalid issue id>"; + } + } + + private void getIssueBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) + { + this.issueSummaryTextBox.Text = (string)e.Result; + } + } +} \ No newline at end of file Added: mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.resx =================================================================== --- mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.resx (rev 0) +++ mantisconnect/trunk/clients/dotnet/Cropper.Mantis/ScreenshotDetailsForm.resx 2007-05-30 06:17:55 UTC (rev 139) @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + ... [truncated message content] |
From: <vb...@us...> - 2007-05-30 06:13:26
|
Revision: 138 http://svn.sourceforge.net/mantisconnect/?rev=138&view=rev Author: vboctor Date: 2007-05-29 23:13:20 -0700 (Tue, 29 May 2007) Log Message: ----------- Adding MimeTypes.cs which is referenced by the MantisConnect project. Added Paths: ----------- mantisconnect/trunk/clients/dotnet/mantisconnect/MimeTypes.cs Added: mantisconnect/trunk/clients/dotnet/mantisconnect/MimeTypes.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/MimeTypes.cs (rev 0) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/MimeTypes.cs 2007-05-30 06:13:20 UTC (rev 138) @@ -0,0 +1,602 @@ +using System; +using System.Collections; +using System.Text; + +namespace Futureware.MantisConnect +{ + internal sealed class HashtableUtil + { + public static void Add(Hashtable ht, string key, string value) + { + if (!ht.ContainsKey(ht)) + { + ht[key] = value; + } + } + } + + /// <summary> + /// A utility class that maps file extensions to mime types. + /// </summary> + public sealed class MimeTypes + { + private static Hashtable mimeTypes; + private const string DefaultMimeType = "application/octet-stream"; + + static MimeTypes() + { + mimeTypes = new Hashtable(1024); + + HashtableUtil.Add(mimeTypes, ".3dm", "x-world/x-3dmf"); + HashtableUtil.Add(mimeTypes, ".3dmf", "x-world/x-3dmf"); + HashtableUtil.Add(mimeTypes, ".a", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".aab", "application/x-authorware-bin"); + HashtableUtil.Add(mimeTypes, ".aam", "application/x-authorware-map"); + HashtableUtil.Add(mimeTypes, ".aas", "application/x-authorware-seg"); + HashtableUtil.Add(mimeTypes, ".abc", "text/vnd.abc"); + HashtableUtil.Add(mimeTypes, ".acgi", "text/html"); + HashtableUtil.Add(mimeTypes, ".afl", "video/animaflex"); + HashtableUtil.Add(mimeTypes, ".ai", "application/postscript"); + HashtableUtil.Add(mimeTypes, ".aif", "audio/aiff"); + HashtableUtil.Add(mimeTypes, ".aifc", "audio/aiff"); + HashtableUtil.Add(mimeTypes, ".aiff", "audio/aiff"); + HashtableUtil.Add(mimeTypes, ".aim", "application/x-aim"); + HashtableUtil.Add(mimeTypes, ".aip", "text/x-audiosoft-intra"); + HashtableUtil.Add(mimeTypes, ".ani", "application/x-navi-animation"); + HashtableUtil.Add(mimeTypes, ".aos", "application/x-nokia-9000-communicator-add-on-software"); + HashtableUtil.Add(mimeTypes, ".aps", "application/mime"); + HashtableUtil.Add(mimeTypes, ".arc", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".arj", "application/arj"); + HashtableUtil.Add(mimeTypes, ".art", "image/x-jg"); + HashtableUtil.Add(mimeTypes, ".asf", "video/x-ms-asf"); + HashtableUtil.Add(mimeTypes, ".asm", "text/x-asm"); + HashtableUtil.Add(mimeTypes, ".asp", "text/asp"); + HashtableUtil.Add(mimeTypes, ".asx", "video/x-ms-asf"); + HashtableUtil.Add(mimeTypes, ".au", "audio/x-au"); + HashtableUtil.Add(mimeTypes, ".avi", "video/avi"); + HashtableUtil.Add(mimeTypes, ".bcpio", "application/x-bcpio"); + HashtableUtil.Add(mimeTypes, ".bin", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".bm", "image/bmp"); + HashtableUtil.Add(mimeTypes, ".bmp", "image/bmp"); + HashtableUtil.Add(mimeTypes, ".boo", "application/book"); + HashtableUtil.Add(mimeTypes, ".book", "application/book"); + HashtableUtil.Add(mimeTypes, ".boz", "application/x-bzip2"); + HashtableUtil.Add(mimeTypes, ".bsh", "application/x-bsh"); + HashtableUtil.Add(mimeTypes, ".bz", "application/x-bzip"); + HashtableUtil.Add(mimeTypes, ".bz2", "application/x-bzip2"); + HashtableUtil.Add(mimeTypes, ".c", "text/plain"); + HashtableUtil.Add(mimeTypes, ".c++", "text/plain"); + HashtableUtil.Add(mimeTypes, ".cat", "application/vnd.ms-pki.seccat"); + HashtableUtil.Add(mimeTypes, ".cc", "text/plain"); + HashtableUtil.Add(mimeTypes, ".ccad", "application/clariscad"); + HashtableUtil.Add(mimeTypes, ".cco", "application/x-cocoa"); + HashtableUtil.Add(mimeTypes, ".cdf", "application/cdf"); + HashtableUtil.Add(mimeTypes, ".cer", "application/x-x509-ca-cert"); + HashtableUtil.Add(mimeTypes, ".cha", "application/x-chat"); + HashtableUtil.Add(mimeTypes, ".chat", "application/x-chat"); + HashtableUtil.Add(mimeTypes, ".class", "application/java"); + HashtableUtil.Add(mimeTypes, ".com", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".com", "text/plain"); + HashtableUtil.Add(mimeTypes, ".conf", "text/plain"); + HashtableUtil.Add(mimeTypes, ".cpio", "application/x-cpio"); + HashtableUtil.Add(mimeTypes, ".cpp", "text/x-c"); + HashtableUtil.Add(mimeTypes, ".cpt", "application/x-compactpro"); + HashtableUtil.Add(mimeTypes, ".cpt", "application/x-cpt"); + HashtableUtil.Add(mimeTypes, ".crl", "application/pkcs-crl"); + HashtableUtil.Add(mimeTypes, ".crt", "application/x-x509-ca-cert"); + HashtableUtil.Add(mimeTypes, ".csh", "application/x-csh"); + HashtableUtil.Add(mimeTypes, ".css", "application/x-pointplus"); + HashtableUtil.Add(mimeTypes, ".css", "text/css"); + HashtableUtil.Add(mimeTypes, ".cxx", "text/plain"); + HashtableUtil.Add(mimeTypes, ".dcr", "application/x-director"); + HashtableUtil.Add(mimeTypes, ".deepv", "application/x-deepv"); + HashtableUtil.Add(mimeTypes, ".def", "text/plain"); + HashtableUtil.Add(mimeTypes, ".der", "application/x-x509-ca-cert"); + HashtableUtil.Add(mimeTypes, ".dif", "video/x-dv"); + HashtableUtil.Add(mimeTypes, ".dir", "application/x-director"); + HashtableUtil.Add(mimeTypes, ".dl", "video/dl"); + HashtableUtil.Add(mimeTypes, ".doc", "application/msword"); + HashtableUtil.Add(mimeTypes, ".dot", "application/msword"); + HashtableUtil.Add(mimeTypes, ".dp", "application/commonground"); + HashtableUtil.Add(mimeTypes, ".drw", "application/drafting"); + HashtableUtil.Add(mimeTypes, ".dump", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".dv", "video/x-dv"); + HashtableUtil.Add(mimeTypes, ".dvi", "application/x-dvi"); + HashtableUtil.Add(mimeTypes, ".dwf", "model/vnd.dwf"); + HashtableUtil.Add(mimeTypes, ".dwg", "application/acad"); + HashtableUtil.Add(mimeTypes, ".dxf", "application/dxf"); + HashtableUtil.Add(mimeTypes, ".dxr", "application/x-director"); + HashtableUtil.Add(mimeTypes, ".el", "text/x-script.elisp"); + HashtableUtil.Add(mimeTypes, ".elc", "application/x-elc"); + HashtableUtil.Add(mimeTypes, ".env", "application/x-envoy"); + HashtableUtil.Add(mimeTypes, ".eps", "application/postscript"); + HashtableUtil.Add(mimeTypes, ".es", "application/x-esrehber"); + HashtableUtil.Add(mimeTypes, ".etx", "text/x-setext"); + HashtableUtil.Add(mimeTypes, ".evy", "application/envoy"); + HashtableUtil.Add(mimeTypes, ".exe", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".f", "text/plain"); + HashtableUtil.Add(mimeTypes, ".f77", "text/x-fortran"); + HashtableUtil.Add(mimeTypes, ".f90", "text/plain"); + HashtableUtil.Add(mimeTypes, ".f90", "text/x-fortran"); + HashtableUtil.Add(mimeTypes, ".fdf", "application/vnd.fdf"); + HashtableUtil.Add(mimeTypes, ".fif", "application/fractals"); + HashtableUtil.Add(mimeTypes, ".fli", "video/fli"); + HashtableUtil.Add(mimeTypes, ".flo", "image/florian"); + HashtableUtil.Add(mimeTypes, ".flx", "text/vnd.fmi.flexstor"); + HashtableUtil.Add(mimeTypes, ".fmf", "video/x-atomic3d-feature"); + HashtableUtil.Add(mimeTypes, ".for", "text/plain"); + HashtableUtil.Add(mimeTypes, ".fpx", "image/vnd.fpx"); + HashtableUtil.Add(mimeTypes, ".fpx", "image/vnd.net-fpx"); + HashtableUtil.Add(mimeTypes, ".frl", "application/freeloader"); + HashtableUtil.Add(mimeTypes, ".funk", "audio/make"); + HashtableUtil.Add(mimeTypes, ".g", "text/plain"); + HashtableUtil.Add(mimeTypes, ".g3", "image/g3fax"); + HashtableUtil.Add(mimeTypes, ".gif", "image/gif"); + HashtableUtil.Add(mimeTypes, ".gl", "video/gl"); + HashtableUtil.Add(mimeTypes, ".gsd", "audio/x-gsm"); + HashtableUtil.Add(mimeTypes, ".gsm", "audio/x-gsm"); + HashtableUtil.Add(mimeTypes, ".gsp", "application/x-gsp"); + HashtableUtil.Add(mimeTypes, ".gss", "application/x-gss"); + HashtableUtil.Add(mimeTypes, ".gtar", "application/x-gtar"); + HashtableUtil.Add(mimeTypes, ".gz", "application/x-gzip"); + HashtableUtil.Add(mimeTypes, ".gzip", "application/x-gzip"); + HashtableUtil.Add(mimeTypes, ".h", "text/plain"); + HashtableUtil.Add(mimeTypes, ".hdf", "application/x-hdf"); + HashtableUtil.Add(mimeTypes, ".help", "application/x-helpfile"); + HashtableUtil.Add(mimeTypes, ".hgl", "application/vnd.hp-hpgl"); + HashtableUtil.Add(mimeTypes, ".hh", "text/plain"); + HashtableUtil.Add(mimeTypes, ".hlb", "text/x-script"); + HashtableUtil.Add(mimeTypes, ".hlp", "application/hlp"); + HashtableUtil.Add(mimeTypes, ".hpg", "application/vnd.hp-hpgl"); + HashtableUtil.Add(mimeTypes, ".hpgl", "application/vnd.hp-hpgl"); + HashtableUtil.Add(mimeTypes, ".hqx", "application/binhex"); + HashtableUtil.Add(mimeTypes, ".hta", "application/hta"); + HashtableUtil.Add(mimeTypes, ".htc", "text/x-component"); + HashtableUtil.Add(mimeTypes, ".htm", "text/html"); + HashtableUtil.Add(mimeTypes, ".html", "text/html"); + HashtableUtil.Add(mimeTypes, ".htmls", "text/html"); + HashtableUtil.Add(mimeTypes, ".htt", "text/webviewhtml"); + HashtableUtil.Add(mimeTypes, ".htx", "text/html"); + HashtableUtil.Add(mimeTypes, ".ice", "x-conference/x-cooltalk"); + HashtableUtil.Add(mimeTypes, ".ico", "image/x-icon"); + HashtableUtil.Add(mimeTypes, ".idc", "text/plain"); + HashtableUtil.Add(mimeTypes, ".ief", "image/ief"); + HashtableUtil.Add(mimeTypes, ".iefs", "image/ief"); + HashtableUtil.Add(mimeTypes, ".iges", "application/iges"); + HashtableUtil.Add(mimeTypes, ".igs", "application/iges"); + HashtableUtil.Add(mimeTypes, ".ima", "application/x-ima"); + HashtableUtil.Add(mimeTypes, ".imap", "application/x-httpd-imap"); + HashtableUtil.Add(mimeTypes, ".inf", "application/inf"); + HashtableUtil.Add(mimeTypes, ".ins", "application/x-internett-signup"); + HashtableUtil.Add(mimeTypes, ".ip", "application/x-ip2"); + HashtableUtil.Add(mimeTypes, ".isu", "video/x-isvideo"); + HashtableUtil.Add(mimeTypes, ".it", "audio/it"); + HashtableUtil.Add(mimeTypes, ".iv", "application/x-inventor"); + HashtableUtil.Add(mimeTypes, ".ivr", "i-world/i-vrml"); + HashtableUtil.Add(mimeTypes, ".ivy", "application/x-livescreen"); + HashtableUtil.Add(mimeTypes, ".jam", "audio/x-jam"); + HashtableUtil.Add(mimeTypes, ".jav", "text/plain"); + HashtableUtil.Add(mimeTypes, ".java", "text/plain"); + HashtableUtil.Add(mimeTypes, ".jcm", "application/x-java-commerce"); + HashtableUtil.Add(mimeTypes, ".jfif", "image/jpeg"); + HashtableUtil.Add(mimeTypes, ".jfif-tbnl", "image/jpeg"); + HashtableUtil.Add(mimeTypes, ".jpe", "image/jpeg"); + HashtableUtil.Add(mimeTypes, ".jpeg", "image/jpeg"); + HashtableUtil.Add(mimeTypes, ".jpg", "image/jpeg"); + HashtableUtil.Add(mimeTypes, ".jps", "image/x-jps"); + HashtableUtil.Add(mimeTypes, ".js", "application/x-javascript"); + HashtableUtil.Add(mimeTypes, ".jut", "image/jutvision"); + HashtableUtil.Add(mimeTypes, ".kar", "audio/midi"); + HashtableUtil.Add(mimeTypes, ".ksh", "application/x-ksh"); + HashtableUtil.Add(mimeTypes, ".la", "audio/nspaudio"); + HashtableUtil.Add(mimeTypes, ".lam", "audio/x-liveaudio"); + HashtableUtil.Add(mimeTypes, ".latex", "application/x-latex"); + HashtableUtil.Add(mimeTypes, ".lha", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".lhx", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".list", "text/plain"); + HashtableUtil.Add(mimeTypes, ".lma", "audio/nspaudio"); + HashtableUtil.Add(mimeTypes, ".lma", "audio/x-nspaudio"); + HashtableUtil.Add(mimeTypes, ".log", "text/plain"); + HashtableUtil.Add(mimeTypes, ".lsp", "application/x-lisp"); + HashtableUtil.Add(mimeTypes, ".lst", "text/plain"); + HashtableUtil.Add(mimeTypes, ".lsx", "text/x-la-asf"); + HashtableUtil.Add(mimeTypes, ".ltx", "application/x-latex"); + HashtableUtil.Add(mimeTypes, ".lzh", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".lzx", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".m", "text/plain"); + HashtableUtil.Add(mimeTypes, ".m", "text/x-m"); + HashtableUtil.Add(mimeTypes, ".m1v", "video/mpeg"); + HashtableUtil.Add(mimeTypes, ".m2a", "audio/mpeg"); + HashtableUtil.Add(mimeTypes, ".m2v", "video/mpeg"); + HashtableUtil.Add(mimeTypes, ".m3u", "audio/x-mpequrl"); + HashtableUtil.Add(mimeTypes, ".man", "application/x-troff-man"); + HashtableUtil.Add(mimeTypes, ".map", "application/x-navimap"); + HashtableUtil.Add(mimeTypes, ".mar", "text/plain"); + HashtableUtil.Add(mimeTypes, ".mbd", "application/mbedlet"); + HashtableUtil.Add(mimeTypes, ".mc$", "application/x-magic-cap-package-1.0"); + HashtableUtil.Add(mimeTypes, ".mcd", "application/mcad"); + HashtableUtil.Add(mimeTypes, ".mcf", "image/vasa"); + HashtableUtil.Add(mimeTypes, ".mcp", "application/netmc"); + HashtableUtil.Add(mimeTypes, ".me", "application/x-troff-me"); + HashtableUtil.Add(mimeTypes, ".mht", "message/rfc822"); + HashtableUtil.Add(mimeTypes, ".mhtml", "message/rfc822"); + HashtableUtil.Add(mimeTypes, ".mid", "application/x-midi"); + HashtableUtil.Add(mimeTypes, ".mid", "audio/midi"); + HashtableUtil.Add(mimeTypes, ".midi", "audio/midi"); + HashtableUtil.Add(mimeTypes, ".mif", "application/x-frame"); + HashtableUtil.Add(mimeTypes, ".mime", "www/mime"); + HashtableUtil.Add(mimeTypes, ".mjf", "audio/x-vnd.audioexplosion.mjuicemediafile"); + HashtableUtil.Add(mimeTypes, ".mjpg", "video/x-motion-jpeg"); + HashtableUtil.Add(mimeTypes, ".mm", "application/base64"); + HashtableUtil.Add(mimeTypes, ".mme", "application/base64"); + HashtableUtil.Add(mimeTypes, ".mod", "audio/mod"); + HashtableUtil.Add(mimeTypes, ".moov", "video/quicktime"); + HashtableUtil.Add(mimeTypes, ".mov", "video/quicktime"); + HashtableUtil.Add(mimeTypes, ".movie", "video/x-sgi-movie"); + HashtableUtil.Add(mimeTypes, ".mp2", "audio/mpeg"); + HashtableUtil.Add(mimeTypes, ".mp3", "audio/mpeg3"); + HashtableUtil.Add(mimeTypes, ".mpa", "audio/mpeg"); + HashtableUtil.Add(mimeTypes, ".mpc", "application/x-project"); + HashtableUtil.Add(mimeTypes, ".mpe", "video/mpeg"); + HashtableUtil.Add(mimeTypes, ".mpeg", "video/mpeg"); + HashtableUtil.Add(mimeTypes, ".mpg", "video/mpeg"); + HashtableUtil.Add(mimeTypes, ".mpga", "audio/mpeg"); + HashtableUtil.Add(mimeTypes, ".mpp", "application/vnd.ms-project"); + HashtableUtil.Add(mimeTypes, ".mpt", "application/x-project"); + HashtableUtil.Add(mimeTypes, ".mpv", "application/x-project"); + HashtableUtil.Add(mimeTypes, ".mpx", "application/x-project"); + HashtableUtil.Add(mimeTypes, ".mrc", "application/marc"); + HashtableUtil.Add(mimeTypes, ".ms", "application/x-troff-ms"); + HashtableUtil.Add(mimeTypes, ".mv", "video/x-sgi-movie"); + HashtableUtil.Add(mimeTypes, ".my", "audio/make"); + HashtableUtil.Add(mimeTypes, ".mzz", "application/x-vnd.audioexplosion.mzz"); + HashtableUtil.Add(mimeTypes, ".nap", "image/naplps"); + HashtableUtil.Add(mimeTypes, ".naplps", "image/naplps"); + HashtableUtil.Add(mimeTypes, ".nc", "application/x-netcdf"); + HashtableUtil.Add(mimeTypes, ".ncm", "application/vnd.nokia.configuration-message"); + HashtableUtil.Add(mimeTypes, ".nif", "image/x-niff"); + HashtableUtil.Add(mimeTypes, ".niff", "image/x-niff"); + HashtableUtil.Add(mimeTypes, ".nix", "application/x-mix-transfer"); + HashtableUtil.Add(mimeTypes, ".nsc", "application/x-conference"); + HashtableUtil.Add(mimeTypes, ".nvd", "application/x-navidoc"); + HashtableUtil.Add(mimeTypes, ".o", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".oda", "application/oda"); + HashtableUtil.Add(mimeTypes, ".omc", "application/x-omc"); + HashtableUtil.Add(mimeTypes, ".omcd", "application/x-omcdatamaker"); + HashtableUtil.Add(mimeTypes, ".omcr", "application/x-omcregerator"); + HashtableUtil.Add(mimeTypes, ".p", "text/x-pascal"); + HashtableUtil.Add(mimeTypes, ".p10", "application/pkcs10"); + HashtableUtil.Add(mimeTypes, ".p10", "application/x-pkcs10"); + HashtableUtil.Add(mimeTypes, ".p12", "application/pkcs-12"); + HashtableUtil.Add(mimeTypes, ".p12", "application/x-pkcs12"); + HashtableUtil.Add(mimeTypes, ".p7a", "application/x-pkcs7-signature"); + HashtableUtil.Add(mimeTypes, ".p7c", "application/pkcs7-mime"); + HashtableUtil.Add(mimeTypes, ".p7c", "application/x-pkcs7-mime"); + HashtableUtil.Add(mimeTypes, ".p7m", "application/pkcs7-mime"); + HashtableUtil.Add(mimeTypes, ".p7m", "application/x-pkcs7-mime"); + HashtableUtil.Add(mimeTypes, ".p7r", "application/x-pkcs7-certreqresp"); + HashtableUtil.Add(mimeTypes, ".p7s", "application/pkcs7-signature"); + HashtableUtil.Add(mimeTypes, ".part", "application/pro_eng"); + HashtableUtil.Add(mimeTypes, ".pas", "text/pascal"); + HashtableUtil.Add(mimeTypes, ".pbm", "image/x-portable-bitmap"); + HashtableUtil.Add(mimeTypes, ".pcl", "application/vnd.hp-pcl"); + HashtableUtil.Add(mimeTypes, ".pcl", "application/x-pcl"); + HashtableUtil.Add(mimeTypes, ".pct", "image/x-pict"); + HashtableUtil.Add(mimeTypes, ".pcx", "image/x-pcx"); + HashtableUtil.Add(mimeTypes, ".pdb", "chemical/x-pdb"); + HashtableUtil.Add(mimeTypes, ".pdf", "application/pdf"); + HashtableUtil.Add(mimeTypes, ".pfunk", "audio/make"); + HashtableUtil.Add(mimeTypes, ".pfunk", "audio/make.my.funk"); + HashtableUtil.Add(mimeTypes, ".pgm", "image/x-portable-graymap"); + HashtableUtil.Add(mimeTypes, ".pgm", "image/x-portable-greymap"); + HashtableUtil.Add(mimeTypes, ".pic", "image/pict"); + HashtableUtil.Add(mimeTypes, ".pict", "image/pict"); + HashtableUtil.Add(mimeTypes, ".pkg", "application/x-newton-compatible-pkg"); + HashtableUtil.Add(mimeTypes, ".pko", "application/vnd.ms-pki.pko"); + HashtableUtil.Add(mimeTypes, ".pl", "text/plain"); + HashtableUtil.Add(mimeTypes, ".pl", "text/x-script.perl"); + HashtableUtil.Add(mimeTypes, ".plx", "application/x-pixclscript"); + HashtableUtil.Add(mimeTypes, ".pm", "image/x-xpixmap"); + HashtableUtil.Add(mimeTypes, ".pm", "text/x-script.perl-module"); + HashtableUtil.Add(mimeTypes, ".pm4", "application/x-pagemaker"); + HashtableUtil.Add(mimeTypes, ".pm5", "application/x-pagemaker"); + HashtableUtil.Add(mimeTypes, ".png", "image/png"); + HashtableUtil.Add(mimeTypes, ".pnm", "application/x-portable-anymap"); + HashtableUtil.Add(mimeTypes, ".pnm", "image/x-portable-anymap"); + HashtableUtil.Add(mimeTypes, ".pot", "application/mspowerpoint"); + HashtableUtil.Add(mimeTypes, ".pot", "application/vnd.ms-powerpoint"); + HashtableUtil.Add(mimeTypes, ".pov", "model/x-pov"); + HashtableUtil.Add(mimeTypes, ".ppa", "application/vnd.ms-powerpoint"); + HashtableUtil.Add(mimeTypes, ".ppm", "image/x-portable-pixmap"); + HashtableUtil.Add(mimeTypes, ".pps", "application/mspowerpoint"); + HashtableUtil.Add(mimeTypes, ".pps", "application/vnd.ms-powerpoint"); + HashtableUtil.Add(mimeTypes, ".ppt", "application/mspowerpoint"); + HashtableUtil.Add(mimeTypes, ".ppt", "application/powerpoint"); + HashtableUtil.Add(mimeTypes, ".ppt", "application/vnd.ms-powerpoint"); + HashtableUtil.Add(mimeTypes, ".ppt", "application/x-mspowerpoint"); + HashtableUtil.Add(mimeTypes, ".ppz", "application/mspowerpoint"); + HashtableUtil.Add(mimeTypes, ".pre", "application/x-freelance"); + HashtableUtil.Add(mimeTypes, ".prt", "application/pro_eng"); + HashtableUtil.Add(mimeTypes, ".ps", "application/postscript"); + HashtableUtil.Add(mimeTypes, ".psd", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".pvu", "paleovu/x-pv"); + HashtableUtil.Add(mimeTypes, ".pwz", "application/vnd.ms-powerpoint"); + HashtableUtil.Add(mimeTypes, ".py", "text/x-script.phyton"); + HashtableUtil.Add(mimeTypes, ".pyc", "applicaiton/x-bytecode.python"); + HashtableUtil.Add(mimeTypes, ".qcp", "audio/vnd.qcelp"); + HashtableUtil.Add(mimeTypes, ".qd3", "x-world/x-3dmf"); + HashtableUtil.Add(mimeTypes, ".qd3d", "x-world/x-3dmf"); + HashtableUtil.Add(mimeTypes, ".qif", "image/x-quicktime"); + HashtableUtil.Add(mimeTypes, ".qt", "video/quicktime"); + HashtableUtil.Add(mimeTypes, ".qtc", "video/x-qtc"); + HashtableUtil.Add(mimeTypes, ".qti", "image/x-quicktime"); + HashtableUtil.Add(mimeTypes, ".qtif", "image/x-quicktime"); + HashtableUtil.Add(mimeTypes, ".ra", "audio/x-pn-realaudio"); + HashtableUtil.Add(mimeTypes, ".ra", "audio/x-pn-realaudio-plugin"); + HashtableUtil.Add(mimeTypes, ".ra", "audio/x-realaudio"); + HashtableUtil.Add(mimeTypes, ".ram", "audio/x-pn-realaudio"); + HashtableUtil.Add(mimeTypes, ".ras", "application/x-cmu-raster"); + HashtableUtil.Add(mimeTypes, ".ras", "image/cmu-raster"); + HashtableUtil.Add(mimeTypes, ".ras", "image/x-cmu-raster"); + HashtableUtil.Add(mimeTypes, ".rast", "image/cmu-raster"); + HashtableUtil.Add(mimeTypes, ".rexx", "text/x-script.rexx"); + HashtableUtil.Add(mimeTypes, ".rf", "image/vnd.rn-realflash"); + HashtableUtil.Add(mimeTypes, ".rgb", "image/x-rgb"); + HashtableUtil.Add(mimeTypes, ".rm", "application/vnd.rn-realmedia"); + HashtableUtil.Add(mimeTypes, ".rm", "audio/x-pn-realaudio"); + HashtableUtil.Add(mimeTypes, ".rmi", "audio/mid"); + HashtableUtil.Add(mimeTypes, ".rmm", "audio/x-pn-realaudio"); + HashtableUtil.Add(mimeTypes, ".rmp", "audio/x-pn-realaudio"); + HashtableUtil.Add(mimeTypes, ".rmp", "audio/x-pn-realaudio-plugin"); + HashtableUtil.Add(mimeTypes, ".rng", "application/ringing-tones"); + HashtableUtil.Add(mimeTypes, ".rng", "application/vnd.nokia.ringing-tone"); + HashtableUtil.Add(mimeTypes, ".rnx", "application/vnd.rn-realplayer"); + HashtableUtil.Add(mimeTypes, ".roff", "application/x-troff"); + HashtableUtil.Add(mimeTypes, ".rp", "image/vnd.rn-realpix"); + HashtableUtil.Add(mimeTypes, ".rpm", "audio/x-pn-realaudio-plugin"); + HashtableUtil.Add(mimeTypes, ".rt", "text/richtext"); + HashtableUtil.Add(mimeTypes, ".rt", "text/vnd.rn-realtext"); + HashtableUtil.Add(mimeTypes, ".rtf", "application/rtf"); + HashtableUtil.Add(mimeTypes, ".rtf", "application/x-rtf"); + HashtableUtil.Add(mimeTypes, ".rtf", "text/richtext"); + HashtableUtil.Add(mimeTypes, ".rtx", "application/rtf"); + HashtableUtil.Add(mimeTypes, ".rtx", "text/richtext"); + HashtableUtil.Add(mimeTypes, ".rv", "video/vnd.rn-realvideo"); + HashtableUtil.Add(mimeTypes, ".s", "text/x-asm"); + HashtableUtil.Add(mimeTypes, ".s3m", "audio/s3m"); + HashtableUtil.Add(mimeTypes, ".saveme", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".sbk", "application/x-tbook"); + HashtableUtil.Add(mimeTypes, ".scm", "application/x-lotusscreencam"); + HashtableUtil.Add(mimeTypes, ".scm", "text/x-script.guile"); + HashtableUtil.Add(mimeTypes, ".scm", "text/x-script.scheme"); + HashtableUtil.Add(mimeTypes, ".scm", "video/x-scm"); + HashtableUtil.Add(mimeTypes, ".sdml", "text/plain"); + HashtableUtil.Add(mimeTypes, ".sdp", "application/sdp"); + HashtableUtil.Add(mimeTypes, ".sdp", "application/x-sdp"); + HashtableUtil.Add(mimeTypes, ".sdr", "application/sounder"); + HashtableUtil.Add(mimeTypes, ".sea", "application/sea"); + HashtableUtil.Add(mimeTypes, ".sea", "application/x-sea"); + HashtableUtil.Add(mimeTypes, ".set", "application/set"); + HashtableUtil.Add(mimeTypes, ".sgm", "text/sgml"); + HashtableUtil.Add(mimeTypes, ".sgm", "text/x-sgml"); + HashtableUtil.Add(mimeTypes, ".sgml", "text/sgml"); + HashtableUtil.Add(mimeTypes, ".sgml", "text/x-sgml"); + HashtableUtil.Add(mimeTypes, ".sh", "application/x-bsh"); + HashtableUtil.Add(mimeTypes, ".sh", "application/x-sh"); + HashtableUtil.Add(mimeTypes, ".sh", "application/x-shar"); + HashtableUtil.Add(mimeTypes, ".sh", "text/x-script.sh"); + HashtableUtil.Add(mimeTypes, ".shar", "application/x-bsh"); + HashtableUtil.Add(mimeTypes, ".shar", "application/x-shar"); + HashtableUtil.Add(mimeTypes, ".shtml", "text/html"); + HashtableUtil.Add(mimeTypes, ".shtml", "text/x-server-parsed-html"); + HashtableUtil.Add(mimeTypes, ".sid", "audio/x-psid"); + HashtableUtil.Add(mimeTypes, ".sit", "application/x-sit"); + HashtableUtil.Add(mimeTypes, ".sit", "application/x-stuffit"); + HashtableUtil.Add(mimeTypes, ".skd", "application/x-koan"); + HashtableUtil.Add(mimeTypes, ".skm", "application/x-koan"); + HashtableUtil.Add(mimeTypes, ".skp", "application/x-koan"); + HashtableUtil.Add(mimeTypes, ".skt", "application/x-koan"); + HashtableUtil.Add(mimeTypes, ".sl", "application/x-seelogo"); + HashtableUtil.Add(mimeTypes, ".smi", "application/smil"); + HashtableUtil.Add(mimeTypes, ".smil", "application/smil"); + HashtableUtil.Add(mimeTypes, ".snd", "audio/basic"); + HashtableUtil.Add(mimeTypes, ".snd", "audio/x-adpcm"); + HashtableUtil.Add(mimeTypes, ".sol", "application/solids"); + HashtableUtil.Add(mimeTypes, ".spc", "application/x-pkcs7-certificates"); + HashtableUtil.Add(mimeTypes, ".spc", "text/x-speech"); + HashtableUtil.Add(mimeTypes, ".spl", "application/futuresplash"); + HashtableUtil.Add(mimeTypes, ".spr", "application/x-sprite"); + HashtableUtil.Add(mimeTypes, ".sprite", "application/x-sprite"); + HashtableUtil.Add(mimeTypes, ".src", "application/x-wais-source"); + HashtableUtil.Add(mimeTypes, ".ssi", "text/x-server-parsed-html"); + HashtableUtil.Add(mimeTypes, ".ssm", "application/streamingmedia"); + HashtableUtil.Add(mimeTypes, ".sst", "application/vnd.ms-pki.certstore"); + HashtableUtil.Add(mimeTypes, ".step", "application/step"); + HashtableUtil.Add(mimeTypes, ".stl", "application/sla"); + HashtableUtil.Add(mimeTypes, ".stl", "application/vnd.ms-pki.stl"); + HashtableUtil.Add(mimeTypes, ".stl", "application/x-navistyle"); + HashtableUtil.Add(mimeTypes, ".stp", "application/step"); + HashtableUtil.Add(mimeTypes, ".sv4cpio", "application/x-sv4cpio"); + HashtableUtil.Add(mimeTypes, ".sv4crc", "application/x-sv4crc"); + HashtableUtil.Add(mimeTypes, ".svf", "image/vnd.dwg"); + HashtableUtil.Add(mimeTypes, ".svf", "image/x-dwg"); + HashtableUtil.Add(mimeTypes, ".svr", "application/x-world"); + HashtableUtil.Add(mimeTypes, ".svr", "x-world/x-svr"); + HashtableUtil.Add(mimeTypes, ".swf", "application/x-shockwave-flash"); + HashtableUtil.Add(mimeTypes, ".t", "application/x-troff"); + HashtableUtil.Add(mimeTypes, ".talk", "text/x-speech"); + HashtableUtil.Add(mimeTypes, ".tar", "application/x-tar"); + HashtableUtil.Add(mimeTypes, ".tbk", "application/toolbook"); + HashtableUtil.Add(mimeTypes, ".tbk", "application/x-tbook"); + HashtableUtil.Add(mimeTypes, ".tcl", "application/x-tcl"); + HashtableUtil.Add(mimeTypes, ".tcl", "text/x-script.tcl"); + HashtableUtil.Add(mimeTypes, ".tcsh", "text/x-script.tcsh"); + HashtableUtil.Add(mimeTypes, ".tex", "application/x-tex"); + HashtableUtil.Add(mimeTypes, ".texi", "application/x-texinfo"); + HashtableUtil.Add(mimeTypes, ".texinfo", "application/x-texinfo"); + HashtableUtil.Add(mimeTypes, ".text", "application/plain"); + HashtableUtil.Add(mimeTypes, ".text", "text/plain"); + HashtableUtil.Add(mimeTypes, ".tgz", "application/gnutar"); + HashtableUtil.Add(mimeTypes, ".tgz", "application/x-compressed"); + HashtableUtil.Add(mimeTypes, ".tif", "image/tiff"); + HashtableUtil.Add(mimeTypes, ".tif", "image/x-tiff"); + HashtableUtil.Add(mimeTypes, ".tiff", "image/tiff"); + HashtableUtil.Add(mimeTypes, ".tiff", "image/x-tiff"); + HashtableUtil.Add(mimeTypes, ".tr", "application/x-troff"); + HashtableUtil.Add(mimeTypes, ".tsi", "audio/tsp-audio"); + HashtableUtil.Add(mimeTypes, ".tsp", "application/dsptype"); + HashtableUtil.Add(mimeTypes, ".tsp", "audio/tsplayer"); + HashtableUtil.Add(mimeTypes, ".tsv", "text/tab-separated-values"); + HashtableUtil.Add(mimeTypes, ".turbot", "image/florian"); + HashtableUtil.Add(mimeTypes, ".txt", "text/plain"); + HashtableUtil.Add(mimeTypes, ".uil", "text/x-uil"); + HashtableUtil.Add(mimeTypes, ".uni", "text/uri-list"); + HashtableUtil.Add(mimeTypes, ".unis", "text/uri-list"); + HashtableUtil.Add(mimeTypes, ".unv", "application/i-deas"); + HashtableUtil.Add(mimeTypes, ".uri", "text/uri-list"); + HashtableUtil.Add(mimeTypes, ".uris", "text/uri-list"); + HashtableUtil.Add(mimeTypes, ".ustar", "application/x-ustar"); + HashtableUtil.Add(mimeTypes, ".ustar", "multipart/x-ustar"); + HashtableUtil.Add(mimeTypes, ".uu", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".uu", "text/x-uuencode"); + HashtableUtil.Add(mimeTypes, ".uue", "text/x-uuencode"); + HashtableUtil.Add(mimeTypes, ".vcd", "application/x-cdlink"); + HashtableUtil.Add(mimeTypes, ".vcs", "text/x-vcalendar"); + HashtableUtil.Add(mimeTypes, ".vda", "application/vda"); + HashtableUtil.Add(mimeTypes, ".vdo", "video/vdo"); + HashtableUtil.Add(mimeTypes, ".vew", "application/groupwise"); + HashtableUtil.Add(mimeTypes, ".viv", "video/vivo"); + HashtableUtil.Add(mimeTypes, ".viv", "video/vnd.vivo"); + HashtableUtil.Add(mimeTypes, ".vivo", "video/vivo"); + HashtableUtil.Add(mimeTypes, ".vivo", "video/vnd.vivo"); + HashtableUtil.Add(mimeTypes, ".vmd", "application/vocaltec-media-desc"); + HashtableUtil.Add(mimeTypes, ".vmf", "application/vocaltec-media-file"); + HashtableUtil.Add(mimeTypes, ".voc", "audio/voc"); + HashtableUtil.Add(mimeTypes, ".voc", "audio/x-voc"); + HashtableUtil.Add(mimeTypes, ".vos", "video/vosaic"); + HashtableUtil.Add(mimeTypes, ".vox", "audio/voxware"); + HashtableUtil.Add(mimeTypes, ".vqe", "audio/x-twinvq-plugin"); + HashtableUtil.Add(mimeTypes, ".vqf", "audio/x-twinvq"); + HashtableUtil.Add(mimeTypes, ".vql", "audio/x-twinvq-plugin"); + HashtableUtil.Add(mimeTypes, ".vrml", "application/x-vrml"); + HashtableUtil.Add(mimeTypes, ".vrml", "model/vrml"); + HashtableUtil.Add(mimeTypes, ".vrml", "x-world/x-vrml"); + HashtableUtil.Add(mimeTypes, ".vrt", "x-world/x-vrt"); + HashtableUtil.Add(mimeTypes, ".vsd", "application/x-visio"); + HashtableUtil.Add(mimeTypes, ".vst", "application/x-visio"); + HashtableUtil.Add(mimeTypes, ".vsw", "application/x-visio"); + HashtableUtil.Add(mimeTypes, ".w60", "application/wordperfect6.0"); + HashtableUtil.Add(mimeTypes, ".w61", "application/wordperfect6.1"); + HashtableUtil.Add(mimeTypes, ".w6w", "application/msword"); + HashtableUtil.Add(mimeTypes, ".wav", "audio/wav"); + HashtableUtil.Add(mimeTypes, ".wav", "audio/x-wav"); + HashtableUtil.Add(mimeTypes, ".wb1", "application/x-qpro"); + HashtableUtil.Add(mimeTypes, ".wbmp", "image/vnd.wap.wbmp"); + HashtableUtil.Add(mimeTypes, ".web", "application/vnd.xara"); + HashtableUtil.Add(mimeTypes, ".wiz", "application/msword"); + HashtableUtil.Add(mimeTypes, ".wk1", "application/x-123"); + HashtableUtil.Add(mimeTypes, ".wmf", "windows/metafile"); + HashtableUtil.Add(mimeTypes, ".wml", "text/vnd.wap.wml"); + HashtableUtil.Add(mimeTypes, ".wmlc", "application/vnd.wap.wmlc"); + HashtableUtil.Add(mimeTypes, ".wmls", "text/vnd.wap.wmlscript"); + HashtableUtil.Add(mimeTypes, ".wmlsc", "application/vnd.wap.wmlscriptc"); + HashtableUtil.Add(mimeTypes, ".word", "application/msword"); + HashtableUtil.Add(mimeTypes, ".wp", "application/wordperfect"); + HashtableUtil.Add(mimeTypes, ".wp5", "application/wordperfect"); + HashtableUtil.Add(mimeTypes, ".wp5", "application/wordperfect6.0"); + HashtableUtil.Add(mimeTypes, ".wp6", "application/wordperfect"); + HashtableUtil.Add(mimeTypes, ".wpd", "application/wordperfect"); + HashtableUtil.Add(mimeTypes, ".wpd", "application/x-wpwin"); + HashtableUtil.Add(mimeTypes, ".wq1", "application/x-lotus"); + HashtableUtil.Add(mimeTypes, ".wri", "application/mswrite"); + HashtableUtil.Add(mimeTypes, ".wri", "application/x-wri"); + HashtableUtil.Add(mimeTypes, ".wrl", "application/x-world"); + HashtableUtil.Add(mimeTypes, ".wrl", "model/vrml"); + HashtableUtil.Add(mimeTypes, ".wrl", "x-world/x-vrml"); + HashtableUtil.Add(mimeTypes, ".wrz", "model/vrml"); + HashtableUtil.Add(mimeTypes, ".wrz", "x-world/x-vrml"); + HashtableUtil.Add(mimeTypes, ".wsc", "text/scriplet"); + HashtableUtil.Add(mimeTypes, ".wsrc", "application/x-wais-source"); + HashtableUtil.Add(mimeTypes, ".wtk", "application/x-wintalk"); + HashtableUtil.Add(mimeTypes, ".xbm", "image/x-xbitmap"); + HashtableUtil.Add(mimeTypes, ".xbm", "image/x-xbm"); + HashtableUtil.Add(mimeTypes, ".xbm", "image/xbm"); + HashtableUtil.Add(mimeTypes, ".xdr", "video/x-amt-demorun"); + HashtableUtil.Add(mimeTypes, ".xgz", "xgl/drawing"); + HashtableUtil.Add(mimeTypes, ".xif", "image/vnd.xiff"); + HashtableUtil.Add(mimeTypes, ".xl", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xla", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xla", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xla", "application/x-msexcel"); + HashtableUtil.Add(mimeTypes, ".xlb", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xlb", "application/vnd.ms-excel"); + HashtableUtil.Add(mimeTypes, ".xlb", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xlc", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xlc", "application/vnd.ms-excel"); + HashtableUtil.Add(mimeTypes, ".xlc", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xld", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xld", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xlk", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xlk", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xll", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xll", "application/vnd.ms-excel"); + HashtableUtil.Add(mimeTypes, ".xll", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xlm", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xlm", "application/vnd.ms-excel"); + HashtableUtil.Add(mimeTypes, ".xlm", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xls", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xls", "application/vnd.ms-excel"); + HashtableUtil.Add(mimeTypes, ".xls", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xls", "application/x-msexcel"); + HashtableUtil.Add(mimeTypes, ".xlt", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xlt", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xlv", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xlv", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xlw", "application/excel"); + HashtableUtil.Add(mimeTypes, ".xlw", "application/vnd.ms-excel"); + HashtableUtil.Add(mimeTypes, ".xlw", "application/x-excel"); + HashtableUtil.Add(mimeTypes, ".xlw", "application/x-msexcel"); + HashtableUtil.Add(mimeTypes, ".xm", "audio/xm"); + HashtableUtil.Add(mimeTypes, ".xml", "application/xml"); + HashtableUtil.Add(mimeTypes, ".xml", "text/xml"); + HashtableUtil.Add(mimeTypes, ".xmz", "xgl/movie"); + HashtableUtil.Add(mimeTypes, ".xpix", "application/x-vnd.ls-xpix"); + HashtableUtil.Add(mimeTypes, ".xpm", "image/x-xpixmap"); + HashtableUtil.Add(mimeTypes, ".xpm", "image/xpm"); + HashtableUtil.Add(mimeTypes, ".x-png", "image/png"); + HashtableUtil.Add(mimeTypes, ".xsr", "video/x-amt-showrun"); + HashtableUtil.Add(mimeTypes, ".xwd", "image/x-xwd"); + HashtableUtil.Add(mimeTypes, ".xwd", "image/x-xwindowdump"); + HashtableUtil.Add(mimeTypes, ".xyz", "chemical/x-pdb"); + HashtableUtil.Add(mimeTypes, ".z", "application/x-compress"); + HashtableUtil.Add(mimeTypes, ".z", "application/x-compressed"); + HashtableUtil.Add(mimeTypes, ".zip", "application/x-compressed"); + HashtableUtil.Add(mimeTypes, ".zip", "application/x-zip-compressed"); + HashtableUtil.Add(mimeTypes, ".zip", "application/zip"); + HashtableUtil.Add(mimeTypes, ".zip", "multipart/x-zip"); + HashtableUtil.Add(mimeTypes, ".zoo", "application/octet-stream"); + HashtableUtil.Add(mimeTypes, ".zsh", "text/x-script.zsh"); + } + + /// <summary> + /// Gets a file extension and returns the corresponding mime type. + /// </summary> + /// <param name="fileExtension">File extension including the dot.</param> + public static string GetMimeType(string fileExtension) + { + if (fileExtension == null) + { + throw new ArgumentNullException("fileExtension"); + } + + string ext = fileExtension.ToLower(); + + if (mimeTypes.ContainsKey(ext)) + { + return mimeTypes[ext].ToString(); + } + + return DefaultMimeType; + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-05-30 06:11:16
|
Revision: 137 http://svn.sourceforge.net/mantisconnect/?rev=137&view=rev Author: vboctor Date: 2007-05-29 23:11:04 -0700 (Tue, 29 May 2007) Log Message: ----------- Fixed a bug in IssueAttachmentAdd() C# library. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs 2007-04-22 04:53:32 UTC (rev 136) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs 2007-05-30 06:11:04 UTC (rev 137) @@ -474,17 +474,15 @@ /// Uploads the specified file to the specified issue. /// </summary> /// <param name="issueId">The issue id</param> - /// <param name="fileName">The file</param> - /// <returns></returns> - public int IssueAttachmentAdd(int issueId, string fileName) + /// <param name="filePath">The file path of the file to attach.</param> + /// <param name="fileName"> + /// The name of the file (without any path) to be associated with the uploaded file + /// (if null, will extract name from full path). + /// </param> + /// <returns>The attachment id.</returns> + public int IssueAttachmentAdd(int issueId, string filePath, string fileName) { - byte[] bytes = File.ReadAllBytes(fileName); - string base64 = Convert.ToBase64String(bytes); - - ASCIIEncoding encoding = new ASCIIEncoding(); - byte[] encoded = encoding.GetBytes(base64); - - return this.IssueAttachmentAdd(issueId, Path.GetFileName(fileName), MimeTypes.GetMimeType(Path.GetExtension(fileName)), encoded); + return this.IssueAttachmentAdd(issueId, fileName ?? Path.GetFileName(filePath), MimeTypes.GetMimeType(Path.GetExtension(fileName)), File.ReadAllBytes(filePath)); } /// <summary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-04-22 04:53:33
|
Revision: 136 http://svn.sourceforge.net/mantisconnect/?rev=136&view=rev Author: vboctor Date: 2007-04-21 21:53:32 -0700 (Sat, 21 Apr 2007) Log Message: ----------- - Modified the ProjectVersionAdd() in the dotnet client to return the version id + added some extra validation. - Added some test cases for the version add cases. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/Settings.Designer.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs Modified: mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs 2007-04-22 02:25:31 UTC (rev 135) +++ mantisconnect/trunk/clients/dotnet/UnitTests/ProjectVersions.cs 2007-04-22 04:53:32 UTC (rev 136) @@ -112,5 +112,118 @@ Session.Request.ProjectGetVersionsUnreleased( projectId ); } #endregion + + #region Request.ProjectGetVersions() + [Test] + public void ProjectVersionAddNotReleased() + { + ProjectVersionAddTestCase(false); + } + + [Test] + public void ProjectVersionAddReleased() + { + ProjectVersionAddTestCase(true); + } + + [Test] + [ExpectedException(typeof(ArgumentException))] + public void ProjectVersionAddWithId() + { + ProjectVersion versionToAdd = CreateVersionToAdd(); + versionToAdd.Id = 1000; + Session.Request.ProjectVersionAdd(versionToAdd); + } + + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void ProjectVersionAddWithNullName() + { + ProjectVersion versionToAdd = CreateVersionToAdd(); + versionToAdd.Name = null; + Session.Request.ProjectVersionAdd(versionToAdd); + } + + [Test] + [ExpectedException(typeof(ArgumentNullException))] + public void ProjectVersionAddWithNullDescription() + { + ProjectVersion versionToAdd = CreateVersionToAdd(); + versionToAdd.Description = null; + Session.Request.ProjectVersionAdd(versionToAdd); + } + #endregion + + #region Private Methods + /// <summary> + /// Get a project version by id or null if not found. + /// </summary> + /// <param name="projectVersionId">The version id</param> + /// <returns></returns> + private ProjectVersion GetProjectVersionById(int projectVersionId) + { + ProjectVersion[] versions = Session.Request.ProjectGetVersions(this.FirstProjectId); + + foreach (ProjectVersion version in versions) + { + if (version.Id == projectVersionId) + { + return version; + } + } + + return null; + } + + private void ProjectVersionAddTestCase(bool released) + { + const string VersionName = "VersionName"; + const string VersionDescription = "VersionDescription"; + DateTime now = DateTime.Now; + + ProjectVersion version = new ProjectVersion(); + version.ProjectId = this.FirstProjectId; + version.Name = VersionName; + version.Description = VersionDescription; + version.DateOrder = now; + version.IsReleased = released; + + int versionId = Session.Request.ProjectVersionAdd(version); + + try + { + // Check that the version id is set. + Assert.AreEqual(versionId, version.Id); + Assert.AreNotEqual(versionId, 0); + + ProjectVersion versionAdded = GetProjectVersionById(versionId); + + Assert.AreEqual(versionAdded.Id, versionId); + Assert.AreEqual(versionAdded.Name, VersionName); + Assert.AreEqual(versionAdded.Description, VersionDescription); + Assert.AreEqual(versionAdded.DateOrder, now); + Assert.AreEqual(versionAdded.IsReleased, released); + } + finally + { + Session.Request.ProjectVersionDelete(versionId); + } + } + + private ProjectVersion CreateVersionToAdd() + { + const string VersionName = "VersionName"; + const string VersionDescription = "VersionDescription"; + + ProjectVersion version = new ProjectVersion(); + version.ProjectId = this.FirstProjectId; + version.Name = VersionName; + version.Description = VersionDescription; + version.DateOrder = DateTime.Now; + version.IsReleased = false; + + return version; + } + #endregion } } Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/Settings.Designer.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/Settings.Designer.cs 2007-04-22 02:25:31 UTC (rev 135) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Properties/Settings.Designer.cs 2007-04-22 04:53:32 UTC (rev 136) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.112 +// Runtime Version:2.0.50727.312 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs 2007-04-22 02:25:31 UTC (rev 135) +++ mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs 2007-04-22 04:53:32 UTC (rev 136) @@ -263,12 +263,31 @@ } /// <summary> - /// Adds a project version. + /// Adds a project version and sets the id on the supplied project version instance. /// </summary> /// <param name="version">The new project version details.</param> - public void ProjectVersionAdd(ProjectVersion version) + /// <returns>The version id of the added project version.</returns> + public int ProjectVersionAdd(ProjectVersion version) { - mc.mc_project_version_add(session.Username, session.Password, version.ToWebservice()); + ValidateProjectId(version.ProjectId); + + if (version.Id != 0) + { + throw new ArgumentException("Version already has a version id"); + } + + if (version.Name == null) + { + throw new ArgumentNullException("version.Name"); + } + + if (version.Description == null) + { + throw new ArgumentNullException("version.Description"); + } + + version.Id = Convert.ToInt32(mc.mc_project_version_add(session.Username, session.Password, version.ToWebservice())); + return version.Id; } /// <summary> @@ -281,6 +300,16 @@ ValidateProjectVersionId(version.Id); ValidateProjectId(version.ProjectId); + if (version.Name == null) + { + throw new ArgumentNullException("version.Name"); + } + + if (version.Description == null) + { + throw new ArgumentNullException("version.Description"); + } + mc.mc_project_version_update(session.Username, session.Password, version.Id.ToString(), version.ToWebservice()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vb...@us...> - 2007-04-22 02:25:32
|
Revision: 135 http://svn.sourceforge.net/mantisconnect/?rev=135&view=rev Author: vboctor Date: 2007-04-21 19:25:31 -0700 (Sat, 21 Apr 2007) Log Message: ----------- Fixed #323: new API function: mc_issue_checkin - Webservice Implementation (thanks to urkle) - .NET client library + unit test also updated. Modified Paths: -------------- mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs mantisconnect/trunk/clients/dotnet/UnitTests/Filters.cs mantisconnect/trunk/clients/dotnet/UnitTests/Libs/nunit.core.dll mantisconnect/trunk/clients/dotnet/UnitTests/Libs/nunit.framework.dll mantisconnect/trunk/clients/dotnet/UnitTests/Libs/nunit.framework.xml mantisconnect/trunk/clients/dotnet/UnitTests/UpdateIssues.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Request.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/Reference.cs mantisconnect/trunk/clients/dotnet/mantisconnect/Web References/MantisConnectWebservice/mantisconnect.wsdl mantisconnect/trunk/clients/dotnet/mantisnotify/MantisNotify.csproj mantisconnect/trunk/webservice/docs/changelog.txt mantisconnect/trunk/webservice/mc/mantisconnect.php mantisconnect/trunk/webservice/mc/mc_issue_api.php Property Changed: ---------------- mantisconnect/trunk/clients/dotnet/UnitTests/ Modified: mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj =================================================================== --- mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj 2007-04-22 00:35:14 UTC (rev 134) +++ mantisconnect/trunk/clients/dotnet/MantisFilters/MantisFilters.csproj 2007-04-22 02:25:31 UTC (rev 135) @@ -104,6 +104,7 @@ </Compile> <EmbeddedResource Include="MantisFiltersForm.resx"> <DependentUpon>MantisFiltersForm.cs</DependentUpon> + <SubType>Designer</SubType> </EmbeddedResource> </ItemGroup> <ItemGroup> Property changes on: mantisconnect/trunk/clients/dotnet/UnitTests ___________________________________________________________________ Name: svn:ignore - bin obj + bin obj *.user Modified: mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs 2007-04-22 00:35:14 UTC (rev 134) +++ mantisconnect/trunk/clients/dotnet/UnitTests/BaseTestFixture.cs 2007-04-22 02:25:31 UTC (rev 135) @@ -34,7 +34,7 @@ protected string Url { - get { return "http://localhost/mantisbt/mc/mantisconnect.php"; } + get { return "http://localhost:8008/mantisbt/mc/mantisconnect.php"; } } protected void Connect() Modified: mantisconnect/trunk/clients/dotnet/UnitTests/Filters.cs =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/Filters.cs 2007-04-22 00:35:14 UTC (rev 134) +++ mantisconnect/trunk/clients/dotnet/UnitTests/Filters.cs 2007-04-22 02:25:31 UTC (rev 135) @@ -39,17 +39,25 @@ [Test] public void GetFiltersForAllProjects() { - Project[] projects = Session.Request.UserGetAccessibleProjects(); + try + { + Project[] projects = Session.Request.UserGetAccessibleProjects(); - foreach( Project project in projects ) - { - Filter[] filters = Session.Request.UserGetFilters( project.Id ); - - foreach( Filter filter in filters ) + foreach (Project project in projects) { - Session.Request.GetIssues( 0, filter.Id, 1, 10 ); + Filter[] filters = Session.Request.UserGetFilters(project.Id); + + foreach (Filter filter in filters) + { + Session.Request.GetIssues(project.Id, filter.Id, 1, 10); + } } } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } } } } Modified: mantisconnect/trunk/clients/dotnet/UnitTests/Libs/nunit.core.dll =================================================================== (Binary files differ) Modified: mantisconnect/trunk/clients/dotnet/UnitTests/Libs/nunit.framework.dll =================================================================== (Binary files differ) Modified: mantisconnect/trunk/clients/dotnet/UnitTests/Libs/nunit.framework.xml =================================================================== --- mantisconnect/trunk/clients/dotnet/UnitTests/Libs/nunit.framework.xml 2007-04-22 00:35:14 UTC (rev 134) +++ mantisconnect/trunk/clients/dotnet/UnitTests/Libs/nunit.framework.xml 2007-04-22 02:25:31 UTC (rev 135) @@ -4,16 +4,1401 @@ <name>nunit.framework</name> </assembly> <members> + <member name="T:NUnit.Framework.Constraints.SubstringConstraint"> + <summary> + SubstringConstraint can test whether a string contains + the expected substring. + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.Constraint"> + <summary> + The constraint class is the base of all implementations + of IConstraint in NUnit. It provides the operator + overloads used to combine constraints. + </summary> + </member> + <member name="T:NUnit.Framework.IConstraint"> + <summary> + Summary description for IConstraint. + </summary> + </member> + <member name="M:NUnit.Framework.IConstraint.WriteMessageTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the failure message to the MessageWriter provided + as an argument. + </summary> + <param name="writer">The MessageWriter on which to display the message</param> + </member> + <member name="M:NUnit.Framework.IConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.IConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="M:NUnit.Framework.IConstraint.WriteActualValueTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the actual value for a failing constraint test to a + MessageWriter. Depending on the specific constraint, this + might be something other than a the raw value... such as + the actual Type for certain Type Constraints. + </summary> + <param name="writer"></param> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.UNSET"> + <summary> + Static UnsetObject used to detect derived constraints + failing to set the actual value. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.caseInsensitive"> + <summary> + If true, all string comparisons will ignore case + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.compareAsCollection"> + <summary> + If true, arrays will be treated as collections, allowing + those of different dimensions to be compared + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.tolerance"> + <summary> + If non-zero, equality comparisons within the specified + tolerance will succeed. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.compareWith"> + <summary> + IComparer object used in comparisons for some constraints. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.Constraint.actual"> + <summary> + The actual value being tested against a constraint + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.Within(System.Object)"> + <summary> + Flag the constraint to use a tolerance when determining equality. + Currently only used for doubles and floats. + </summary> + <param name="tolerance">Tolerance to be used</param> + <returns>Self.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.Comparer(System.Collections.IComparer)"> + <summary> + Flag the constraint to use the supplied IComparer object. + </summary> + <param name="comparer">The IComparer object to use.</param> + <returns>Self.</returns> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.WriteMessageTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the failure message to the MessageWriter provided + as an argument. The default implementation simply passes + the constraint and the actual value to the writer, which + then displays the constraint description and the value. + + Constraints that need to provide additional details, + such as where the error occured can override this. + </summary> + <param name="writer">The MessageWriter on which to display the message</param> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.WriteActualValueTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + </summary> + <param name="writer">The writer on which the actual value is displayed</param> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.op_BitwiseAnd(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.op_BitwiseOr(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + This operator creates a constraint that is satisfied if either + of the argument constraints is satisfied. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.Constraint.op_LogicalNot(NUnit.Framework.Constraints.Constraint)"> + <summary> + This operator creates a constraint that is satisfied if the + argument constraint is not satisfied. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.Constraint.IgnoreCase"> + <summary> + Flag the constraint to ignore case and return self. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.Constraint.AsCollection"> + <summary> + Flag the constraint to compare arrays as collections + and return self. + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.Constraint.UnsetObject"> + <summary> + Class used to detect any derived constraints + that fail to set the actual value in their + Matches override. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.SubstringConstraint.#ctor(System.String)"> + <summary> + Initializes a new instance of the <see cref="T:SubstringConstraint"/> class. + </summary> + <param name="expected">The expected.</param> + </member> + <member name="M:NUnit.Framework.Constraints.SubstringConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.SubstringConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.StartsWithConstraint"> + <summary> + StartsWithConstraint can test whether a string starts + with an expected substring. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.StartsWithConstraint.#ctor(System.String)"> + <summary> + Initializes a new instance of the <see cref="T:StartsWithConstraint"/> class. + </summary> + <param name="expected">The expected string</param> + </member> + <member name="M:NUnit.Framework.Constraints.StartsWithConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.StartsWithConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.EndsWithConstraint"> + <summary> + EndsWithConstraint can test whether a string ends + with an expected substring. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.EndsWithConstraint.#ctor(System.String)"> + <summary> + Initializes a new instance of the <see cref="T:EndsWithConstraint"/> class. + </summary> + <param name="expected">The expected string</param> + </member> + <member name="M:NUnit.Framework.Constraints.EndsWithConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.EndsWithConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.RegexConstraint"> + <summary> + RegexConstraint can test whether a string matches + the pattern provided. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.RegexConstraint.#ctor(System.String)"> + <summary> + Initializes a new instance of the <see cref="T:RegexConstraint"/> class. + </summary> + <param name="pattern">The pattern.</param> + </member> + <member name="M:NUnit.Framework.Constraints.RegexConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.RegexConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.EmptyConstraint"> + <summary> + EmptyConstraint tests a whether a string or collection is empty, + postponing the decision about which test is applied until the + type of the actual argument is known. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.EmptyConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.EmptyConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.ConstraintBuilder"> + <summary> + ConstraintBuilder is used to resolve the Not and All properties, + which serve as prefix operators for constraints. With the addition + of an operand stack, And and Or could be supported, but we have + left them out in favor of a simpler, more type-safe implementation. + Use the & and | operator overloads to combine constraints. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.EqualTo(System.Object)"> + <summary> + Resolves the chain of constraints using an + EqualConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.SameAs(System.Object)"> + <summary> + Resolves the chain of constraints using a + SameAsConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.LessThan(System.IComparable)"> + <summary> + Resolves the chain of constraints using a + LessThanConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.GreaterThan(System.IComparable)"> + <summary> + Resolves the chain of constraints using a + GreaterThanConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.LessThanOrEqualTo(System.IComparable)"> + <summary> + Resolves the chain of constraints using a + LessThanOrEqualConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.AtMost(System.IComparable)"> + <summary> + Resolves the chain of constraints using a + LessThanOrEqualConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.GreaterThanOrEqualTo(System.IComparable)"> + <summary> + Resolves the chain of constraints using a + GreaterThanOrEqualConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.AtLeast(System.IComparable)"> + <summary> + Resolves the chain of constraints using a + GreaterThanOrEqualConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.TypeOf(System.Type)"> + <summary> + Resolves the chain of constraints using an + ExactTypeConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.InstanceOfType(System.Type)"> + <summary> + Resolves the chain of constraints using an + InstanceOfTypeConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.AssignableFrom(System.Type)"> + <summary> + Resolves the chain of constraints using an + AssignableFromConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Contains(System.Object)"> + <summary> + Resolves the chain of constraints using a + ContainsConstraint as base. This constraint + will, in turn, make use of the appropriate + second-level constraint, depending on the + type of the actual argument. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.StartsWith(System.String)"> + <summary> + Resolves the chain of constraints using a + StartsWithConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.EndsWith(System.String)"> + <summary> + Resolves the chain of constraints using a + StringEndingConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Matches(System.String)"> + <summary> + Resolves the chain of constraints using a + StringMatchingConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.EquivalentTo(System.Collections.ICollection)"> + <summary> + Resolves the chain of constraints using a + CollectionEquivalentConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.CollectionContaining(System.Object)"> + <summary> + Resolves the chain of constraints using a + CollectionContainingConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.SubsetOf(System.Collections.ICollection)"> + <summary> + Resolves the chain of constraints using a + CollectionSubsetConstraint as base. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Property(System.String,System.Object)"> + <summary> + Resolves the chain of constraints using a + PropertyConstraint as base + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Length(System.Int32)"> + <summary> + Resolves the chain of constraints using a + PropertyCOnstraint on Length as base + </summary> + <param name="length"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Resolve(NUnit.Framework.Constraints.Constraint)"> + <summary> + Resolve a constraint that has been recognized by applying + any pending operators and returning the resulting Constraint. + </summary> + <param name="constraint">The root constraint</param> + <returns>A constraint that incorporates all pending operators</returns> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.Null"> + <summary> + Resolves the chain of constraints using + EqualConstraint(null) as base. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.True"> + <summary> + Resolves the chain of constraints using + EqualConstraint(true) as base. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.False"> + <summary> + Resolves the chain of constraints using + EqualConstraint(false) as base. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.NaN"> + <summary> + Resolves the chain of constraints using + Is.NaN as base. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.Empty"> + <summary> + Resolves the chain of constraints using + Is.Empty as base. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.Unique"> + <summary> + Resolves the chain of constraints using + Is.Unique as base. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.Not"> + <summary> + Modifies the ConstraintBuilder by pushing a Not operator on the stack. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.All"> + <summary> + Modifies the ConstraintBuilder by pushing an All operator on the stack. + </summary> + </member> + <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.Some"> + <summary> + Modifies the ConstraintBuilder by pushing a Some operator on the stack. + </summary> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionConstraint"> + <summary> + CollectionConstraint is the abstract base class for + constraints that operate on collections. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.IsItemInCollection(System.Object,System.Collections.ICollection)"> + <summary> + Determine whether an expected object is contained in a collection + </summary> + <param name="expected"></param> + <param name="collection"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionConstraint.IsSubsetOf(System.Collections.ICollection,System.Collections.ICollection)"> + <summary> + Determine whether one collection is a subset of another + </summary> + <param name="subset"></param> + <param name="superset"></param> + <returns></returns> + </member> + <member name="T:NUnit.Framework.Constraints.AllItemsConstraint"> + <summary> + AllItemsConstraint applies another constraint to each + item in a collection, succeeding if they all succeed. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.AllItemsConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> + <summary> + Construct an AllItemsConstraint on top of an existing constraint + </summary> + <param name="itemConstraint"></param> + </member> + <member name="M:NUnit.Framework.Constraints.AllItemsConstraint.Matches(System.Object)"> + <summary> + Apply the item constraint to each item in the collection, + failing if any item fails. + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.AllItemsConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.SomeItemsConstraint"> + <summary> + SomeItemsConstraint applies another constraint to each + item in a collection, succeeding if any of them succeeds. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.SomeItemsConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> + <summary> + Construct a SomeItemsConstraint on top of an existing constraint + </summary> + <param name="itemConstraint"></param> + </member> + <member name="M:NUnit.Framework.Constraints.SomeItemsConstraint.Matches(System.Object)"> + <summary> + Apply the item constraint to each item in the collection, + failing if any item fails. + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.SomeItemsConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.UniqueItemsConstraint"> + <summary> + UniqueItemsConstraint tests whether all the items in a + collection are unique. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.UniqueItemsConstraint.Matches(System.Object)"> + <summary> + Apply the item constraint to each item in the collection, + failing if any item fails. + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.UniqueItemsConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionContainsConstraint"> + <summary> + CollectionContainsConstraint is used to test whether a collection + contains an expected object as a member. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.#ctor(System.Object)"> + <summary> + Construct a CollectionContainsConstraint + </summary> + <param name="expected"></param> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.Matches(System.Object)"> + <summary> + Test whether the expected item is contained in the collection + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a descripton of the constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionEquivalentConstraint"> + <summary> + CollectionEquivalentCOnstraint is used to determine whether two + collections are equivalent. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.#ctor(System.Collections.ICollection)"> + <summary> + Construct a CollectionEquivalentConstraint + </summary> + <param name="expected"></param> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.Matches(System.Object)"> + <summary> + Test whether two collections are equivalent + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.CollectionSubsetConstraint"> + <summary> + CollectionSubsetConstraint is used to determine whether + one collection is a subset of another + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.#ctor(System.Collections.ICollection)"> + <summary> + Construct a CollectionSubsetConstraint + </summary> + <param name="superset">The collection that the actual value is expected to be a subset of</param> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.Matches(System.Object)"> + <summary> + Test whether the actual collection is a subset of + the expected collection provided. + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a desicription of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.EqualConstraint"> + <summary> + EqualConstraint is able to compare an actual value with the + expected value provided in its constructor. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.EqualConstraint.displayTolerance"> + <summary> + Flag used to indicate whether a tolerance was actually + used and should be displayed in the message. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.#ctor(System.Object)"> + <summary> + Initializes a new instance of the <see cref="T:EqualConstraint"/> class. + </summary> + <param name="expected">The expected value.</param> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.WriteMessageTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + </summary> + <param name="writer">The MessageWriter to write to</param> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write description of this constraint + </summary> + <param name="writer">The MessageWriter to write to</param> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.ArraysEqual(System.Array,System.Array)"> + <summary> + Helper method to compare two arrays + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.IsNumericType(System.Object)"> + <summary> + Checks the type of the object, returning true if + the object is a numeric type. + </summary> + <param name="obj">The object to check</param> + <returns>true if the object is a numeric type</returns> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.DisplayCollectionDifferences(NUnit.Framework.MessageWriter,System.Collections.ICollection,System.Collections.ICollection,System.Int32)"> + <summary> + Display the failure information for two collections that did not match. + </summary> + <param name="writer">The MessageWriter on which to display</param> + <param name="expected">The expected collection.</param> + <param name="actual">The actual collection</param> + <param name="depth">The depth of this failure in a set of nested collections</param> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.DisplayCollectionTypesAndSizes(NUnit.Framework.MessageWriter,System.Collections.ICollection,System.Collections.ICollection,System.Int32)"> + <summary> + Displays a single line showing the types and sizes of the expected + and actual collections or arrays. If both are identical, the value is + only shown once. + </summary> + <param name="writer">The MessageWriter on which to display</param> + <param name="expected">The expected collection or array</param> + <param name="actual">The actual collection or array</param> + <param name="indent">The indentation level for the message line</param> + </member> + <member name="M:NUnit.Framework.Constraints.EqualConstraint.DisplayFailurePoint(NUnit.Framework.MessageWriter,System.Collections.ICollection,System.Collections.ICollection,System.Int32,System.Int32)"> + <summary> + Displays a single line showing the point in the expected and actual + arrays at which the comparison failed. If the arrays have different + structures or dimensions, both values are shown. + </summary> + <param name="writer">The MessageWriter on which to display</param> + <param name="expected">The expected array</param> + <param name="actual">The actual array</param> + <param name="failurePoint">Index of the failure point in the underlying collections</param> + <param name="indent">The indentation level for the message line</param> + </member> + <member name="T:NUnit.Framework.Constraints.SameAsConstraint"> + <summary> + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.SameAsConstraint.#ctor(System.Object)"> + <summary> + Initializes a new instance of the <see cref="T:SameAsConstraint"/> class. + </summary> + <param name="expected">The expected object.</param> + </member> + <member name="M:NUnit.Framework.Constraints.SameAsConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.SameAsConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.TypeConstraint"> + <summary> + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.TypeConstraint.expectedType"> + <summary> + The expected Type used by the constraint + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.TypeConstraint.#ctor(System.Type)"> + <summary> + Construct a TypeConstraint for a given Type + </summary> + <param name="type"></param> + </member> + <member name="M:NUnit.Framework.Constraints.TypeConstraint.WriteActualValueTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the actual value for a failing constraint test to a + MessageWriter. TypeCOnstraints override this method to write + the name of the type. + </summary> + <param name="writer">The writer on which the actual value is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.ExactTypeConstraint"> + <summary> + ExactTypeConstraint is used to test that an object + is of the exact type provided in the constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.#ctor(System.Type)"> + <summary> + Construct an ExactTypeConstraint for a given Type + </summary> + <param name="type"></param> + </member> + <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.Matches(System.Object)"> + <summary> + Test that an object is of the exact type specified + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the description of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.InstanceOfTypeConstraint"> + <summary> + InstanceOfTypeConstraint is used to test that an object + is of the same type provided or derived from it. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.#ctor(System.Type)"> + <summary> + Construct an InstanceOfTypeConstraint for the type provided + </summary> + <param name="type"></param> + </member> + <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.Matches(System.Object)"> + <summary> + Test whether an object is of the specified type or a derived type + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.AssignableFromConstraint"> + <summary> + AssignableFromConstraint is used to test that an object + can be assigned from a given Type. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.#ctor(System.Type)"> + <summary> + Construct an AssignableFromConstraint for the type provided + </summary> + <param name="type"></param> + </member> + <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.Matches(System.Object)"> + <summary> + Test whether an object can be assigned from the specified type + </summary> + <param name="actual"></param> + <returns></returns> + </member> + <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a description of this constraint to a MessageWriter + </summary> + <param name="writer"></param> + </member> + <member name="T:NUnit.Framework.Constraints.ComparisonConstraint"> + <summary> + Abstract base class for constraints that compare values to + determine if one is greater than, equal to or less than + the other. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.expected"> + <summary> + The value against which a comparison is to be made + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.ltOK"> + <summary> + If true, less than returns success + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.eqOK"> + <summary> + if true, equal returns success + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.gtOK"> + <summary> + if true, greater than returns success + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.predicate"> + <summary> + The predicate used as a part of the description + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.#ctor(System.IComparable,System.Boolean,System.Boolean,System.Boolean,System.String)"> + <summary> + Initializes a new instance of the <see cref="T:ComparisonConstraint"/> class. + </summary> + <param name="value">The value against which to make a comparison.</param> + <param name="ltOK">if set to <c>true</c> less succeeds.</param> + <param name="eqOK">if set to <c>true</c> equal succeeds.</param> + <param name="gtOK">if set to <c>true</c> greater succeeds.</param> + <param name="predicate">String used in describing the constraint.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.GreaterThanConstraint"> + <summary> + Tests whether a value is greater than the value supplied to its constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.GreaterThanConstraint.#ctor(System.IComparable)"> + <summary> + Initializes a new instance of the <see cref="T:GreaterThanConstraint"/> class. + </summary> + <param name="expected">The expected value.</param> + </member> + <member name="T:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint"> + <summary> + Tests whether a value is greater than or equal to the value supplied to its constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint.#ctor(System.IComparable)"> + <summary> + Initializes a new instance of the <see cref="T:GreaterThanOrEqualConstraint"/> class. + </summary> + <param name="expected">The expected value.</param> + </member> + <member name="T:NUnit.Framework.Constraints.LessThanConstraint"> + <summary> + Tests whether a value is less than the value supplied to its constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.LessThanConstraint.#ctor(System.IComparable)"> + <summary> + Initializes a new instance of the <see cref="T:LessThanConstraint"/> class. + </summary> + <param name="expected">The expected value.</param> + </member> + <member name="T:NUnit.Framework.Constraints.LessThanOrEqualConstraint"> + <summary> + Tests whether a value is less than or equal to the value supplied to its constructor + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.LessThanOrEqualConstraint.#ctor(System.IComparable)"> + <summary> + Initializes a new instance of the <see cref="T:LessThanOrEqualConstraint"/> class. + </summary> + <param name="expected">The expected value.</param> + </member> + <member name="T:NUnit.Framework.Constraints.NotConstraint"> + <summary> + NotConstraint negates the effect of some other constraint + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.NotConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> + <summary> + Initializes a new instance of the <see cref="T:NotConstraint"/> class. + </summary> + <param name="baseConstraint">The base constraint to be negated.</param> + </member> + <member name="M:NUnit.Framework.Constraints.NotConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for if the base constraint fails, false if it succeeds</returns> + </member> + <member name="M:NUnit.Framework.Constraints.NotConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="M:NUnit.Framework.Constraints.NotConstraint.WriteActualValueTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the actual value for a failing constraint test to a MessageWriter. + </summary> + <param name="writer">The writer on which the actual value is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.ContainsConstraint"> + <summary> + ContainsConstraint tests a whether a string contains a substring + or a collection contains an object. It postpones the decision of + which test to use until the type of the actual argument is known. + This allows testing whether a string is contained in a collection + or as a substring of another string using the same syntax. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.ContainsConstraint.#ctor(System.Object)"> + <summary> + Initializes a new instance of the <see cref="T:ContainsConstraint"/> class. + </summary> + <param name="expected">The expected.</param> + </member> + <member name="M:NUnit.Framework.Constraints.ContainsConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.ContainsConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.PropertyConstraint"> + <summary> + Summary description for PropertyConstraint. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.PropertyConstraint.#ctor(System.String,System.Object)"> + <summary> + Initializes a new instance of the <see cref="T:PropertyConstraint"/> class. + </summary> + <param name="name">The name.</param> + <param name="expected">The expected.</param> + </member> + <member name="M:NUnit.Framework.Constraints.PropertyConstraint.Matches(System.Object)"> + <summary> + Test whether the constraint is satisfied by a given value + </summary> + <param name="actual">The value to be tested</param> + <returns>True for success, false for failure</returns> + </member> + <member name="M:NUnit.Framework.Constraints.PropertyConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the constraint description to a MessageWriter + </summary> + <param name="writer">The writer on which the description is displayed</param> + </member> + <member name="M:NUnit.Framework.Constraints.PropertyConstraint.WriteActualValueTo(NUnit.Framework.MessageWriter)"> + <summary> + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + </summary> + <param name="writer">The writer on which the actual value is displayed</param> + </member> + <member name="T:NUnit.Framework.Constraints.BinaryOperation"> + <summary> + BinaryOperation is the abstract base of all constraints + that combine two other constraints in some fashion. + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.BinaryOperation.left"> + <summary> + The first constraint being combined + </summary> + </member> + <member name="F:NUnit.Framework.Constraints.BinaryOperation.right"> + <summary> + The second constraint being combined + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.BinaryOperation.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + Construct a BinaryOperation from two other constraints + </summary> + <param name="left"></param> + <param name="right"></param> + </member> + <member name="T:NUnit.Framework.Constraints.AndConstraint"> + <summary> + AndConstraint succeeds only if both members succeed. + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + Create an AndConstraint from two other constraints + </summary> + <param name="left">The first constraint</param> + <param name="right">The second constraint</param> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.Matches(System.Object)"> + <summary> + Apply both member constraints to an actual value, succeeding + succeeding only if both of them succeed. + </summary> + <param name="actual">The actual value</param> + <returns>True if the constraints both succeeded</returns> + </member> + <member name="M:NUnit.Framework.Constraints.AndConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a description for this contraint to a MessageWriter + </summary> + <param name="writer">The MessageWriter to receive the description</param> + </member> + <member name="T:NUnit.Framework.Constraints.OrConstraint"> + <summary> + OrConstraint succeeds if either member succeeds + </summary> + </member> + <member name="M:NUnit.Framework.Constraints.OrConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> + <summary> + Create an OrConstraint from two other constraints + </summary> + <param name="left">The first constraint</param> + <param name="right">The second constraint</param> + </member> + <member name="M:NUnit.Framework.Constraints.OrConstraint.Matches(System.Object)"> + <summary> + Apply the member constraints to an actual value, succeeding + succeeding as soon as one of them succeeds. + </summary> + <param name="actual">The actual value</param> + <returns>True if either constraint succeeded</returns> + </member> + <member name="M:NUnit.Framework.Constraints.OrConstraint.WriteDescriptionTo(NUnit.Framework.MessageWriter)"> + <summary> + Write a description for this contraint to a MessageWriter + </summary> + <param name="writer">The MessageWriter to receive the description</param> + </member> + <member name="T:NUnit.Framework.SyntaxHelpers.Is"> + <summary> + The Is class is a helper class ... [truncated message content] |