Skip to content

Commit

Permalink
Added ITweetTextParts
Browse files Browse the repository at this point in the history
  • Loading branch information
linvi committed Jun 22, 2016
1 parent 37b9e0c commit 61e4668
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Tweetinvi.Core/Extensions/StringExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Text;
using System.Text.RegularExpressions;
using Tweetinvi.Core.Helpers;
using Tweetinvi.Core.Interfaces.Models;

namespace Tweetinvi.Core.Extensions
{
Expand Down Expand Up @@ -65,7 +66,7 @@ private static Regex LinkParser
/// <summary>
/// Returns the different parts of an Extended Tweet string.
/// </summary>
public static TweetTextParts TweetParts(this string tweetText)
public static ITweetTextParts TweetParts(this string tweetText)
{
return new TweetTextParts(tweetText);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Tweetinvi.Core.Interfaces.Models;

namespace Tweetinvi.Core.Helpers
{
public class TweetTextParts
public class TweetTextParts : ITweetTextParts
{
public TweetTextParts(string text)
{
Expand All @@ -30,4 +31,4 @@ public TweetTextParts(string text)
public string Prefix { get; private set; }
public string[] Mentions { get; private set; }
}
}
}
14 changes: 14 additions & 0 deletions Tweetinvi.Core/Interfaces/Models/ITweetTextParts.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tweetinvi.Core.Interfaces.Models
{
public interface ITweetTextParts
{
string Content { get; }
string Prefix { get; }
string[] Mentions { get; }
}
}
3 changes: 2 additions & 1 deletion Tweetinvi.Core/Tweetinvi.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<Compile Include="Helpers\SynchronousInvoker.cs" />
<Compile Include="Helpers\TaskFactory.cs" />
<Compile Include="Helpers\ThreadHelper.cs" />
<Compile Include="Helpers\TweetParts.cs" />
<Compile Include="Helpers\TweetTextParts.cs" />
<Compile Include="Injectinvi\ConstructorNamedParameter.cs" />
<Compile Include="Injectinvi\IFactory.cs" />
<Compile Include="Injectinvi\ITweetinviModule.cs" />
Expand Down Expand Up @@ -142,6 +142,7 @@
<Compile Include="Interfaces\Models\ICategorySuggestion.cs" />
<Compile Include="Interfaces\DTO\QueryDTO\ITwitterListCursorQueryResultDTO.cs" />
<Compile Include="Interfaces\Factories\ITwitterListIdentifierFactory.cs" />
<Compile Include="Interfaces\Models\ITweetTextParts.cs" />
<Compile Include="Interfaces\Models\StreamMessages\AccessRevokedInfo.cs" />
<Compile Include="Interfaces\DTO\IMedia.cs" />
<Compile Include="Interfaces\DTO\ISearchMetadata.cs" />
Expand Down

0 comments on commit 61e4668

Please sign in to comment.