本文整理汇总了C#中LibraryChannel.GetComments方法的典型用法代码示例。如果您正苦于以下问题:C# LibraryChannel.GetComments方法的具体用法?C# LibraryChannel.GetComments怎么用?C# LibraryChannel.GetComments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LibraryChannel
的用法示例。
在下文中一共展示了LibraryChannel.GetComments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OutputEntities
public static int OutputEntities(
Stop stop,
LibraryChannel channel,
string strBiblioRecPath,
string strDbType,
XmlTextWriter writer,
out string strError)
{
strError = "";
bool bBegin = false;
long lPerCount = 100; // 每批获得多少个
long lStart = 0;
long lResultCount = 0;
long lCount = -1;
for (; ; )
{
if (stop != null && stop.State != 0)
{
strError = "用户中断";
return -1;
}
EntityInfo[] entities = null;
long lRet = 0;
channel.Timeout = new TimeSpan(0, 5, 0);
if (strDbType == "item")
{
lRet = channel.GetEntities(
stop,
strBiblioRecPath,
lStart,
lCount,
"", // "onlygetpath",
"zh",
out entities,
out strError);
}
if (strDbType == "order")
{
lRet = channel.GetOrders(
stop,
strBiblioRecPath,
lStart,
lCount,
"", // "onlygetpath",
"zh",
out entities,
out strError);
}
if (strDbType == "issue")
{
lRet = channel.GetIssues(
stop,
strBiblioRecPath,
lStart,
lCount,
"", // "onlygetpath",
"zh",
out entities,
out strError);
}
if (strDbType == "comment")
{
lRet = channel.GetComments(
stop,
strBiblioRecPath,
lStart,
lCount,
"", // "onlygetpath",
"zh",
out entities,
out strError);
}
if (lRet == -1)
return -1;
lResultCount = lRet;
if (lRet == 0)
return 0;
Debug.Assert(entities != null, "");
foreach (EntityInfo info in entities)
{
if (info.ErrorCode != ErrorCodeValue.NoError)
{
strError = "路径为 '" + info.OldRecPath + "' 的册记录装载中发生错误: " + info.ErrorInfo; // NewRecPath
return -1;
}
if (bBegin == false)
{
writer.WriteStartElement("dprms", strDbType + "Collection", DpNs.dprms);
bBegin = true;
}
//.........这里部分代码省略.........