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 26edf8b0e..5007cc6bb 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 30ef075b9..d837f2523 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 78cdef0c4..a74aacd50 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 45c73631c..6c7dc9d2d 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 273dfb1ad..fa566ee59 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 1ee4ea6c0..d727a8614 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 6a586d5ce..8570ebabb 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 dc8100c92..688de17d0 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 548246887..f024bbc32 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 b53aad5a9..f5caa351a 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 e7c23f61c..4122433b3 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 29e19245c..02e6a1e75 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 c1beeeeea..cd5e4387d 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 0b5b2f1aa..eeaaa5fdd 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 94788b2c6..95d2a99b5 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 fce5b4245..d41ac8e82 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 7ad9f38ec..e203cbfa6 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 c359c0ffd..29233ee81 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 1f5364f0c..d06d302cd 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 9dbf1576d..a08d50226 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 3b2320db2..8f8540f15 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 8d11d8267..89301191f 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 e91541c3c..b18a7386a 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 b51181f23..9c1aa5b61 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 fe085acc4..aa057cc89 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 2eedd2538..80ca51725 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 9fad43d74..349e289b3 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 0e77601ba..82c95ebd3 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 35bf796e6..bb1c3f98c 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 46af6215b..101d7f7df 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 a56a6edab..34fef0365 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 a95d151eb..31549227a 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 8e147878b..a815a6bce 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 90a273959..87921ddca 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 4340d4c3f..2ae116521 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 1ec3622b2..12bcc52f2 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 19bc60347..359f4002a 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 12c86fdbf..224b544aa 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 2827283ff..015179336 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 9e4cf6056..78b802891 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 5a190ab72..c39917e29 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