diff --git a/OpenTween.Tests/Api/GraphQL/CreateTweetRequestTest.cs b/OpenTween.Tests/Api/GraphQL/CreateTweetRequestTest.cs index 87d48597a..7994fee81 100644 --- a/OpenTween.Tests/Api/GraphQL/CreateTweetRequestTest.cs +++ b/OpenTween.Tests/Api/GraphQL/CreateTweetRequestTest.cs @@ -22,7 +22,6 @@ using System.Threading.Tasks; using Moq; using OpenTween.Connection; -using OpenTween.Models; using OpenTween.SocialProtocol.Twitter; using Xunit; diff --git a/OpenTween.Tests/Api/GraphQL/TimelineTweetTest.cs b/OpenTween.Tests/Api/GraphQL/TimelineTweetTest.cs index 2ac9f04d4..baff23f05 100644 --- a/OpenTween.Tests/Api/GraphQL/TimelineTweetTest.cs +++ b/OpenTween.Tests/Api/GraphQL/TimelineTweetTest.cs @@ -19,17 +19,14 @@ // the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, // Boston, MA 02110-1301, USA. -using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Runtime.Serialization.Json; -using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; using System.Xml; using System.Xml.Linq; using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; using Xunit; namespace OpenTween.Api.GraphQL diff --git a/OpenTween.Tests/Api/TwitterApiTest.cs b/OpenTween.Tests/Api/TwitterApiTest.cs index 21b9c931d..979bf6473 100644 --- a/OpenTween.Tests/Api/TwitterApiTest.cs +++ b/OpenTween.Tests/Api/TwitterApiTest.cs @@ -21,18 +21,14 @@ using System; using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Net; using System.Net.Http; using System.Reflection; using System.Runtime.InteropServices; -using System.Text; using System.Threading.Tasks; using Moq; using OpenTween.Api.DataModel; using OpenTween.Connection; -using OpenTween.Models; using OpenTween.SocialProtocol.Twitter; using Xunit; diff --git a/OpenTween.Tests/Models/PostClassTest.cs b/OpenTween.Tests/Models/PostClassTest.cs index 291b061fa..5d632542e 100644 --- a/OpenTween.Tests/Models/PostClassTest.cs +++ b/OpenTween.Tests/Models/PostClassTest.cs @@ -20,13 +20,8 @@ // Boston, MA 02110-1301, USA. using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; +using OpenTween.SocialProtocol.Twitter; using Xunit; -using Xunit.Extensions; namespace OpenTween.Models { diff --git a/OpenTween.Tests/Models/PostFilterRuleTest.cs b/OpenTween.Tests/Models/PostFilterRuleTest.cs index a83b42210..13e017e52 100644 --- a/OpenTween.Tests/Models/PostFilterRuleTest.cs +++ b/OpenTween.Tests/Models/PostFilterRuleTest.cs @@ -20,11 +20,8 @@ // Boston, MA 02110-1301, USA. using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using OpenTween.SocialProtocol.Twitter; using Xunit; -using Xunit.Extensions; namespace OpenTween.Models { diff --git a/OpenTween.Tests/Models/QueryCursorTest.cs b/OpenTween.Tests/Models/QueryCursorTest.cs index 679c2f055..f520089d2 100644 --- a/OpenTween.Tests/Models/QueryCursorTest.cs +++ b/OpenTween.Tests/Models/QueryCursorTest.cs @@ -20,6 +20,7 @@ // Boston, MA 02110-1301, USA. using OpenTween.Api.GraphQL; +using OpenTween.SocialProtocol.Twitter; using Xunit; namespace OpenTween.Models diff --git a/OpenTween.Tests/Models/StatusTextHistoryTest.cs b/OpenTween.Tests/Models/StatusTextHistoryTest.cs index 01e240088..934768395 100644 --- a/OpenTween.Tests/Models/StatusTextHistoryTest.cs +++ b/OpenTween.Tests/Models/StatusTextHistoryTest.cs @@ -19,6 +19,7 @@ // the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, // Boston, MA 02110-1301, USA. +using OpenTween.SocialProtocol.Twitter; using Xunit; namespace OpenTween.Models diff --git a/OpenTween.Tests/Models/TabInformationTest.cs b/OpenTween.Tests/Models/TabInformationTest.cs index 6f3dc460d..729463928 100644 --- a/OpenTween.Tests/Models/TabInformationTest.cs +++ b/OpenTween.Tests/Models/TabInformationTest.cs @@ -23,11 +23,10 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; -using System.Text; using System.Windows.Forms; using OpenTween.SocialProtocol; +using OpenTween.SocialProtocol.Twitter; using Xunit; -using Xunit.Extensions; namespace OpenTween.Models { diff --git a/OpenTween.Tests/Models/TabModelTest.cs b/OpenTween.Tests/Models/TabModelTest.cs index b7dc70fed..f37505bb2 100644 --- a/OpenTween.Tests/Models/TabModelTest.cs +++ b/OpenTween.Tests/Models/TabModelTest.cs @@ -20,13 +20,10 @@ // Boston, MA 02110-1301, USA. using System; -using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; +using OpenTween.SocialProtocol.Twitter; using Xunit; -using Xunit.Extensions; namespace OpenTween.Models { diff --git a/OpenTween.Tests/MyCommonTest.cs b/OpenTween.Tests/MyCommonTest.cs index 32bbf2c03..f83b2fb01 100644 --- a/OpenTween.Tests/MyCommonTest.cs +++ b/OpenTween.Tests/MyCommonTest.cs @@ -20,19 +20,14 @@ // Boston, MA 02110-1301, USA. using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Text; using System.Windows.Forms; using Moq; -using OpenTween; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; using Xunit; -using Xunit.Extensions; namespace OpenTween { diff --git a/OpenTween.Tests/SocialProtocol/Misskey/MisskeyPostFactoryTest.cs b/OpenTween.Tests/SocialProtocol/Misskey/MisskeyPostFactoryTest.cs index 5d371ea6d..2d7c8d5b8 100644 --- a/OpenTween.Tests/SocialProtocol/Misskey/MisskeyPostFactoryTest.cs +++ b/OpenTween.Tests/SocialProtocol/Misskey/MisskeyPostFactoryTest.cs @@ -20,7 +20,7 @@ // Boston, MA 02110-1301, USA. using OpenTween.Api.Misskey; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; using Xunit; namespace OpenTween.SocialProtocol.Misskey diff --git a/OpenTween.Tests/Models/TwitterPostFactoryTest.cs b/OpenTween.Tests/SocialProtocol/Twitter/TwitterPostFactoryTest.cs similarity index 99% rename from OpenTween.Tests/Models/TwitterPostFactoryTest.cs rename to OpenTween.Tests/SocialProtocol/Twitter/TwitterPostFactoryTest.cs index 6ab4e5f21..510da86f0 100644 --- a/OpenTween.Tests/Models/TwitterPostFactoryTest.cs +++ b/OpenTween.Tests/SocialProtocol/Twitter/TwitterPostFactoryTest.cs @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using OpenTween.Api.DataModel; +using OpenTween.SocialProtocol.Twitter; using Xunit; namespace OpenTween.Models diff --git a/OpenTween.Tests/TimelineListViewCacheTest.cs b/OpenTween.Tests/TimelineListViewCacheTest.cs index 667e05f83..faabd971f 100644 --- a/OpenTween.Tests/TimelineListViewCacheTest.cs +++ b/OpenTween.Tests/TimelineListViewCacheTest.cs @@ -22,6 +22,7 @@ using System; using OpenTween.Models; using OpenTween.OpenTweenCustomControl; +using OpenTween.SocialProtocol.Twitter; using Xunit; namespace OpenTween diff --git a/OpenTween.Tests/TimelineListViewStateTest.cs b/OpenTween.Tests/TimelineListViewStateTest.cs index a49d74cbe..b6e8a6cdc 100644 --- a/OpenTween.Tests/TimelineListViewStateTest.cs +++ b/OpenTween.Tests/TimelineListViewStateTest.cs @@ -24,6 +24,7 @@ using System.Windows.Forms; using OpenTween.Models; using OpenTween.OpenTweenCustomControl; +using OpenTween.SocialProtocol.Twitter; using Xunit; namespace OpenTween diff --git a/OpenTween.Tests/TweenMainTest.cs b/OpenTween.Tests/TweenMainTest.cs index c51a29973..36bc985e2 100644 --- a/OpenTween.Tests/TweenMainTest.cs +++ b/OpenTween.Tests/TweenMainTest.cs @@ -20,9 +20,7 @@ // Boston, MA 02110-1301, USA. using System; -using System.Collections.Generic; using System.IO; -using System.Linq; using System.Reflection; using System.Text; using System.Text.RegularExpressions; @@ -33,9 +31,9 @@ using OpenTween.OpenTweenCustomControl; using OpenTween.Setting; using OpenTween.SocialProtocol; +using OpenTween.SocialProtocol.Twitter; using OpenTween.Thumbnail; using Xunit; -using Xunit.Extensions; namespace OpenTween { diff --git a/OpenTween.Tests/TweetDetailsViewTest.cs b/OpenTween.Tests/TweetDetailsViewTest.cs index 928c35c6b..a03b11dd1 100644 --- a/OpenTween.Tests/TweetDetailsViewTest.cs +++ b/OpenTween.Tests/TweetDetailsViewTest.cs @@ -19,13 +19,9 @@ // the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, // Boston, MA 02110-1301, USA. -using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; using Xunit; namespace OpenTween diff --git a/OpenTween.Tests/TweetThumbnailTest.cs b/OpenTween.Tests/TweetThumbnailTest.cs index 923a3e8b6..bdadda5d5 100644 --- a/OpenTween.Tests/TweetThumbnailTest.cs +++ b/OpenTween.Tests/TweetThumbnailTest.cs @@ -20,14 +20,12 @@ // Boston, MA 02110-1301, USA. using System; -using System.Collections.Generic; -using System.Linq; using System.Net.Http; -using System.Text; using System.Threading; using System.Threading.Tasks; using Moq; using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; using OpenTween.Thumbnail; using OpenTween.Thumbnail.Services; using Xunit; diff --git a/OpenTween/Api/DataModel/TwitterPageable.cs b/OpenTween/Api/DataModel/TwitterPageable.cs index 5a5b01e45..fce5a0298 100644 --- a/OpenTween/Api/DataModel/TwitterPageable.cs +++ b/OpenTween/Api/DataModel/TwitterPageable.cs @@ -27,7 +27,7 @@ using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.DataModel { diff --git a/OpenTween/Api/GraphQL/CreateRetweetRequest.cs b/OpenTween/Api/GraphQL/CreateRetweetRequest.cs index 16df55b24..0d5834606 100644 --- a/OpenTween/Api/GraphQL/CreateRetweetRequest.cs +++ b/OpenTween/Api/GraphQL/CreateRetweetRequest.cs @@ -25,7 +25,7 @@ using System.Threading.Tasks; using System.Xml.XPath; using OpenTween.Connection; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.GraphQL { diff --git a/OpenTween/Api/GraphQL/CreateTweetRequest.cs b/OpenTween/Api/GraphQL/CreateTweetRequest.cs index d91da2527..e32394408 100644 --- a/OpenTween/Api/GraphQL/CreateTweetRequest.cs +++ b/OpenTween/Api/GraphQL/CreateTweetRequest.cs @@ -29,7 +29,6 @@ using System.Xml.XPath; using OpenTween.Api.DataModel; using OpenTween.Connection; -using OpenTween.Models; using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.GraphQL diff --git a/OpenTween/Api/GraphQL/DeleteRetweetRequest.cs b/OpenTween/Api/GraphQL/DeleteRetweetRequest.cs index 500ed372e..5f06dc285 100644 --- a/OpenTween/Api/GraphQL/DeleteRetweetRequest.cs +++ b/OpenTween/Api/GraphQL/DeleteRetweetRequest.cs @@ -24,7 +24,7 @@ using System; using System.Threading.Tasks; using OpenTween.Connection; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.GraphQL { diff --git a/OpenTween/Api/GraphQL/DeleteTweetRequest.cs b/OpenTween/Api/GraphQL/DeleteTweetRequest.cs index db3b28c63..988b40ed7 100644 --- a/OpenTween/Api/GraphQL/DeleteTweetRequest.cs +++ b/OpenTween/Api/GraphQL/DeleteTweetRequest.cs @@ -24,7 +24,7 @@ using System; using System.Threading.Tasks; using OpenTween.Connection; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.GraphQL { diff --git a/OpenTween/Api/GraphQL/FavoriteTweetRequest.cs b/OpenTween/Api/GraphQL/FavoriteTweetRequest.cs index 1abe7ecf3..a2abf1075 100644 --- a/OpenTween/Api/GraphQL/FavoriteTweetRequest.cs +++ b/OpenTween/Api/GraphQL/FavoriteTweetRequest.cs @@ -24,7 +24,7 @@ using System; using System.Threading.Tasks; using OpenTween.Connection; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.GraphQL { diff --git a/OpenTween/Api/GraphQL/LikesRequest.cs b/OpenTween/Api/GraphQL/LikesRequest.cs index 31dd29402..745ba8e6a 100644 --- a/OpenTween/Api/GraphQL/LikesRequest.cs +++ b/OpenTween/Api/GraphQL/LikesRequest.cs @@ -25,7 +25,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using OpenTween.Connection; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.GraphQL { diff --git a/OpenTween/Api/GraphQL/TweetDetailRequest.cs b/OpenTween/Api/GraphQL/TweetDetailRequest.cs index b8c4151d3..4ce2a08f2 100644 --- a/OpenTween/Api/GraphQL/TweetDetailRequest.cs +++ b/OpenTween/Api/GraphQL/TweetDetailRequest.cs @@ -25,7 +25,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using OpenTween.Connection; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.GraphQL { diff --git a/OpenTween/Api/GraphQL/UnfavoriteTweetRequest.cs b/OpenTween/Api/GraphQL/UnfavoriteTweetRequest.cs index c952da207..1fac0a79e 100644 --- a/OpenTween/Api/GraphQL/UnfavoriteTweetRequest.cs +++ b/OpenTween/Api/GraphQL/UnfavoriteTweetRequest.cs @@ -24,7 +24,7 @@ using System; using System.Threading.Tasks; using OpenTween.Connection; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.GraphQL { diff --git a/OpenTween/Api/GraphQL/UserTweetsAndRepliesRequest.cs b/OpenTween/Api/GraphQL/UserTweetsAndRepliesRequest.cs index f5d629fba..bef0ed663 100644 --- a/OpenTween/Api/GraphQL/UserTweetsAndRepliesRequest.cs +++ b/OpenTween/Api/GraphQL/UserTweetsAndRepliesRequest.cs @@ -25,7 +25,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using OpenTween.Connection; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.GraphQL { diff --git a/OpenTween/Api/TwitterApi.cs b/OpenTween/Api/TwitterApi.cs index a53d070f1..bd4aa41a0 100644 --- a/OpenTween/Api/TwitterApi.cs +++ b/OpenTween/Api/TwitterApi.cs @@ -31,7 +31,6 @@ using System.Threading.Tasks; using OpenTween.Api.DataModel; using OpenTween.Connection; -using OpenTween.Models; using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api diff --git a/OpenTween/Api/TwitterV2/GetTimelineRequest.cs b/OpenTween/Api/TwitterV2/GetTimelineRequest.cs index 24faa6b23..c246246c5 100644 --- a/OpenTween/Api/TwitterV2/GetTimelineRequest.cs +++ b/OpenTween/Api/TwitterV2/GetTimelineRequest.cs @@ -28,7 +28,7 @@ using System.Threading.Tasks; using OpenTween.Api.DataModel; using OpenTween.Connection; -using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Api.TwitterV2 { diff --git a/OpenTween/ListElement.cs b/OpenTween/ListElement.cs index 5344e2722..70f032e37 100644 --- a/OpenTween/ListElement.cs +++ b/OpenTween/ListElement.cs @@ -31,6 +31,7 @@ using System.Xml.Serialization; using OpenTween.Api.DataModel; using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween { diff --git a/OpenTween/Models/TabInformations.cs b/OpenTween/Models/TabInformations.cs index 89110aff7..d3030dad6 100644 --- a/OpenTween/Models/TabInformations.cs +++ b/OpenTween/Models/TabInformations.cs @@ -37,6 +37,7 @@ using System.Windows.Forms; using OpenTween.Setting; using OpenTween.SocialProtocol; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.Models { diff --git a/OpenTween/MyCommon.cs b/OpenTween/MyCommon.cs index 71e24a571..c29b30311 100644 --- a/OpenTween/MyCommon.cs +++ b/OpenTween/MyCommon.cs @@ -51,7 +51,6 @@ using System.Threading.Tasks; using System.Web; using System.Windows.Forms; -using OpenTween.Models; using OpenTween.Setting; using OpenTween.SocialProtocol.Twitter; diff --git a/OpenTween/SocialProtocol/InvalidAccount.cs b/OpenTween/SocialProtocol/InvalidAccount.cs index 24d31a23d..4c47ac620 100644 --- a/OpenTween/SocialProtocol/InvalidAccount.cs +++ b/OpenTween/SocialProtocol/InvalidAccount.cs @@ -26,6 +26,7 @@ using OpenTween.Api; using OpenTween.Connection; using OpenTween.Models; +using OpenTween.SocialProtocol.Twitter; namespace OpenTween.SocialProtocol { diff --git a/OpenTween/SocialProtocol/Misskey/MisskeyPostFactory.cs b/OpenTween/SocialProtocol/Misskey/MisskeyPostFactory.cs index 743341a95..f4296e60a 100644 --- a/OpenTween/SocialProtocol/Misskey/MisskeyPostFactory.cs +++ b/OpenTween/SocialProtocol/Misskey/MisskeyPostFactory.cs @@ -28,6 +28,7 @@ using OpenTween.Api.Misskey; using OpenTween.Models; using OpenTween.Setting; +using OpenTween.SocialProtocol.Twitter; using OpenTween.Thumbnail; namespace OpenTween.SocialProtocol.Misskey diff --git a/OpenTween/Models/TwitterDirectMessageId.cs b/OpenTween/SocialProtocol/Twitter/TwitterDirectMessageId.cs similarity index 94% rename from OpenTween/Models/TwitterDirectMessageId.cs rename to OpenTween/SocialProtocol/Twitter/TwitterDirectMessageId.cs index 13d3fdbf3..cb6278485 100644 --- a/OpenTween/Models/TwitterDirectMessageId.cs +++ b/OpenTween/SocialProtocol/Twitter/TwitterDirectMessageId.cs @@ -22,8 +22,9 @@ #nullable enable using System; +using OpenTween.Models; -namespace OpenTween.Models +namespace OpenTween.SocialProtocol.Twitter { public class TwitterDirectMessageId : PostId { diff --git a/OpenTween/Models/TwitterPostFactory.cs b/OpenTween/SocialProtocol/Twitter/TwitterPostFactory.cs similarity index 99% rename from OpenTween/Models/TwitterPostFactory.cs rename to OpenTween/SocialProtocol/Twitter/TwitterPostFactory.cs index dba5b3c39..8a9a71f28 100644 --- a/OpenTween/Models/TwitterPostFactory.cs +++ b/OpenTween/SocialProtocol/Twitter/TwitterPostFactory.cs @@ -23,14 +23,13 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; using System.Net; using System.Text.RegularExpressions; using OpenTween.Api.DataModel; -using OpenTween.Setting; +using OpenTween.Models; -namespace OpenTween.Models +namespace OpenTween.SocialProtocol.Twitter { public class TwitterPostFactory { @@ -402,7 +401,7 @@ private static string CreateAccessibleText(string text, TwitterEntities? entitie { if (quotedStatus != null) { - var matchStatusUrl = Twitter.StatusUrlRegex.Match(entity.ExpandedUrl); + var matchStatusUrl = OpenTween.Twitter.StatusUrlRegex.Match(entity.ExpandedUrl); if (matchStatusUrl.Success && matchStatusUrl.Groups["StatusId"].Value == quotedStatus.IdStr) { var quotedText = CreateAccessibleText(quotedStatus.FullText, quotedStatus.MergedEntities, quotedStatus: null, quotedStatusLink: null); @@ -553,7 +552,7 @@ public static IEnumerable GetQuoteTweetStatusIds(IEnumerable