• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# OutputFormatType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中OutputFormatType的典型用法代码示例。如果您正苦于以下问题:C# OutputFormatType类的具体用法?C# OutputFormatType怎么用?C# OutputFormatType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OutputFormatType类属于命名空间,在下文中一共展示了OutputFormatType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);*/
        }
开发者ID:enersia,项目名称:pocketwit,代码行数:9,代码来源:Twitter.cs


示例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);
        }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:19,代码来源:Twitter.cs


示例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;
        }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:18,代码来源:Twitter.cs


示例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);
 }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:5,代码来源:Twitter.cs


示例5: GetUserTimelineAsXML

 public XmlDocument GetUserTimelineAsXML(OutputFormatType format)
 {
     return GetUserTimelineAsXML(null, format);
 }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:4,代码来源:Twitter.cs


示例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);
        }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:14,代码来源:Twitter.cs


示例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);
        }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:10,代码来源:Twitter.cs


示例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);
 }
开发者ID:joaoAvno,项目名称:Sonar,代码行数:6,代码来源:Twitter.cs


示例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);
        }
开发者ID:joaoAvno,项目名称:Sonar,代码行数:9,代码来源:Twitter.cs


示例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);
 }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:11,代码来源:Twitter.cs


示例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);
            }
        }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:23,代码来源:Twitter.cs


示例12: GetFormatTypeString

 private String GetFormatTypeString(OutputFormatType format)
 {
     return format.ToString().ToLower();
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:4,代码来源:TwitterPublisher.cs


示例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();
 }
开发者ID:svanvliet,项目名称:Presentable,代码行数:11,代码来源:DocumentConverter.asmx.cs


示例14: Update

 public string Update(string status, OutputFormatType format)
 {
     return Update(status, null, format);
 }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:4,代码来源:Twitter.cs


示例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);
 }
开发者ID:joaoAvno,项目名称:Sonar,代码行数:5,代码来源:Twitter.cs


示例16: GetFormatTypeString

 protected string GetFormatTypeString(OutputFormatType format)
 {
     return format.ToString().ToLower();
 }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:4,代码来源:Twitter.cs


示例17: GetUserTimeline

        public string GetUserTimeline(string userName, string password, string IDorScreenName, OutputFormatType format)
        {
            string url = null;
            if (string.IsNullOrEmpty(IDorScreenName)) {
                url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.User_Timeline), GetFormatTypeString(format));
            }
            else {
                url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.User_Timeline) + "/" + IDorScreenName, GetFormatTypeString(format));
            }

            return ExecuteGetCommand(url, userName, password);
        }
开发者ID:joaoAvno,项目名称:Sonar,代码行数:12,代码来源:Twitter.cs


示例18: GetFriendsTimeLineMax

 public string GetFriendsTimeLineMax(OutputFormatType format)
 {
     string url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.Friends_Timeline), GetFormatTypeString(format), AccountInfo.ServerURL.URL)+"?count="+MaxTweets;
     return ExecuteGetCommand(url);
 }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:5,代码来源:Twitter.cs


示例19: GetUserTimelineAsXML

        public XmlDocument GetUserTimelineAsXML(string userName, string password, string IDorScreenName, OutputFormatType format)
        {
            if (format == OutputFormatType.JSON) {
                throw new ArgumentException("GetUserTimelineAsXML supports only XML based formats (XML, RSS, Atom)", "format");
            }

            string output = GetUserTimeline(userName, password, IDorScreenName, format);
            if (!string.IsNullOrEmpty(output)) {
                XmlDocument xmlDocument = new XmlDocument();
                xmlDocument.LoadXml(output);

                return xmlDocument;
            }

            return null;
        }
开发者ID:joaoAvno,项目名称:Sonar,代码行数:16,代码来源:Twitter.cs


示例20: GetFriendsTimeline

 public string GetFriendsTimeline(OutputFormatType format)
 {
     if (this.AccountInfo.ServerURL.ServerType == TwitterServer.brightkite)
     {
         string url = "http://brightkite.com/me/friendstream.xml";
         return ExecuteGetCommand(url);
     }
     else
     {
         string url = string.Format(TwitterBaseUrlFormat, GetObjectTypeString(ObjectType.Statuses), GetActionTypeString(ActionType.Friends_Timeline), GetFormatTypeString(format), AccountInfo.ServerURL.URL);
         return ExecuteGetCommand(url);
     }
 }
开发者ID:JakeStevenson,项目名称:PockeTwit,代码行数:13,代码来源:Twitter.cs



注:本文中的OutputFormatType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# OutputKind类代码示例发布时间:2022-05-24
下一篇:
C# OutputFormat类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap