本文整理汇总了C#中IDocument.GetIndexDataLabel方法的典型用法代码示例。如果您正苦于以下问题:C# IDocument.GetIndexDataLabel方法的具体用法?C# IDocument.GetIndexDataLabel怎么用?C# IDocument.GetIndexDataLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDocument
的用法示例。
在下文中一共展示了IDocument.GetIndexDataLabel方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AppendIndex
public void AppendIndex(IDocument document, string outputFileName)
{
using (FileStream fs = new FileStream(outputFileName, FileMode.Append, FileAccess.Write, FileShare.None))
using (StreamWriter writer = new StreamWriter(fs, Encoding.Unicode))
{
for (int indexNumber = 0; indexNumber < document.IndexDataCount; indexNumber++)
writer.WriteLine("{0}:{1}", document.GetIndexDataLabel(indexNumber), document.GetIndexDataValue(indexNumber));
writer.Flush();
writer.Close();
}
}
示例2: CreateIndex
public void CreateIndex(IDocument document, IDictionary<string, string> releaseData, string outputFileName)
{
if (_exportSettings.OverRideDefault)
outputFileName = GetIndexFileName(releaseData[string.Format("DocumentOutputFileName[{0}]", document.Number)], outputFileName);
using (FileStream fs = new FileStream(outputFileName, FileMode.Append, FileAccess.Write, FileShare.None))
using (StreamWriter writer = new StreamWriter(fs, Encoding.ASCII))
{
for (int i = 0; i < document.IndexDataCount; i++)
writer.WriteLine(string.Format("{0}={1}", document.GetIndexDataLabel(i), document.GetIndexDataValue(i)));
writer.Flush();
writer.Close();
}
}
示例3: CreateIndex
public void CreateIndex(IDocument document, IDictionary<string, string> exportData, string outputFileName)
{
using (FileStream fs = new FileStream(outputFileName, FileMode.CreateNew, FileAccess.Write, FileShare.None))
using (StreamWriter writer = new StreamWriter(fs, Encoding.ASCII))
{
if (exportData != null)
{
for (int indexNumber = 0; indexNumber < document.IndexDataCount; indexNumber++)
writer.WriteLine("{0}:{1}", document.GetIndexDataLabel(indexNumber), document.GetIndexDataValue(indexNumber));
}
//20100111 - Changed the index to pass the current document number so the correct file is written out
writer.WriteLine("{0}", exportData[string.Format("DocumentOutputFileName[{0}]", _documentNumner)]);
_documentNumner++;
writer.Flush();
writer.Close();
}
}
示例4: GetIndexValue
private string GetIndexValue(IDocument doc)
{
for (int indexCount = 0; indexCount < doc.IndexDataCount; indexCount++)
{
if (m_IndexField.Equals(doc.GetIndexDataLabel(indexCount)))
return doc.GetIndexDataValue(indexCount);
}
return string.Empty;
}
示例5: StartDocument
public object StartDocument(IDocument doc)
{
string[] indexValues = new string[doc.IndexDataCount];
for (int i = 0; i < doc.IndexDataCount; i++)
indexValues[i] = doc.GetIndexDataValue(i);
if (!Directory.Exists(_batchFolder))
Directory.CreateDirectory(_batchFolder);
_strName = DefaultName.CalculateDefaultName(_releaseSettings.DocumentName, _batchName, doc.Number, null, indexValues);
_docNumber = doc.Number.ToString();
_docRepositoryPath = ConvertRepositoryPath(doc);
_docType = GetCustomType(doc, _releaseSettings.DocumentType, false);
_indexArray.Clear();
for (int i = 0; i < doc.IndexDataCount; i++)
_indexArray.Add(string.Format("{0},{1}", doc.GetIndexDataLabel(i), doc.GetIndexDataValue(i)));
return null;
}
示例6: SetDocumentDataMultiPage
public void SetDocumentDataMultiPage(IDocument doc, string fullyQulifiedFileName)
{
_xmlData.WriteDocumentData(Path.GetFileName(fullyQulifiedFileName),
GetCustomType(doc, _releaseSettings.SecurityKey, true),
ConvertRepositoryPath(doc),
GetCustomType(doc, _releaseSettings.DocumentType, false));
for (int indexCount = 0; indexCount < doc.IndexDataCount; indexCount++)
{
if (doc.GetIndexDataValue(indexCount) != GetCustomType(doc, _releaseSettings.DocumentType, false))
_xmlData.WriteDocumentIndexData(doc.GetIndexDataLabel(indexCount), doc.GetIndexDataValue(indexCount), fullyQulifiedFileName);
}
}