1
using System
.Globalization
;
2 using System
.ServiceModel
;
4 public class DataApi
: IDataApi
{
9 public string GetName() {
10 string consumerKey
= OperationContext
.Current
.IncomingMessageProperties
["OAuthConsumerKey"] as string;
11 string accessToken
= OperationContext
.Current
.IncomingMessageProperties
["OAuthAccessToken"] as string;
12 return string.Format(CultureInfo
.InvariantCulture
, "Andrew_{0}_{1}", consumerKey
.Substring(0, 1), accessToken
.Substring(0, 1));