Asp.net源码专业站
首页->博客空间->LiveBlog v1.0测试版源码>>LiveBlog.Core/API/MetaWeblog/MetaWeblogHandler.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:LiveBlog v1.0测试版源码
当前文件:文件类型 LiveBlog/LiveBlog.Core/API/MetaWeblog/MetaWeblogHandler.cs[31K,2009-6-12 11:47:02]打开代码结构图
普通视图
		            
1using System; 2using System.Collections.Generic; 3using System.IO; 4using System.Text; 5using System.Web; 6using System.Web.Security; 7using System.Xml; 8using LiveBlog.Core; 9 10namespace LiveBlog.Core.API.MetaWeblog 11{ 12 /// <summary> 13 /// HTTP Handler for MetaWeblog API 14 /// </summary> 15 internal class MetaWeblogHandler : IHttpHandler 16 { 17 IHttpHandler Members 114 115 API Methods 596 597 Private Methods 636 } 637 638 /// <summary> 639 /// Exception specifically for MetaWeblog API. Error (or fault) responses 640 /// request a code value. This is our chance to add one to the exceptions 641 /// which can be used to produce a proper fault. 642 /// </summary> 643 [Serializable()] 644 public class MetaWeblogException : Exception 645 { 646 /// <summary> 647 /// Constructor to load properties 648 /// </summary> 649 /// <param name="code">Fault code to be returned in Fault Response</param> 650 /// <param name="message">Message to be returned in Fault Response</param> 651 public MetaWeblogException(string code, string message) 652 : base(message) 653 { 654 _code = code; 655 } 656 657 private string _code; 658 /// <summary> 659 /// Code is actually for Fault Code. It will be passed back in the 660 /// response along with the error message. 661 /// </summary> 662 public string Code 663 { 664 get { return _code; } 665 } 666 } 667 668 /// <summary> 669 /// MetaWeblog Category struct 670 /// returned as an array from GetCategories 671 /// </summary> 672 internal struct MWACategory 673 { 674 /// <summary> 675 /// Category title 676 /// </summary> 677 public string description; 678 /// <summary> 679 /// Url to thml display of category 680 /// </summary> 681 public string htmlUrl; 682 /// <summary> 683 /// Url to RSS for category 684 /// </summary> 685 public string rssUrl; 686 /// <summary> 687 /// The guid of the category 688 /// </summary> 689 public string id; 690 /// <summary> 691 /// The title/name of the category 692 /// </summary> 693 public string title; 694 } 695 696 /// <summary> 697 /// MetaWeblog BlogInfo struct 698 /// returned as an array from getUserBlogs 699 /// </summary> 700 internal struct MWABlogInfo 701 { 702 /// <summary> 703 /// Blog Url 704 /// </summary> 705 public string url; 706 /// <summary> 707 /// Blog ID (Since BlogEngine.NET is single instance this number is always 10. 708 /// </summary> 709 public string blogID; 710 /// <summary> 711 /// Blog Title 712 /// </summary> 713 public string blogName; 714 } 715 716 /// <summary> 717 /// MetaWeblog Fault struct 718 /// returned when error occurs 719 /// </summary> 720 internal struct MWAFault 721 { 722 /// <summary> 723 /// Error code of Fault Response 724 /// </summary> 725 public string faultCode; 726 /// <summary> 727 /// Message of Fault Response 728 /// </summary> 729 public string faultString; 730 } 731 732 /// <summary> 733 /// MetaWeblog MediaObject struct 734 /// passed in the newMediaObject call 735 /// </summary> 736 internal struct MWAMediaObject 737 { 738 /// <summary> 739 /// Name of media object (filename) 740 /// </summary> 741 public string name; 742 /// <summary> 743 /// Type of file 744 /// </summary> 745 public string type; 746 /// <summary> 747 /// Media 748 /// </summary> 749 public byte[] bits; 750 } 751 752 /// <summary> 753 /// MetaWeblog MediaInfo struct 754 /// returned from NewMediaObject call 755 /// </summary> 756 internal struct MWAMediaInfo 757 { 758 /// <summary> 759 /// Url that points to Saved MediaObejct 760 /// </summary> 761 public string url; 762 } 763 764 /// <summary> 765 /// MetaWeblog Post struct 766 /// used in newPost, editPost, getPost, recentPosts 767 /// not all properties are used everytime. 768 /// </summary> 769 internal struct MWAPost 770 { 771 /// <summary> 772 /// PostID Guid in string format 773 /// </summary> 774 public string postID; 775 /// <summary> 776 /// Title of Blog Post 777 /// </summary> 778 public string title; 779 /// <summary> 780 /// Link to Blog Post 781 /// </summary> 782 public string link; 783 /// <summary> 784 /// Content of Blog Post 785 /// </summary> 786 public string description; 787 /// <summary> 788 /// List of Categories assigned for Blog Post 789 /// </summary> 790 public List<string> categories; 791 /// <summary> 792 /// List of Tags assinged for Blog Post 793 /// </summary> 794 public List<string> tags; 795 /// <summary> 796 /// Display date of Blog Post (DateCreated) 797 /// </summary> 798 public DateTime postDate; 799 /// <summary> 800 /// Whether the Post is published or not. 801 /// </summary> 802 public bool publish; 803 /// <summary> 804 /// Slug of post 805 /// </summary> 806 public string slug; 807 /// <summary> 808 /// CommentPolicy (Allow/Deny) 809 /// </summary> 810 public string commentPolicy; 811 /// <summary> 812 /// Excerpt 813 /// </summary> 814 public string excerpt; 815 816 } 817 818 /// <summary> 819 /// MetaWeblog UserInfo struct 820 /// returned from GetUserInfo call 821 /// </summary> 822 /// <remarks> 823 /// Not used currently, but here for completeness. 824 /// </remarks> 825 internal struct MWAUserInfo 826 { 827 /// <summary> 828 /// User Name Proper 829 /// </summary> 830 public string nickname; 831 /// <summary> 832 /// Login ID 833 /// </summary> 834 public string userID; 835 /// <summary> 836 /// Url to User Blog? 837 /// </summary> 838 public string url; 839 /// <summary> 840 /// Email address of User 841 /// </summary> 842 public string email; 843 /// <summary> 844 /// User LastName 845 /// </summary> 846 public string lastName; 847 /// <summary> 848 /// User First Name 849 /// </summary> 850 public string firstName; 851 } 852 853 /// <summary> 854 /// wp Page Struct 855 /// </summary> 856 internal struct MWAPage 857 { 858 /// <summary> 859 /// PostID Guid in string format 860 /// </summary> 861 public string pageID; 862 /// <summary> 863 /// Title of Blog Post 864 /// </summary> 865 public string title; 866 /// <summary> 867 /// Link to Blog Post 868 /// </summary> 869 public string link; 870 /// <summary> 871 /// Content of Blog Post 872 /// </summary> 873 public string description; 874 /// <summary> 875 /// Display date of Blog Post (DateCreated) 876 /// </summary> 877 public DateTime pageDate; 878 /// <summary> 879 /// Convert Breaks 880 /// </summary> 881 public string mt_convert_breaks; 882 /// <summary> 883 /// Page Parent ID 884 /// </summary> 885 public string pageParentID; 886 } 887 888}
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:LiveBlog v1.0测试版源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146