Skip to content

Commit 3ceb0a2

Browse files
committed
Merge 0.9.10.0 to Master
2 parents 166722a + 57937fa commit 3ceb0a2

File tree

541 files changed

+41766
-1359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

541 files changed

+41766
-1359
lines changed

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.pdb
2+
*.dll
3+
*.xml
4+
*.cache
5+
*.dll.config
6+
*.FileListAbsolute
7+
*/obj
8+
*/bin
9+
*.exe
10+
/.vs
11+
/packages
12+
/Developer Tools/temp*
13+
/Developer Tools/TweetinviAPI/lib
14+
/Examplinvi.Web/App_Data
15+
*.zip

Developer Tools/README - Signing - pfx.txt

-8
This file was deleted.

Developer Tools/README.txt

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
1+
**********************************************************
2+
****************** CONFIGURE MACHINE *********************
3+
**********************************************************
4+
5+
16
Install PowerShell Community Extensions to get the Write-Zip command
27

38
Add the PowerShell.Exe.Config to C:\Windows\System32\WindowsPowerShell\v1.0
49
Run : Set-ExecutionPolicy RemoteSigned
510

6-
Restart the machine (pscx cannot be used otherwise)
11+
Restart the machine (pscx cannot be used otherwise)
12+
13+
14+
**********************************************************
15+
************************ NUGET ***************************
16+
**********************************************************
17+
18+
19+
nuget pack
20+
nuget push <*.nupkg> -ApiKey 'MY_NUGET.ORG_APIKEY' -Verbosity detailed
21+
22+
23+
**********************************************************
24+
********************** VS SIGNING ************************
25+
**********************************************************
26+
27+
28+
Open Visual Studio Command Prompt
29+
30+
// Generate the public Key file
31+
sn -p tweetinvi.pfx tweetinvi.key
32+
33+
// Get the Hexa version of the public key
34+
// When performing this action the password should be requested
35+
sn -tp tweetinvi.key

Developer Tools/Tweetinvi.Builder.ps1

+84-64
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
$version='0.9.9.6'
1+
Param([Switch]$uv);
2+
3+
$version='0.9.10.0'
24
$assemblyinfoLocation = 'Properties\assemblyinfo.cs'
35
$rootPath = '..\'
46
$releaseMode = 'Release' # vs. 'Debug'
@@ -10,6 +12,9 @@ $net45PortableFolder = '.\TweetinviAPI\lib\portable-net45+wp80+win8+wpa81+dnxcor
1012
$tweetinviAPIMerged = 'TweetinviAPI.dll'
1113

1214
$examplinvi = 'Examplinvi'
15+
$examplinviUniversalApp = 'Examplinvi.UniversalApp'
16+
$examplinviWeb = 'Examplinvi.Web'
17+
1318
$testinvi = 'Testinvi'
1419
$tweetinvi = 'Tweetinvi'
1520
$tweetinviSecurity = 'Tweetinvi.Security'
@@ -25,6 +30,8 @@ $projects =
2530
@(
2631
# Other projects
2732
$examplinvi,
33+
$examplinviUniversalApp,
34+
$examplinviWeb,
2835
$testinvi,
2936

3037
# Tweetinvi API
@@ -75,68 +82,81 @@ for ($i=0; $i -lt $projects.length; $i++)
7582
Get-Item $filePath | .\Replace-Regex.ps1 -Pattern $replaceAssemblyFileVersionRegex -Replacement $replaceAssemblyFileVersion -overwrite
7683
}
7784

