本文整理汇总了C#中OutputFormatType类的典型用法代码示例。如果您正苦于以下问题:C# OutputFormatType类的具体用法?C# OutputFormatType怎么用?C# OutputFormatType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OutputFormatType类属于命名空间,在下文中一共展示了OutputFormatType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
public override string Update(string status, string in_reply_to_status_id, UserLocation location, OutputFormatType format)
{
return null;
// if (this.PlaceID != null)
/*string url = string.Format("http://brightkite.com/places/{0}/notes", this.PlaceID);
string data = string.Format("note[body]={0}", System.Web.HttpUtility.UrlEncode(status));
return ExecutePostCommand(url, data);*/
}
示例2: GetFriends
public string GetFriends(string IDorScreenName, OutputFormatType format)
{
if (format != OutputFormatType.JSON && format != OutputFormatType.XML)
{
throw new ArgumentException("GetFriends support only XML and JSON output format", "format");
}
string url = null;
if (string.IsNullOrEmpty(IDorScreenName))
{
url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.Friends), GetFormatTypeString(format), AccountInfo.ServerURL.URL);
}
else
{
url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.Friends) + "/" + IDorScreenName, GetFormatTypeString(format), AccountInfo.ServerURL.URL);
}
return ExecuteGetCommand(url);
}
示例3: GetFriendsTimelineAsXML
public XmlDocument GetFriendsTimelineAsXML(OutputFormatType format)
{
if (format == OutputFormatType.JSON)
{
throw new ArgumentException("GetFriendsTimelineAsXML supports only XML based formats (XML, RSS, Atom)", "format");
}
string output = GetFriendsTimeline(format);
if (!string.IsNullOrEmpty(output))
{
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.LoadXml(output);
return xmlDocument;
}
return null;
}
示例4: GetFriendsTimeLineSince
public string GetFriendsTimeLineSince(OutputFormatType format, string SinceID)
{
string url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.Friends_Timeline), GetFormatTypeString(format), AccountInfo.ServerURL.URL) + "?since_id=" + SinceID + "&count=" + ClientSettings.MaxTweets;
return ExecuteGetCommand(url);
}
示例5: GetUserTimelineAsXML
public XmlDocument GetUserTimelineAsXML(OutputFormatType format)
{
return GetUserTimelineAsXML(null, format);
}
示例6: GetUserTimeline
public string GetUserTimeline(string IDorScreenName, OutputFormatType format)
{
string url = null;
if (string.IsNullOrEmpty(IDorScreenName))
{
url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.User_Timeline), GetFormatTypeString(format), AccountInfo.ServerURL.URL);
}
else
{
url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.User_Timeline) + "/" + IDorScreenName, GetFormatTypeString(format), AccountInfo.ServerURL.URL);
}
return ExecuteGetCommand(url);
}
示例7: Show
public string Show(string IDorScreenName, OutputFormatType format)
{
if (format != OutputFormatType.JSON && format != OutputFormatType.XML)
{
throw new ArgumentException("Show supports only XML and JSON output format", "format");
}
string url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Users), GetActionTypeString(ActionType.Show) + "/" + IDorScreenName, GetFormatTypeString(format), AccountInfo.ServerURL.URL);
return ExecuteAnonymousGetCommand(url);
}
示例8: GetFriendsTimeline
public string GetFriendsTimeline(string userName, string password, OutputFormatType format)
{
string url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.Friends_Timeline), GetFormatTypeString(format));
url += "?count=200";
return ExecuteGetCommand(url, userName, password);
}
示例9: GetFriends
public string GetFriends(string userName, string password, OutputFormatType format)
{
if (format != OutputFormatType.JSON && format != OutputFormatType.XML) {
throw new ArgumentException("GetFriends support only XML and JSON output format", "format");
}
string url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.Friends), GetFormatTypeString(format));
return ExecuteGetCommand(url, userName, password);
}
示例10: SendDirectMessage
public string SendDirectMessage(string userID, string message, string in_reply_to_id, OutputFormatType format)
{
string url = string.Format(TwitterBaseUrlFormat,
GetActionTypeString(ActionType.Direct_Messages), GetActionTypeString(ActionType.New),
GetFormatTypeString(format), AccountInfo.ServerURL.URL);
string data = string.Format("user={0}&text={1}",
HttpUtility.UrlEncode(userID), HttpUtility.UrlEncode(message));
if (!string.IsNullOrEmpty(in_reply_to_id))
data = data + "&in_reply_to_id=" + in_reply_to_id;
return ExecutePostCommand(url, data);
}
示例11: Retweet_Status
public string Retweet_Status(string status_id, OutputFormatType format)
{
if (this.AccountInfo.ServerURL.ServerType == TwitterServer.pingfm)
{
return null;
}
else if (this.AccountInfo.ServerURL.ServerType == TwitterServer.brightkite)
{
return null;
}
else
{
if (format != OutputFormatType.JSON && format != OutputFormatType.XML)
{
throw new ArgumentException("Update support only XML and JSON output format", "format");
}
string url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.Retweet) + "/{0}", GetFormatTypeString(format), AccountInfo.ServerURL.URL);
url = String.Format(url, status_id);
return ExecutePostCommand(url, null);
}
}
示例12: GetFormatTypeString
private String GetFormatTypeString(OutputFormatType format)
{
return format.ToString().ToLower();
}
示例13: RenderWordDocument
/// <summary>
///
/// </summary>
/// <param name="docBinary"></param>
/// <param name="docType"></param>
/// <param name="outputType"></param>
/// <returns></returns>
private byte[] RenderWordDocument(byte[] docBinary, DocumentType docType, OutputFormatType outputType)
{
throw new NotImplementedException();
}
示例14: Update
public string Update(string status, OutputFormatType format)
{
return Update(status, null, format);
}
示例15: GetPublicTimeline
public string GetPublicTimeline(OutputFormatType format)
{
string url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.Public_Timeline), GetFormatTypeString(format));
return ExecuteGetCommand(url, null, null);
}