[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
News.Report message schema in xAPFramework.net
- Subject: News.Report message schema in xAPFramework.net
- From: Stuart Booth
- Date: Sun, 21 Sep 2003 22:06:00 +0000
Bet you never thought you'd actually see me get around to this, James!
:-))
Some real code I just used to test my new support for some of your
schema. This code sends a real xAP message.
C# code snippet:
private static void TestNewsSchema()
{
xAPNewsReportMessage news_report = new xAPNewsReportMessage
("xaporg",
"xAPAutomation.org", new Url("<a href="http://www.xapautomation.org/">http://www.xapautomation.org/</a>"),
"PostNuke Powered
Site");
news_report.AddNewsStory("MisterHouse support for xAP 1.2", new
Url
("<a href="http://www.xapautomation.org/modules.php?op=modload&name=News&file=article&sid=16">http://www.xapautomation.org/modules.php?op=modload&amp;name=News&amp;file=art\
icle&amp;sid=16</a>"), null);
xAPSender.ApplicationSender.Send(news_report);
}
All the block counting (in the Count= field of News.Feed) and the
message block indexing (News.Story.[X]) is taken care of for you by
the schema encapsulation classes. This result in the following:
xap-header
{
v=12
hop=1
uid=FFABCD00
class=News.Report
source=KCSoft.TestFramework.anya
}
News.Feed
{
link=<a href="http://www.xapautomation.org/">http://www.xapautomation.org/</a>
desc=PostNuke Powered Site
title=xAPAutomation.org
station=xaporg
count=1
}
News.Story.1
{
link=<a href="http://www.xapautomation.org/modules.php?op=modload&name=News&f">http://www.xapautomation.org/modules.php?op=modload&amp;name=News&amp;f</a>
ile=article&amp;sid=16
title=MisterHouse support for xAP 1.2
}
How does that look? Any other suggestions you use yourself that I
should incorporate?
I've still got to do News.Alert but it'll share some of the code of
course. I've added some helpful support for block name indexing to my
framework code to facilitate this type of schema, to help keep block
names unique.
S
--
Stuart Booth
xAPFramework.net - a reusable xAP framework for .net
<a href="http://www.xapframework.net/">http://www.xapframework.net/</a>
<a
href="/group/xAP_developer/post?postID=dk_jS8HiVG1RJzhLV2jmIHI6Qb5VQtGnHIfRrMMMYaxNigFRLUNiYzWofnabEs03RtSMIX9IS-JEniKxpSrDYuQv">stuart@x...</a>
xAP_Development Main Index |
xAP_Development Thread Index |
xAP_Development Home |
Archives Home
|