当前位置: 首页>>代码示例>>C#>>正文


C# IDocument.GetIndexDataLabel方法代码示例

本文整理汇总了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();
            }
        }
开发者ID:ebruning,项目名称:DAT-File-Index-Generator,代码行数:12,代码来源:DatIndexGenerator.cs

示例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();
            }
        }
开发者ID:ebruning,项目名称:CustomTxtExporter,代码行数:15,代码来源:CustomTxtExporter.cs

示例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();
            }
        }
开发者ID:ebruning,项目名称:DAT-File-Index-Generator,代码行数:20,代码来源:DatIndexGenerator.cs

示例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;
 }
开发者ID:ebruning,项目名称:Colormax-Custom-Export,代码行数:9,代码来源:ColormaxCustomExport.cs

示例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;
        }
开发者ID:ebruning,项目名称:DocumentMall-Export-Connector,代码行数:21,代码来源:DmEc.cs

示例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);
            }
        }
开发者ID:ebruning,项目名称:DocumentMall-Export-Connector,代码行数:13,代码来源:DmEc.cs


注:本文中的IDocument.GetIndexDataLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。