From 168587b2a0d1f495a9f85e05b1e518f615b0cfcc Mon Sep 17 00:00:00 2001 From: Sven Van den brande Date: Sun, 27 Mar 2016 23:11:27 +0200 Subject: Remove unused code... --- OpenSubtitlesHandler/MethodResponses/MethodResponseAutoUpdate.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseCheckMovieHash.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseCheckMovieHash2.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseCheckSubHash.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseError.cs | 2 +- .../MethodResponses/MethodResponseGetAvailableTranslations.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseGetComments.cs | 4 +--- OpenSubtitlesHandler/MethodResponses/MethodResponseGetSubLanguages.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseGetTranslation.cs | 1 - OpenSubtitlesHandler/MethodResponses/MethodResponseInsertMovie.cs | 1 - OpenSubtitlesHandler/MethodResponses/MethodResponseLogIn.cs | 1 - OpenSubtitlesHandler/MethodResponses/MethodResponseMovieDetails.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseMovieSearch.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseNoOperation.cs | 1 - .../MethodResponses/MethodResponseReportWrongMovieHash.cs | 1 - OpenSubtitlesHandler/MethodResponses/MethodResponseServerInfo.cs | 2 +- .../MethodResponses/MethodResponseSubtitleDownload.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitleSearch.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitlesVote.cs | 1 - .../MethodResponses/MethodResponseTryUploadSubtitles.cs | 2 +- OpenSubtitlesHandler/MethodResponses/MethodResponseUploadSubtitles.cs | 1 - OpenSubtitlesHandler/MovieHasher.cs | 3 --- OpenSubtitlesHandler/Movies/CheckMovieHash2Result.cs | 2 +- OpenSubtitlesHandler/Movies/CheckMovieHashResult.cs | 1 - OpenSubtitlesHandler/Movies/MovieSearchResult.cs | 1 - OpenSubtitlesHandler/OtherTypes/GetCommentsResult.cs | 1 - OpenSubtitlesHandler/Properties/AssemblyInfo.cs | 1 - OpenSubtitlesHandler/SubtitleTypes/CheckSubHashResult.cs | 1 - OpenSubtitlesHandler/SubtitleTypes/SubtitleDownloadResult.cs | 1 - OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs | 1 - OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchResult.cs | 1 - OpenSubtitlesHandler/SubtitleTypes/TryUploadSubtitlesParameters.cs | 1 - OpenSubtitlesHandler/SubtitleTypes/UploadSubtitleInfoParameter.cs | 2 +- OpenSubtitlesHandler/SubtitleTypes/UploadSubtitleParameters.cs | 1 - OpenSubtitlesHandler/Utilities.cs | 3 --- OpenSubtitlesHandler/XML-RPC/Types/XmlRpcMethodCall.cs | 2 +- OpenSubtitlesHandler/XML-RPC/Values/IXmlRpcValue.cs | 1 - OpenSubtitlesHandler/XML-RPC/Values/XmlRpcStructMember.cs | 1 - OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueBasic.cs | 1 - OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueStruct.cs | 2 +- 40 files changed, 18 insertions(+), 46 deletions(-) (limited to 'OpenSubtitlesHandler') diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseAutoUpdate.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseAutoUpdate.cs index 26edf8b0ea..5007cc6bbf 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseAutoUpdate.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseAutoUpdate.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.ComponentModel; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckMovieHash.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckMovieHash.cs index 30ef075b97..d837f25235 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckMovieHash.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckMovieHash.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckMovieHash2.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckMovieHash2.cs index 78cdef0c4b..a74aacd50a 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckMovieHash2.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckMovieHash2.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckSubHash.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckSubHash.cs index 45c73631cf..6c7dc9d2d2 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckSubHash.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseCheckSubHash.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseError.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseError.cs index 273dfb1ad5..fa566ee591 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseError.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseError.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + namespace OpenSubtitlesHandler { /// diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseGetAvailableTranslations.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseGetAvailableTranslations.cs index 1ee4ea6c06..d727a86148 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseGetAvailableTranslations.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseGetAvailableTranslations.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseGetComments.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseGetComments.cs index 6a586d5ced..8570ebabbb 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseGetComments.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseGetComments.cs @@ -16,10 +16,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; -using System.Linq; -using System.Text; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseGetSubLanguages.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseGetSubLanguages.cs index dc8100c92e..688de17d07 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseGetSubLanguages.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseGetSubLanguages.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseGetTranslation.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseGetTranslation.cs index 5482468873..f024bbc325 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseGetTranslation.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseGetTranslation.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseInsertMovie.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseInsertMovie.cs index b53aad5a9d..f5caa351ad 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseInsertMovie.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseInsertMovie.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseLogIn.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseLogIn.cs index e7c23f61ca..4122433b3a 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseLogIn.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseLogIn.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieDetails.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieDetails.cs index 29e19245c1..02e6a1e75b 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieDetails.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieDetails.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieSearch.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieSearch.cs index c1beeeeeae..cd5e4387dd 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieSearch.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseMovieSearch.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseNoOperation.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseNoOperation.cs index 0b5b2f1aab..eeaaa5fdd6 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseNoOperation.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseNoOperation.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseReportWrongMovieHash.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseReportWrongMovieHash.cs index 94788b2c68..95d2a99b56 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseReportWrongMovieHash.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseReportWrongMovieHash.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseServerInfo.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseServerInfo.cs index fce5b42450..d41ac8e82a 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseServerInfo.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseServerInfo.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; using System.ComponentModel; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitleDownload.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitleDownload.cs index 7ad9f38ec4..e203cbfa6d 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitleDownload.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitleDownload.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitleSearch.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitleSearch.cs index c359c0ffd0..29233ee81e 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitleSearch.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitleSearch.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitlesVote.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitlesVote.cs index 1f5364f0c1..d06d302cd5 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitlesVote.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseSubtitlesVote.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseTryUploadSubtitles.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseTryUploadSubtitles.cs index 9dbf1576db..a08d502267 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseTryUploadSubtitles.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseTryUploadSubtitles.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/MethodResponses/MethodResponseUploadSubtitles.cs b/OpenSubtitlesHandler/MethodResponses/MethodResponseUploadSubtitles.cs index 3b2320db28..8f8540f15c 100644 --- a/OpenSubtitlesHandler/MethodResponses/MethodResponseUploadSubtitles.cs +++ b/OpenSubtitlesHandler/MethodResponses/MethodResponseUploadSubtitles.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/MovieHasher.cs b/OpenSubtitlesHandler/MovieHasher.cs index 8d11d82670..89301191fe 100644 --- a/OpenSubtitlesHandler/MovieHasher.cs +++ b/OpenSubtitlesHandler/MovieHasher.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/Movies/CheckMovieHash2Result.cs b/OpenSubtitlesHandler/Movies/CheckMovieHash2Result.cs index e91541c3ce..b18a7386ae 100644 --- a/OpenSubtitlesHandler/Movies/CheckMovieHash2Result.cs +++ b/OpenSubtitlesHandler/Movies/CheckMovieHash2Result.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/Movies/CheckMovieHashResult.cs b/OpenSubtitlesHandler/Movies/CheckMovieHashResult.cs index b51181f237..9c1aa5b617 100644 --- a/OpenSubtitlesHandler/Movies/CheckMovieHashResult.cs +++ b/OpenSubtitlesHandler/Movies/CheckMovieHashResult.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/Movies/MovieSearchResult.cs b/OpenSubtitlesHandler/Movies/MovieSearchResult.cs index fe085acc43..aa057cc890 100644 --- a/OpenSubtitlesHandler/Movies/MovieSearchResult.cs +++ b/OpenSubtitlesHandler/Movies/MovieSearchResult.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/OtherTypes/GetCommentsResult.cs b/OpenSubtitlesHandler/OtherTypes/GetCommentsResult.cs index 2eedd25380..80ca517251 100644 --- a/OpenSubtitlesHandler/OtherTypes/GetCommentsResult.cs +++ b/OpenSubtitlesHandler/OtherTypes/GetCommentsResult.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/Properties/AssemblyInfo.cs b/OpenSubtitlesHandler/Properties/AssemblyInfo.cs index 9fad43d749..349e289b39 100644 --- a/OpenSubtitlesHandler/Properties/AssemblyInfo.cs +++ b/OpenSubtitlesHandler/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/OpenSubtitlesHandler/SubtitleTypes/CheckSubHashResult.cs b/OpenSubtitlesHandler/SubtitleTypes/CheckSubHashResult.cs index 0e77601ba8..82c95ebd34 100644 --- a/OpenSubtitlesHandler/SubtitleTypes/CheckSubHashResult.cs +++ b/OpenSubtitlesHandler/SubtitleTypes/CheckSubHashResult.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/SubtitleTypes/SubtitleDownloadResult.cs b/OpenSubtitlesHandler/SubtitleTypes/SubtitleDownloadResult.cs index 35bf796e6a..bb1c3f98c1 100644 --- a/OpenSubtitlesHandler/SubtitleTypes/SubtitleDownloadResult.cs +++ b/OpenSubtitlesHandler/SubtitleTypes/SubtitleDownloadResult.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs b/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs index 46af6215ba..101d7f7df7 100644 --- a/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs +++ b/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchParameters.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchResult.cs b/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchResult.cs index a56a6edaba..34fef03650 100644 --- a/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchResult.cs +++ b/OpenSubtitlesHandler/SubtitleTypes/SubtitleSearchResult.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/SubtitleTypes/TryUploadSubtitlesParameters.cs b/OpenSubtitlesHandler/SubtitleTypes/TryUploadSubtitlesParameters.cs index a95d151eb2..31549227af 100644 --- a/OpenSubtitlesHandler/SubtitleTypes/TryUploadSubtitlesParameters.cs +++ b/OpenSubtitlesHandler/SubtitleTypes/TryUploadSubtitlesParameters.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/SubtitleTypes/UploadSubtitleInfoParameter.cs b/OpenSubtitlesHandler/SubtitleTypes/UploadSubtitleInfoParameter.cs index 8e147878ba..a815a6bceb 100644 --- a/OpenSubtitlesHandler/SubtitleTypes/UploadSubtitleInfoParameter.cs +++ b/OpenSubtitlesHandler/SubtitleTypes/UploadSubtitleInfoParameter.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace OpenSubtitlesHandler diff --git a/OpenSubtitlesHandler/SubtitleTypes/UploadSubtitleParameters.cs b/OpenSubtitlesHandler/SubtitleTypes/UploadSubtitleParameters.cs index 90a2739599..87921ddcae 100644 --- a/OpenSubtitlesHandler/SubtitleTypes/UploadSubtitleParameters.cs +++ b/OpenSubtitlesHandler/SubtitleTypes/UploadSubtitleParameters.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace OpenSubtitlesHandler { diff --git a/OpenSubtitlesHandler/Utilities.cs b/OpenSubtitlesHandler/Utilities.cs index 4340d4c3fe..2ae116521b 100644 --- a/OpenSubtitlesHandler/Utilities.cs +++ b/OpenSubtitlesHandler/Utilities.cs @@ -18,11 +18,8 @@ */ using System; using System.Collections.Generic; -using System.Linq; using System.Text; using System.IO; -using System.IO.Compression; -using System.Net; using System.Security.Cryptography; using System.Threading; using System.Threading.Tasks; diff --git a/OpenSubtitlesHandler/XML-RPC/Types/XmlRpcMethodCall.cs b/OpenSubtitlesHandler/XML-RPC/Types/XmlRpcMethodCall.cs index 1ec3622b23..12bcc52f26 100644 --- a/OpenSubtitlesHandler/XML-RPC/Types/XmlRpcMethodCall.cs +++ b/OpenSubtitlesHandler/XML-RPC/Types/XmlRpcMethodCall.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace XmlRpcHandler diff --git a/OpenSubtitlesHandler/XML-RPC/Values/IXmlRpcValue.cs b/OpenSubtitlesHandler/XML-RPC/Values/IXmlRpcValue.cs index 19bc60347b..359f4002a9 100644 --- a/OpenSubtitlesHandler/XML-RPC/Values/IXmlRpcValue.cs +++ b/OpenSubtitlesHandler/XML-RPC/Values/IXmlRpcValue.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace XmlRpcHandler { diff --git a/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcStructMember.cs b/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcStructMember.cs index 12c86fdbfe..224b544aa8 100644 --- a/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcStructMember.cs +++ b/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcStructMember.cs @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; namespace XmlRpcHandler { diff --git a/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueBasic.cs b/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueBasic.cs index 2827283ff8..0151793366 100644 --- a/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueBasic.cs +++ b/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueBasic.cs @@ -17,7 +17,6 @@ along with this program. If not, see . */ using System; -using System.Collections.Generic; namespace XmlRpcHandler { diff --git a/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueStruct.cs b/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueStruct.cs index 9e4cf6056e..78b8028912 100644 --- a/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueStruct.cs +++ b/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueStruct.cs @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -using System; + using System.Collections.Generic; namespace XmlRpcHandler -- cgit v1.2.3 From 0bf4d35f533195da40dd31428e74ab23932c89bf Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 3 Apr 2016 19:20:56 -0400 Subject: remove temp file from open subtitles --- OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs | 64 ++++++++++++------------- 1 file changed, 31 insertions(+), 33 deletions(-) (limited to 'OpenSubtitlesHandler') diff --git a/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs b/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs index 5a190ab729..c39917e298 100644 --- a/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs +++ b/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs @@ -51,47 +51,45 @@ namespace XmlRpcHandler XmlWriterSettings sett = new XmlWriterSettings(); sett.Indent = true; - var requestXmlPath = Path.Combine(Path.GetTempPath(), "request.xml"); - sett.Encoding = Encoding.UTF8; - FileStream str = new FileStream(requestXmlPath, FileMode.Create, FileAccess.Write); - XmlWriter XMLwrt = XmlWriter.Create(str, sett); - // Let's write the methods - foreach (XmlRpcMethodCall method in methods) + using (var ms = new MemoryStream()) { - XMLwrt.WriteStartElement("methodCall");//methodCall - XMLwrt.WriteStartElement("methodName");//methodName - XMLwrt.WriteString(method.Name); - XMLwrt.WriteEndElement();//methodName - XMLwrt.WriteStartElement("params");//params - // Write values - foreach (IXmlRpcValue p in method.Parameters) + XmlWriter XMLwrt = XmlWriter.Create(ms, sett); + // Let's write the methods + foreach (XmlRpcMethodCall method in methods) { - XMLwrt.WriteStartElement("param");//param - if (p is XmlRpcValueBasic) - { - WriteBasicValue(XMLwrt, (XmlRpcValueBasic)p); - } - else if (p is XmlRpcValueStruct) + XMLwrt.WriteStartElement("methodCall");//methodCall + XMLwrt.WriteStartElement("methodName");//methodName + XMLwrt.WriteString(method.Name); + XMLwrt.WriteEndElement();//methodName + XMLwrt.WriteStartElement("params");//params + // Write values + foreach (IXmlRpcValue p in method.Parameters) { - WriteStructValue(XMLwrt, (XmlRpcValueStruct)p); - } - else if (p is XmlRpcValueArray) - { - WriteArrayValue(XMLwrt, (XmlRpcValueArray)p); + XMLwrt.WriteStartElement("param");//param + if (p is XmlRpcValueBasic) + { + WriteBasicValue(XMLwrt, (XmlRpcValueBasic)p); + } + else if (p is XmlRpcValueStruct) + { + WriteStructValue(XMLwrt, (XmlRpcValueStruct)p); + } + else if (p is XmlRpcValueArray) + { + WriteArrayValue(XMLwrt, (XmlRpcValueArray)p); + } + XMLwrt.WriteEndElement();//param } - XMLwrt.WriteEndElement();//param - } - XMLwrt.WriteEndElement();//params - XMLwrt.WriteEndElement();//methodCall + XMLwrt.WriteEndElement();//params + XMLwrt.WriteEndElement();//methodCall + } + XMLwrt.Flush(); + XMLwrt.Close(); + return ms.ToArray(); } - XMLwrt.Flush(); - XMLwrt.Close(); - str.Close(); - string requestContent = File.ReadAllText(requestXmlPath); - return Encoding.UTF8.GetBytes(requestContent); } /// /// Decode response then return the values -- cgit v1.2.3