This is the header of the CS file:
Code:
[DreamService("Livelink Connector", "Frédéric Hanna 2011.",
SID = new string[] { "http://gps.ireq.ca/wiki/LivelinkConnector" }
)]
[DreamServiceBlueprint("deki/service-type", "extension")]
[DekiExtLibrary(Namespace = "livelinkconnector",
Label = "Livelink documents fetcher",
Description = "This extension allow you to retreive some documents from Open Text Livelink.")]
class LivelinkUtils : DekiExtService
{
/// <summary>
/// Retreive document informations from an Livelink server and return result as XML.
/// </summary>
/// <param name="userAccount">User ID, ie: AA1234</param>
/// <param name="attributes">Attributes to load (default: {givenname, sn} )</param>
/// <returns>XML Representation of specified attributes values</returns>
[DekiExtFunction(Description = "Displays all the publications of a user based on his id and formatted with the APA standards.")]
public XDoc getUserPublications(
[DekiExtParam("User ID, ie: AA1234")] string CIP
)
Here i read a file rendered in charset=iso-8859-1
Code:
readFile = new StreamReader(absolutePublicationsDirectory + CIP + EXTENSION_FICHIER, System.Text.Encoding.Default);
while ((line = readFile.ReadLine()) != null)
{
//here i read each line and add it to a String Array
}
Then i prepare the Xdoc
Code:
for (int i = 0; i < nbDocuments; i++)
{
HTMLResult.Start("li").Start("a").Attr("href", publications[i, 1]).Value(publications[i, 0]).End().End();
}
// here i return the Xdoc
HTMLResult.End();
return HTMLResult;