78-
# Build solution
79-
Build $rootPath'Tweetinvi.sln' $releaseMode
80-
81-
# Create temporary folder
82-
If (Test-Path $temporaryFolder)
83-
{
84-
Remove-Item $temporaryFolder\*
85-
}
86-
Else
87-
{
88-
mkdir $temporaryFolder
89-
}
90-
91-
# Move dll into temporary folder
92-
$examplinviBin = $rootPath + $examplinvi + '\bin\' + $releaseMode
93-
94-
Get-ChildItem -LiteralPath $examplinviBin -filter *.dll | % { Copy-Item $_.fullname $temporaryFolder }
95-
96-
Get-ChildItem -LiteralPath $examplinviBin -filter Tweetinvi*.dll | % { Copy-Item $_.fullname $net40Folder }
97-
Get-ChildItem -LiteralPath $examplinviBin -filter Tweetinvi*.dll | % { Copy-Item $_.fullname $net45Folder }
98-
Get-ChildItem -LiteralPath $examplinviBin -filter Tweetinvi*.dll | % { Copy-Item $_.fullname $net40PortableFolder }
99-
Get-ChildItem -LiteralPath $examplinviBin -filter Tweetinvi*.dll | % { Copy-Item $_.fullname $net45PortableFolder }
100-
101-
Copy-Item $rootPath$examplinvi\Program.cs $temporaryFolder\Cheatsheet.cs
102-
103-
# Create Merged assembly
104-
$ILMergeCommand = '.\ILMerge.exe /target:library /out:' + $temporaryFolder + '/' + $tweetinviAPIMerged + ' '
105-
106-
for ($i=0; $i -lt $additionalAssemblies.length; $i++)
107-
{
108-
$ILMergeCommand = $ILMergeCommand + $temporaryFolder + '/' + $additionalAssemblies[$i] + ' '
109-
}
110-
111-
for ($i=2; $i -lt $projects.length; $i++)
112-
{
113-
$ILMergeCommand = $ILMergeCommand + $temporaryFolder + '/' + $projects[$i] + '.dll '
114-
}
115-
116-
Write-Host $ILMergeCommand
117-
Invoke-Expression $ILMergeCommand
118-
119-
# Create Zip files
120-
$tweetinviBinariesPackage = 'Tweetinvi ' + $version + ' - Binaries.zip'
121-
$tweetinviMergedBinariesPackage = 'Tweetinvi ' + $version + ' - Merged Binaries.zip'
122-
123-
Write-Zip -OutputPath $tweetinviBinariesPackage (dir $temporaryFolder)
124-
Write-Zip -OutputPath $tweetinviMergedBinariesPackage (ls $temporaryFolder\$tweetinviAPIMerged, $temporaryFolder\Cheatsheet.cs)
125-
126-
#Cleanup
127-
rm DTAR_*
128-
rm -r .\obj
129-
$answer = Read-Host "Do you want to cleanup the temporary files? (y/n)"
130-
131-
while("y", "yes", "n", "no" -notcontains $answer)
132-
{
133-
$answer = Read-Host "Yes or No"
134-
}
135-
136-
if ($answer -eq "y" -or $answer -eq "yes")
137-
{
138-
Remove-Item $temporaryFolder -Force -Recurse
139-
Write-Host Temporary files successfully removed!
85+
$filePath = $rootPath + $tweetinviWebLogic + '\TwitterClientHandler.cs';
86+
Get-Item $filePath | .\Replace-Regex.ps1 -Pattern '"Tweetinvi/(?<versionNumber>\d+(\.\d+)*)(.x)?"' -Replacement ('"Tweetinvi/' + $version + '"') -overwrite
87+
88+
89+
if (!$uv.IsPresent) {
90+
# Build solution
91+
Build $rootPath'Tweetinvi.sln' $releaseMode
92+
93+
# Create temporary folder
94+
If (Test-Path $temporaryFolder)
95+
{
96+
Remove-Item $temporaryFolder\*
97+
}
98+
Else
99+
{
100+
mkdir $temporaryFolder
101+
}
102+
103+
# Move dll into temporary folder
104+
$examplinviBin = $rootPath + $examplinvi + '\bin\' + $releaseMode
105+
106+
Get-ChildItem -LiteralPath $examplinviBin -filter *.dll | % { Copy-Item $_.fullname $temporaryFolder }
107+
108+
# Ensure the nuget folders have been created
109+
mkdir $net40Folder -Force | Out-Null
110+
mkdir $net45Folder -Force | Out-Null
111+
mkdir $net40PortableFolder -Force | Out-Null
112+
mkdir $net45PortableFolder -Force | Out-Null
113+
114+
# Add .dll into nuget folders
115+
Get-ChildItem -LiteralPath $examplinviBin -filter Tweetinvi*.dll | % { Copy-Item $_.fullname $net40Folder }
116+
Get-ChildItem -LiteralPath $examplinviBin -filter Tweetinvi*.dll | % { Copy-Item $_.fullname $net45Folder }
117+
Get-ChildItem -LiteralPath $examplinviBin -filter Tweetinvi*.dll | % { Copy-Item $_.fullname $net40PortableFolder }
118+
Get-ChildItem -LiteralPath $examplinviBin -filter Tweetinvi*.dll | % { Copy-Item $_.fullname $net45PortableFolder }
119+
120+
Copy-Item $rootPath$examplinvi\Program.cs $temporaryFolder\Cheatsheet.cs
121+
122+
# Create Merged assembly
123+
$ILMergeCommand = '.\ILMerge.exe /target:library /out:' + $temporaryFolder + '/' + $tweetinviAPIMerged + ' '
124+
125+
for ($i=0; $i -lt $additionalAssemblies.length; $i++)
126+
{
127+
$ILMergeCommand = $ILMergeCommand + $temporaryFolder + '/' + $additionalAssemblies[$i] + ' '
128+
}
129+
130+
for ($i=4; $i -lt $projects.length; $i++) # start at 4 as there are 4 projects that are not part of the library core
131+
{
132+
$ILMergeCommand = $ILMergeCommand + $temporaryFolder + '/' + $projects[$i] + '.dll '
133+
}
134+
135+
Write-Host $ILMergeCommand
136+
Invoke-Expression $ILMergeCommand
137+
138+
# Create Zip files
139+
$tweetinviBinariesPackage = 'Tweetinvi ' + $version + ' - Binaries.zip'
140+
$tweetinviMergedBinariesPackage = 'Tweetinvi ' + $version + ' - Merged Binaries.zip'
141+
142+
Write-Zip -OutputPath $tweetinviBinariesPackage (dir $temporaryFolder)
143+
Write-Zip -OutputPath $tweetinviMergedBinariesPackage (ls $temporaryFolder\$tweetinviAPIMerged, $temporaryFolder\Cheatsheet.cs)
144+
145+
#Cleanup
146+
rm DTAR_*
147+
rm -r .\obj
148+
$answer = Read-Host "Do you want to cleanup the temporary files? (y/n)"
149+
150+
while("y", "yes", "n", "no" -notcontains $answer)
151+
{
152+
$answer = Read-Host "Yes or No"
153+
}
154+
155+
if ($answer -eq "y" -or $answer -eq "yes")
156+
{
157+
Remove-Item $temporaryFolder -Force -Recurse
158+
Write-Host Temporary files successfully removed!
159+
}
140160
}
141161

142-
Write-Host Sript successfully terminated!
162+
Write-Host Script successfully terminated!
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
3+
<metadata>
4+
<id>TweetinviAPI</id>
5+
<version>0.9.10.0</version>
6+
<title>Tweetinvi</title>
7+
<authors>Linvi</authors>
8+
<owners>Linvi</owners>
9+
<licenseUrl>http://tweetinvi.codeplex.com/license</licenseUrl>
10+
<projectUrl>http://tweetinvi.codeplex.com/</projectUrl>
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<description>Tweetinvi is an intuitive .NET C# library to access the Twitter REST API. It is a Portable Class Library that can be used for development on Windows, Windows RT, Windows Phone, Mono, Xamarin Android and Xamarin iOS. Tweetinvi is also compatible for Universal App development.</description>
13+
<copyright>Tweetinvi 2015</copyright>
14+
<language>en-US</language>
15+
<tags>twitter c# rest rest api 1.1 .net</tags>
16+
<dependencies>
17+
<dependency id="Autofac" version="3.5.2" />
18+
<dependency id="Microsoft.Bcl.Async" version="1.0.168" />
19+
<dependency id="Microsoft.Bcl.Build" version="1.0.21" />
20+
<dependency id="Microsoft.Net.Http" version="2.2.29" />
21+
<dependency id="Newtonsoft.Json" version="7.0.1" />
22+
</dependencies>
23+
</metadata>
24+
</package>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Write-Host ''
2+
Write-Host 'Welcome on Tweetinvi, please read the documentation at : https://github.com/linvi/tweetinvi/wiki'
3+
Write-Host 'You can also get lots of examples from the Cheatsheet provided with this package : Cheatsheet.cs'
4+
Write-Host ''
5+
Write-Host 'EXAMPLE : Get the currently logged in user:'
6+
Write-Host ''
7+
Write-Host 'Auth.SetUserCredentials("CONSUMER_KEY", "CONSUMER_SECRET", "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET");'
8+
Write-Host 'var user = User.GetLoggedUser();'
9+
Write-Host 'Debug.WriteLine(user.ScreenName);'
10+
Write-Host ''
11+
Write-Host 'Please enjoy Tweetinvi!'
64 Bytes
Binary file not shown.

Developer Tools/nuget.exe

3.57 MB
Binary file not shown.

Examplinvi.UniversalApp/App.xaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Application
2+
x:Class="Examplinvi.UniversalApp.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:Examplinvi.UniversalApp"
6+
RequestedTheme="Light">
7+
8+
</Application>

Examplinvi.UniversalApp/App.xaml.cs

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Runtime.InteropServices.WindowsRuntime;
6+
using Windows.ApplicationModel;
7+
using Windows.ApplicationModel.Activation;
8+
using Windows.Foundation;
9+
using Windows.Foundation.Collections;
10+
using Windows.UI.Xaml;
11+
using Windows.UI.Xaml.Controls;
12+
using Windows.UI.Xaml.Controls.Primitives;
13+
using Windows.UI.Xaml.Data;
14+
using Windows.UI.Xaml.Input;
15+
using Windows.UI.Xaml.Media;
16+
using Windows.UI.Xaml.Navigation;
17+
18+
namespace Examplinvi.UniversalApp
19+
{
20+
/// <summary>
21+
/// Provides application-specific behavior to supplement the default Application class.
22+
/// </summary>
23+
sealed partial class App : Application
24+
{
25+
/// <summary>
26+
/// Initializes the singleton application object. This is the first line of authored code
27+
/// executed, and as such is the logical equivalent of main() or WinMain().
28+
/// </summary>
29+
public App()
30+
{
31+
Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
32+
Microsoft.ApplicationInsights.WindowsCollectors.Metadata |
33+
Microsoft.ApplicationInsights.WindowsCollectors.Session);
34+
this.InitializeComponent();
35+
this.Suspending += OnSuspending;
36+
}
37+
38+
/// <summary>
39+
/// Invoked when the application is launched normally by the end user. Other entry points
40+
/// will be used such as when the application is launched to open a specific file.
41+
/// </summary>
42+
/// <param name="e">Details about the launch request and process.</param>
43+
protected override void OnLaunched(LaunchActivatedEventArgs e)
44+
{
45+
46+
#if DEBUG
47+
if (System.Diagnostics.Debugger.IsAttached)
48+
{
49+
this.DebugSettings.EnableFrameRateCounter = true;
50+
}
51+
#endif
52+
53+
Frame rootFrame = Window.Current.Content as Frame;
54+
55+
// Do not repeat app initialization when the Window already has content,
56+
// just ensure that the window is active
57+
if (rootFrame == null)
58+
{
59+
// Create a Frame to act as the navigation context and navigate to the first page
60+
rootFrame = new Frame();
61+
62+
rootFrame.NavigationFailed += OnNavigationFailed;
63+
64+
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
65+
{
66+
//TODO: Load state from previously suspended application
67+
}
68+
69+
// Place the frame in the current Window
70+
Window.Current.Content = rootFrame;
71+
}
72+
73+
if (rootFrame.Content == null)
74+
{
75+
// When the navigation stack isn't restored navigate to the first page,
76+
// configuring the new page by passing required information as a navigation
77+
// parameter
78+
rootFrame.Navigate(typeof(MainPage), e.Arguments);
79+
}
80+
// Ensure the current window is active
81+
Window.Current.Activate();
82+
}
83+
84+
/// <summary>
85+
/// Invoked when Navigation to a certain page fails
86+
/// </summary>
87+
/// <param name="sender">The Frame which failed navigation</param>
88+
/// <param name="e">Details about the navigation failure</param>
89+
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
90+
{
91+
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
92+
}
93+
94+
/// <summary>
95+
/// Invoked when application execution is being suspended. Application state is saved
96+
/// without knowing whether the application will be terminated or resumed with the contents
97+
/// of memory still intact.
98+
/// </summary>
99+
/// <param name="sender">The source of the suspend request.</param>
100+
/// <param name="e">Details about the suspend request.</param>
101+
private void OnSuspending(object sender, SuspendingEventArgs e)
102+
{
103+
var deferral = e.SuspendingOperation.GetDeferral();
104+
//TODO: Save application state and stop any background activity
105+
deferral.Complete();
106+
}
107+
}
108+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ApplicationInsights xmlns = "http://schemas.microsoft.com/ApplicationInsights/2013/Settings">
3+
</ApplicationInsights>
Loading
Loading
Loading
Loading
Loading
1.42 KB
Loading
Loading

0 commit comments

Comments
 (0)