Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

50 lines
1.6 KiB
C#

// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
using System;
using System.Globalization;
using Microsoft.Internal.Web.Utils;
namespace WebMatrix.WebData
{
/// <summary>
/// Represents an OpenAuth and OpenID account.
/// </summary>
public class OAuthAccountData
{
/// <summary>
/// Initializes a new instance of the <see cref="OAuthAccountData"/> class.
/// </summary>
/// <param name="provider">The provider.</param>
/// <param name="providerUserId">The provider user id.</param>
public OAuthAccountData(string provider, string providerUserId)
{
if (String.IsNullOrEmpty(provider))
{
throw new ArgumentException(
String.Format(CultureInfo.CurrentCulture, CommonResources.Argument_Cannot_Be_Null_Or_Empty, "provider"),
"provider");
}
if (String.IsNullOrEmpty(providerUserId))
{
throw new ArgumentException(
String.Format(CultureInfo.CurrentCulture, CommonResources.Argument_Cannot_Be_Null_Or_Empty, "providerUserId"),
"providerUserId");
}
Provider = provider;
ProviderUserId = providerUserId;
}
/// <summary>
/// Gets the provider name.
/// </summary>
public string Provider { get; private set; }
/// <summary>
/// Gets the provider user id.
/// </summary>
public string ProviderUserId { get; private set; }
}
}