This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static readonly HttpClient _bloggerHttpClient = new HttpClient(); | |
private static async Task<PublishResult> PublishToBlogger(PlaylistItem latestVideo, TraceWriter log) | |
{ | |
try | |
{ | |
// Récupération du token | |
_bloggerHttpClient.DefaultRequestHeaders.Authorization = null; | |
var content = new FormUrlEncodedContent(new List<KeyValuePair<string, string>> | |
{ | |
new KeyValuePair<string, string>("client_id", Environment.GetEnvironmentVariable("GoogleApiClientId")), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static async Task<bool> PublishToFacebook(PlaylistItem latestVideo, TraceWriter log) | |
{ | |
// Récupération des variables d'environnement | |
var pageAccessToken = Environment.GetEnvironmentVariable("FacebookPageAccessToken"); | |
var pageId = Environment.GetEnvironmentVariable("FacebookPageId"); | |
// Publication sur la page | |
try | |
{ | |
var postResult = await _httpClient.PostAsync( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Host; | |
namespace Company.Function | |
{ | |
public static class MediumSample | |
{ | |
[FunctionName("MediumSample")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyView : MvxFrameLayout | |
{ | |
private string _identifier; | |
public string Identifier | |
{ | |
get { return _identifier; } | |
set | |
{ | |
_identifier = value; | |
OnIdentifierChanged()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Android.Content; | |
using Android.Util; | |
using Android.Widget; | |
using System; | |
using Com.Androidquery; | |
namespace Sescandell.App.Mobile.Droid.Views.Controls | |
{ | |
class AQImageView : ImageView | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function testDoNotSubmitIfNameNoInRequestAndPostRequest() | |
{ | |
$form = $this->getMockForm('param1', 'POST'); | |
$this->setRequestData('POST', array( | |
'somethingelse' => array() | |
)); | |
$form->expects($this->never()) | |
->method('submit'); |