Endpoint | Example | Purpose |
---|---|---|
Authorization | https://<auth-server>/oauth/authorize | used by the client application to obtain authorization grant from the resource owner via user-agent redirection |
Token | https://<auth-server>/oauth/token | used by the client application to exchange an authorization grant for an access token, typically with client authentication |
Redirection | https://<client>/callback | used by the authorization server to return responses containing authorization grants to the client via the resource owner user-agent |
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.Collections.Generic; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Linq.Expressions; | |
namespace Playground { | |
// Notice the 3 occurrencies of the Title identifier and the abscence of additional backing fields! | |
public class ExampleViewModel : ViewModelBase { | |
public string Title { |
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
const Rx = require('rx'); | |
const sequence = Rx.Observable.create(function(src) { | |
src.onNext(1); | |
src.onNext(2); | |
src.onNext(3); | |
src.onNext(4); | |
src.onError(new Error("booom!!!")); | |
src.onNext(5); | |
src.onCompleted(); |
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
#include <iostream> | |
#include <stdio.h> | |
using namespace std; | |
[event_source(native)] | |
class Sender | |
{ | |
public: | |
__event void SendEvent(int value); |
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
[Fact] | |
public async Task When_awaiting_null_it_should_throw() | |
{ | |
try | |
{ | |
Task t1 = Task.Run(() => { /* do nothing */ }); | |
Task t2 = null; | |
await Task.WhenAll(t1, t2); | |
Assert.True(false, "Should have thrown before!"); | |
} |
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 MyTests | |
{ | |
public class Package { } | |
public class Service | |
{ | |
public IObservable<Package> DeliverRegular() | |
{ | |
return DeliverRegularAsync().ToObservable(); | |
} |
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 LoginExplorations | |
{ | |
public async Task<DataContracts.List[]> FetchListsAsync(string accessToken, string deviceId) | |
{ | |
var info = new TestSystemInfo( | |
userAgent: "Wunderlist.Sdk/" + new AssemblyInfoHelper(typeof (RestClient)).AssemblyVersion, | |
clientId: "01d4f9dcdafd531da497", | |
clientProductGitHash: new AssemblyInfoHelper(typeof (RestClient)).InformationalVersion, | |
clientDeviceId: deviceId, | |
clientSystem: "Windows RT device", |
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
var usage_description = "Usage: node create_changelog.js MyChangelog.txt \"Changelog for nightly build version 0.9.0.1\""; | |
var args = ParseArguments(); | |
var spawn = require('child_process').spawn; | |
var fs = require('fs'); | |
var prc = spawn('git', ['describe', '--tags', '--abbrev=0']); | |
prc.stdout.setEncoding('utf8'); | |
prc.stdout.on('data', function (data) { | |
var str = data.toString(); | |
var lines = str.split(/(\r?\n)/g); |
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 SerializerTests | |
{ | |
public static IEnumerable<object[]> Serializers | |
{ | |
get | |
{ | |
yield return new object[] { new NewtonsoftJson() }; | |
yield return new object[] { new ServiceStackJson() }; | |
} | |
} |
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
[Fact] | |
public async Task Getting_an_event_when_connecting_should_succeed() | |
{ | |
using (var ws = new ReactiveWebSocket("ws://127.0.0.1:8080", true)) | |
{ | |
var man = new WebSocketManager(ws); | |
man.Send(new Message { Id = Guid.NewGuid().ToString() }); |