温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:LiveBlog v1.0测试版源码
当前文件:
LiveBlog/LiveBlog.Core/ServingEventArgs.cs,打开代码结构图
LiveBlog/LiveBlog.Core/ServingEventArgs.cs,打开代码结构图1using System; 2
using System.Collections.Generic; 3
using System.Text; 4
5
namespace LiveBlog.Core 6
{ 7
/// <summary> 8
/// Used when a post is served to the output stream. 9
/// </summary> 10
public class ServingEventArgs : EventArgs 11
{ 12
13
/// <summary> 14
/// Creates a new instance of the class and applies the specified body. 15
/// </summary> 16
public ServingEventArgs(string body, ServingLocation location) 17
{ 18
_Body = body; 19
_Location = location; 20
} 21
22
private string _Body; 23
/// <summary> 24
/// Gets or sets the body of the post. If you change the Body, 25
/// then that change will be shown on the web page. 26
/// </summary> 27
public string Body 28
{ 29
get { return _Body; } 30
set { _Body = value; } 31
} 32
33
private ServingLocation _Location; 34
/// <summary> 35
/// The location where the serving takes place. 36
/// </summary> 37
public ServingLocation Location 38
{ 39
get { return _Location; } 40
set { _Location = value; } 41
} 42
43
private bool _Cancel; 44
/// <summary> 45
/// Cancels the serving of the content. 46
/// <remarks>If the serving is cancelled then the item will not be displayed.</remarks> 47
/// </summary> 48
public bool Cancel 49
{ 50
get { return _Cancel; } 51
set { _Cancel = value; } 52
} 53
54
} 55
56
/// <summary> 57
/// The location where the serving takes place 58
/// </summary> 59
public enum ServingLocation 60
{ 61
/// <summary>Is used to indicate that a location hasn't been chosen.</summary> 62
None, 63
64
/// <summary>Is used when a single post is served from post.aspx.</summary> 65
SinglePost, 66
67
/// <summary>Is used when multiple posts are served using postlist.ascx.</summary> 68
PostList, 69
70
/// <summary>Is used when a single page is displayed on page.aspx.</summary> 71
SinglePage, 72
73
/// <summary>Is used when content is served from a feed (RSS or ATOM).</summary> 74
Feed, 75
76
/// <summary>Is used when content is served on a custom location.</summary> 77
Other 78
} 79
} 80





}