OAuthManager RegisterClient Method (String, OAuthBase)Nemiro.OAuth
Registers the specified client in the application. (the main method)

Namespace: Nemiro.OAuth
Assembly: Nemiro.OAuth (in Nemiro.OAuth.dll) Version: 1.9.4.725 (1.9.4.725)
Syntax

public static void RegisterClient(
	string clientName,
	OAuthBase client
)

Parameters

clientName
Type: System String
The any name of the client. For example: Test, Release, Project #1, Ku!, Example.org etc.
client
Type: Nemiro.OAuth OAuthBase
The client instance.
Exceptions

ExceptionCondition
ArgumentNullExceptionclient is null or empty.
DuplicateProviderExceptionIf you attempt to register the already registered client.
Examples

OAuthManager.RegisterClient
(
  "Test",
  new GoogleClient
  (
    "00000000000000.apps.googleusercontent.com", 
    "000000000000000000000000"
  )
);

OAuthManager.RegisterClient
(
  "Test",
  new FacebookClient
  (
    "00000000000000", 
    "000000000000000000000000"
  )
);

OAuthManager.RegisterClient
(
  "Release",
  new GoogleClient
  (
    "1058655871432-83b9micke7cll89jfmcno5nftha3e95o.apps.googleusercontent.com", 
    "AeEbEGQqoKgOZb41JUVLvEJL"
  )
);

OAuthManager.RegisterClient
(
  "Release",
  new FacebookClient
  (
    "1435890426686808", 
    "c6057dfae399beee9e8dc46a4182e8fd"
  )
);
See Also