Show / Hide Table of Contents

Class SocialUserInfo

Represents social network user common information

Inheritance
System.Object
SocialUserInfo
FacebookSocialUserInfo
GooglePlusSocialUserInfo
LinkedInSocialUserInfo
TwitterSocialUserInfo
VKontakteSocialUserInfo
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Web.Social
Assembly: NFX.Web.dll
Syntax
[Serializable]
public abstract class SocialUserInfo

Constructors

SocialUserInfo(SocialNetwork, Nullable<SocialUserInfoToken>)

Declaration
protected SocialUserInfo(SocialNetwork issuer, SocialUserInfoToken? existingToken = default (SocialUserInfoToken? ))
Parameters
Type Name Description
SocialNetwork issuer
System.Nullable<SocialUserInfoToken> existingToken

Properties

BirthDate

Not all social network supports this field

Declaration
public DateTime? BirthDate { get; }
Property Value
Type Description
System.Nullable<System.DateTime>

DebugInfo

Social network specific debug info (for example, ID)

Declaration
public virtual string DebugInfo { get; }
Property Value
Type Description
System.String

DisplayName

Pseudo-field (no social network has this field. It's composed from other fields in specific way for each network.

Declaration
public abstract string DisplayName { get; }
Property Value
Type Description
System.String

Email

Not all social network supports this field

Declaration
public string Email { get; }
Property Value
Type Description
System.String

FirstName

Not all social network supports this field

Declaration
public string FirstName { get; }
Property Value
Type Description
System.String

Gender

Not all social network supports this field

Declaration
public Gender? Gender { get; }
Property Value
Type Description
System.Nullable<Gender>

ID

UserID in appropriate social Network Sample ID's are: Google+: 100454735382076872928 Facebook: 100007030231661 Twitter: 2227913354 VKontakte: 229735500 Linked In: h2u4-ixYiC

Declaration
public string ID { get; }
Property Value
Type Description
System.String

IssuerNetworkDescription

Returns the Sociatextual description for the social network instance that issued this user info object

Declaration
public string IssuerNetworkDescription { get; }
Property Value
Type Description
System.String

IssuerNetworkID

Returns the SocialNetID for the social network instance that issued this user info object

Declaration
public SocialNetID IssuerNetworkID { get; }
Property Value
Type Description
SocialNetID

IssuerNetworkName

Returns the name of the network that issued this info, i.e "FacebookOld". DO NOT confuse it with network ID. One can obtain netID by getting IssuerSocialNetworkID

Declaration
public string IssuerNetworkName { get; }
Property Value
Type Description
System.String

LastError

Stores last exception of operations for this user

Declaration
public Exception LastError { get; }
Property Value
Type Description
System.Exception

LastName

Not all social network supports this field

Declaration
public string LastName { get; }
Property Value
Type Description
System.String

Locale

Locale in form "en-gb". Not all social network supports this field

Declaration
public string Locale { get; }
Property Value
Type Description
System.String

LoginState

Indicates if user currently logged in

Declaration
public SocialLoginState LoginState { get; }
Property Value
Type Description
SocialLoginState

LongTermProviderToken

Information used to perform social network operations like message post. Can be ordinal string (e.g. Facebook) or pair of strings (e.g. Twitter)

Declaration
public virtual string LongTermProviderToken { get; }
Property Value
Type Description
System.String

MiddleName

Not all social network supports this field

Declaration
public string MiddleName { get; }
Property Value
Type Description
System.String

PictureLink

Web link to user profile picture (). Not all social network supports this field

Declaration
public string PictureLink { get; }
Property Value
Type Description
System.String

TimezoneOffset

UTC offset in seconds. Not all social network supports this field

Declaration
public int ? TimezoneOffset { get; }
Property Value
Type Description
System.Nullable<System.Int32>

Token

Returns a vector of Network-provided params that can be used to reconstruct SocialUserInfo object

Declaration
public SocialUserInfoToken Token { get; }
Property Value
Type Description
SocialUserInfoToken

Methods

DeserializeFromString<T>(String)

Deserializes instance from string, i.e. from database VARCHAR column

Declaration
public static T DeserializeFromString<T>(string data)where T : SocialUserInfo
Parameters
Type Name Description
System.String data
Returns
Type Description
T
Type Parameters
Name Description
T

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

GetPicture(String)

Returns user profile image or null if no image available. Picture kind specifies classification of pictures within profile i.e. "main", "small-icon" etc.

Declaration
public Image GetPicture(string pictureKind = null)
Parameters
Type Name Description
System.String pictureKind
Returns
Type Description
Image

GetPicture(out String, String)

Returns user profile image or null if no image available. Picture kind specifies classification of pictures within profile i.e. "main", "small-icon" etc.

Declaration
public Image GetPicture(out string contentType, string pictureKind = null)
Parameters
Type Name Description
System.String contentType
System.String pictureKind
Returns
Type Description
Image

PostMessage(String)

Posts message to social network

Declaration
public void PostMessage(string text)
Parameters
Type Name Description
System.String text

SerializeToString()

Serializes current instance as string, i.e. this may be needed to store the instance in the database VARCHAR column

Declaration
public string SerializeToString()
Returns
Type Description
System.String

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX