• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Row类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Row的典型用法代码示例。如果您正苦于以下问题:C# Row类的具体用法?C# Row怎么用?C# Row使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Row类属于命名空间,在下文中一共展示了Row类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Process

        /// <summary>
        /// Main processing script.
        /// </summary>
        /// <param name="input">The input row.</param>
        /// <param name="outputRow">The output row.</param>
        /// <param name="args">The arguments.</param>
        /// <returns>The IEnumerable output row.</returns>
        public override IEnumerable<Row> Process(RowSet input, Row outputRow, string[] args)
        {
            string frameShift = args[0];
            string frameLength = args[1];

            Directory.CreateDirectory("relatedFeatures");

            foreach (var row in input.Rows)
            {
                outputRow["WaveID"].Set(row["WaveID"].String);
                outputRow["WaveBinary"].Set(row["WaveBinary"].Binary);
                outputRow["WaveAlignments"].Set(row["WaveAlignments"].String);
                outputRow["RawF0"].Set(row["RawF0"].String);
                outputRow["LPCC"].Set(row["LPCC"].Binary);
                outputRow["OF0"].Set(row["OF0"].String);
                outputRow["LSP"].Set(row["LSP"].Binary);
                outputRow["Pow"].Set(row["Pow"].String);
                outputRow["MBE"].Set(row["MBE"].String);
                outputRow["NCCF"].Set(row["NCCF"].String);

                string waveId = row["WaveID"].String;
                string wave = JobBase.GenerateLocalFile(waveId, row["WaveBinary"].Binary, FileExtensions.Waveform);

                string relatedFeatureFile = Path.Combine("relatedFeatures", waveId + "." + FileExtensions.Text);
                string[] argument = { wave, relatedFeatureFile, frameShift, frameLength };
                F0ExtractorCOSMOS.ExtractRelatedFeaturesOneFile(argument, null);

                outputRow["RF"].Set(File.ReadAllText(relatedFeatureFile));
                yield return outputRow;
            }
        }
开发者ID:JohnsonYuan,项目名称:TTSFramework,代码行数:38,代码来源:GetRelatedFeatureJob.cs


示例2: Parse

        public static Table Parse(IRestResponse response)
        {
            Table table = new Table();
            StringReader reader = new StringReader(response.Content);
            string readLine = reader.ReadLine();

            if (readLine != null)
            {
                string[] collection = readLine.Split(Separator);
                foreach (string column in collection)
                {
                    table.Columns.Add(column.TrimStart('"').TrimEnd('"'));
                }
            }

            string line = reader.ReadLine();

            while (!string.IsNullOrEmpty(line))
            {
                Row row = new Row(line);
                table.Rows.Add(row);
                line = reader.ReadLine();
            }

            return table;
        }
开发者ID:Genbox,项目名称:SPARQL.NET,代码行数:26,代码来源:CSVParser.cs


示例3: AddRow

 private void AddRow(string name, int price)
 {
     Row row = new Row();
     row["name"] = name;
     row["price"] = price;
     rows.Add(row);
 }
开发者ID:f4i2u1,项目名称:rhino-etl,代码行数:7,代码来源:BaseAggregationFixture.cs


示例4: Process

        /// <summary>
        /// Main processing script.
        /// </summary>
        /// <param name="input">The input row.</param>
        /// <param name="outputRow">The output row.</param>
        /// <param name="args">The arguments.</param>
        /// <returns>The IEnumerable output row.</returns>
        public override IEnumerable<Row> Process(RowSet input, Row outputRow, string[] args)
        {
            string f0Dir = "f0";
            string expandDir = "expand";
            string svmDir = "svm";
            Directory.CreateDirectory(f0Dir);
            Directory.CreateDirectory(expandDir);
            Directory.CreateDirectory(svmDir);

            foreach (var row in input.Rows)
            {
                outputRow["WaveID"].Set(row["WaveID"].String);
                outputRow["WaveBinary"].Set(row["WaveBinary"].Binary);
                outputRow["WaveAlignments"].Set(row["WaveAlignments"].String);
                outputRow["RawF0"].Set(row["RawF0"].String);
                outputRow["LPCC"].Set(row["LPCC"].Binary);
                outputRow["OF0"].Set(row["OF0"].String);
                outputRow["LSP"].Set(row["LSP"].Binary);
                outputRow["Pow"].Set(row["Pow"].String);
                outputRow["MBE"].Set(row["MBE"].String);

                string waveId = row["WaveID"].String;
                string f0File = JobBase.GenerateLocalFile(waveId, row["RawF0"].String, FileExtensions.F0File, true, f0Dir);
                string expandFeatureFile = JobBase.GenerateLocalFile(waveId, row["EXP"].String, FileExtensions.Text, false, expandDir);
                string svmFile = Path.Combine(svmDir, waveId + "." + FileExtensions.Text);

                string[] argument = { f0File, expandFeatureFile, svmFile };
                F0ExtractorCOSMOS.FormatFeaturesOneFile(argument, null);

                outputRow["SVM"].Set(File.ReadAllText(svmFile));
                yield return outputRow;
            }
        }
开发者ID:JohnsonYuan,项目名称:TTSFramework,代码行数:40,代码来源:FormatFeatureJob.cs


示例5: CreateCell

        private NPOI.SS.UserModel.Cell CreateCell(Cell cell, Row currentRow, int columnOrdinal)
        {
            var nCell = currentRow.CreateCell(columnOrdinal, CellType.STRING);
            nCell.CellStyle = GetCellStyle(cell);

            return nCell;
        }
开发者ID:robinminto,项目名称:GiveCRM,代码行数:7,代码来源:CellFormatter.cs


示例6: Transform

 public Row Transform(Row row) {
     foreach (var date in _dates.Where(date => (DateTime)row[date] < _minDate)) {
         row[date] = _minDate;
     }
     Increment();
     return row;
 }
开发者ID:mindis,项目名称:Pipeline.Net,代码行数:7,代码来源:MinDateTransform.cs


示例7: Process

        /// <summary>
        /// Main processing script.
        /// </summary>
        /// <param name="input">The input row.</param>
        /// <param name="outputRow">The output row.</param>
        /// <param name="args">The arguments.</param>
        /// <returns>The IEnumerable output row.</returns>
        public override IEnumerable<Row> Process(RowSet input, Row outputRow, string[] args)
        {
            string uvDir = "uv";
            string scaledSVMDir = "scaledSVM";
            Directory.CreateDirectory(uvDir);
            Directory.CreateDirectory(scaledSVMDir);

            foreach (var row in input.Rows)
            {
                outputRow["WaveID"].Set(row["WaveID"].String);
                outputRow["WaveBinary"].Set(row["WaveBinary"].Binary);
                outputRow["WaveAlignments"].Set(row["WaveAlignments"].String);
                outputRow["RawF0"].Set(row["RawF0"].String);
                outputRow["LPCC"].Set(row["LPCC"].Binary);
                outputRow["OF0"].Set(row["OF0"].String);
                outputRow["LSP"].Set(row["LSP"].Binary);
                outputRow["Pow"].Set(row["Pow"].String);
                outputRow["MBE"].Set(row["MBE"].String);

                string waveId = row["WaveID"].String;
                string scaledSVMFile = JobBase.GenerateLocalFile(waveId, row["SSVM"].String, FileExtensions.Text, false, scaledSVMDir);
                string uvFile = Path.Combine(uvDir, waveId + "." + FileExtensions.Text);
                string argument = Helper.NeutralFormat(" \"{0}\" \"{1}\" \"{2}\"", scaledSVMFile, Path.GetFileName(this.Job.ReplaceVariable["UVMODELFILE"]), uvFile);

                CommandLine.RunCommand(Path.GetFileName(this.Job.ReplaceVariable["SVMPREDICTTOOL"]),
                    argument, "./");
                outputRow["UV"].Set(JobBase.GetTextFile(uvFile));
                yield return outputRow;
            }
        }
开发者ID:JohnsonYuan,项目名称:TTSFramework,代码行数:37,代码来源:PredictUVJob.cs


示例8: GenerateReport

        public static void GenerateReport(List<DataObject> objects)
        {
            SheetData data = new SheetData();

              //add column names to the first row
              Row header = new Row();
              header.RowIndex = (UInt32)1;

              foreach (DataObject obj in objects)
              {
            Cell headerCell = createTextCell(objects.IndexOf(obj) + 1, 1, obj.Name);
            header.AppendChild(headerCell);
              }
              data.AppendChild(header);
              SpreadsheetDocument doc = CreateDoc(data);
              /*using (SpreadsheetDocument spreadsheet = SpreadsheetDocument.Open(fileName, true))
              {
            WorkbookPart workbook = spreadsheet.WorkbookPart;
            //create a reference to Sheet1
            WorksheetPart worksheet = workbook.WorksheetParts.Last();

            ///loop through each data row  DataRow contentRow;
            for (int i = 0; i < table.Rows.Count; i++)
            {
              contentRow = table.Rows[i];
              data.AppendChild(createContentRow(contentRow, i + 2));
            }
               }  */
        }
开发者ID:qreal,项目名称:tools,代码行数:29,代码来源:Integrator.cs


示例9: AddPerson

 protected void AddPerson(int id, string email)
 {
     Row row = new Row();
     row["id"] = id;
     row["email"] = email;
     right.Add(row);
 }
开发者ID:hoffmanc,项目名称:rhino-etl,代码行数:7,代码来源:BaseJoinFixture.cs


示例10: OpenXLRow

 public OpenXLRow(WorkbookPart wbPart, WorksheetPart wsPart, List<string> columns, Row xRow)
 {
     this.WbPart = wbPart;
     this.WsPart = wsPart;
     this.Columns = columns;
     this._cells = GetCells(xRow);
 }
开发者ID:sympletech,项目名称:SympleLib,代码行数:7,代码来源:OpenXLRow.cs


示例11: CreateRowFromReader

        public override Row CreateRowFromReader(IDataReader reader)
        {
            GetSchemaTable(reader);
            Row r = new Row();
            for (int i = 0; i < reader.FieldCount; i++)
            {
                Type fType = reader.GetFieldType(i);
                if (fType == typeof(System.Decimal))
                {
                    GetDecimal(reader, r, i);
                }
                else if (fType == typeof(System.DateTime))
                {
                    object o = reader.GetValue(i);
                    if (o != DBNull.Value)
                    {
                        DateTime dtime = reader.GetDateTime(i);
                        if (dtime < MinDateTime)
                        {
                            o = NullDateTime.Add(new TimeSpan(dtime.Hour, dtime.Minute, dtime.Second));
                        }
                        r[reader.GetName(i)] = o;
                    }
                }
                else
                {
                    r[reader.GetName(i)] = reader.GetValue(i);
                }
            }

            return r;
        }
开发者ID:Zawulon,项目名称:ETL,代码行数:32,代码来源:OdbcCommandActivator.cs


示例12: Process

        /// <summary>
        /// Main processing script.
        /// </summary>
        /// <param name="input">The input row.</param>
        /// <param name="outputRow">The output row.</param>
        /// <param name="args">The arguments.</param>
        /// <returns>The IEnumerable output row.</returns>
        public override IEnumerable<Row> Process(RowSet input, Row outputRow, string[] args)
        {
            float minF0Value = float.Parse(args[0]);
            float maxF0Value = float.Parse(args[1]);
            string uvDir = "uv";
            string fZeroDir = "f0";
            string smoothedFZeroDir = "smoothedF0";

            Directory.CreateDirectory(uvDir);
            Directory.CreateDirectory(fZeroDir);
            Directory.CreateDirectory(smoothedFZeroDir);

            foreach (var row in input.Rows)
            {
                outputRow["WaveID"].Set(row["WaveID"].String);
                outputRow["WaveBinary"].Set(row["WaveBinary"].Binary);
                outputRow["WaveAlignments"].Set(row["WaveAlignments"].String);
                outputRow["RawF0"].Set(row["RawF0"].String);
                outputRow["LPCC"].Set(row["LPCC"].Binary);
                outputRow["OF0"].Set(row["OF0"].String);
                outputRow["LSP"].Set(row["LSP"].Binary);
                outputRow["Pow"].Set(row["Pow"].String);
                outputRow["MBE"].Set(row["MBE"].String);

                string waveId = row["WaveID"].String;
                string f0File = JobBase.GenerateLocalFile(waveId, row["RawF0"].String, FileExtensions.F0File, true, fZeroDir);
                string uvFile = JobBase.GenerateLocalFile(waveId, row["UV"].String, FileExtensions.Text, true, uvDir);
                string smoothedF0File = Path.Combine(smoothedFZeroDir, waveId + "." + FileExtensions.F0File);
                string[] argument = { f0File, uvFile, smoothedF0File, minF0Value.ToString(), maxF0Value.ToString() };
                F0ExtractorCOSMOS.SmoothOneF0File(argument, null);
                outputRow["SF0"].Set(JobBase.GetTextFile(smoothedF0File));
                yield return outputRow;
            }
        }
开发者ID:JohnsonYuan,项目名称:TTSFramework,代码行数:41,代码来源:SmoothF0Job.cs


示例13: AssertSubtract

 void AssertSubtract(Row row, string excdColumn, string panColumn, string pctnColumn, string nexcdColumn, Errors errors)
 {
     if (row[excdColumn].ToLower() == "yes")
     {
         AssertSubtract(row, panColumn, pctnColumn, nexcdColumn, errors);
     }
 }
开发者ID:jakepearson,项目名称:cde-export,代码行数:7,代码来源:CoAltExceedNCount.cs


示例14: GetPathSplitIndex

    private List<int> GetPathSplitIndex(Row dialogStuff)
    {
        List<int> values = new List<int> ();
        int dummyVal = 0;
        int barIndex = 0;
        int startIndex = 0;

        foreach (char c in dialogStuff.Conversation_Path_Chain) {
            if (c.Equals ('|')) {
                if (int.TryParse (dialogStuff.Conversation_Path_Chain.Substring (startIndex, barIndex), out dummyVal)){
                    values.Add(int.Parse (dialogStuff.Conversation_Path_Chain.Substring (startIndex, barIndex))); //still need to do somthing with the value that is after bar
                    startIndex = barIndex + 1;
                }
            }

            barIndex++;
        }

        //for the last path or for a singlton
        if (int.TryParse (dialogStuff.Conversation_Path_Chain.Substring (startIndex), out dummyVal)) {
            values.Add(int.Parse (dialogStuff.Conversation_Path_Chain.Substring (startIndex))); //still need to do somthing with the value that is after bar
        }

        return values;
    }
开发者ID:GDACollab,项目名称:COMA,代码行数:25,代码来源:GatherDiologs.cs


示例15: PutAdress

        private void PutAdress(Aspose.Pdf.Generator.Pdf pdf, PassengerInfo passengerInfo)
        {
            //create table to add address of the customer
            Table adressTable = new Table();
            adressTable.IsFirstParagraph = true;
            adressTable.ColumnWidths = "60 180 60 180";
            adressTable.DefaultCellTextInfo.FontSize = 10;
            adressTable.DefaultCellTextInfo.LineSpacing = 3;
            adressTable.DefaultCellPadding.Bottom = 3;
            //add this table in the first section/page
            Section section = pdf.Sections[0];
            section.Paragraphs.Add(adressTable);
            //add a new row in the table
            Row row1AdressTable = new Row(adressTable);
            adressTable.Rows.Add(row1AdressTable);
            //add cells and text
            Aspose.Pdf.Generator.TextInfo tf1 = new Aspose.Pdf.Generator.TextInfo();
            tf1.Color = new Aspose.Pdf.Generator.Color(111, 146, 188);
            tf1.FontName = "Helvetica-Bold";

            row1AdressTable.Cells.Add("Bill To:", tf1);
            row1AdressTable.Cells.Add(passengerInfo.Name + "#$NL" +
                passengerInfo.Address + "#$NL" + passengerInfo.Email + "#$NL" +
                passengerInfo.PhoneNumber);

        }
开发者ID:AamirWaseem,项目名称:Aspose_Total_NET,代码行数:26,代码来源:Invoice.cs


示例16: AddUser

 protected void AddUser(string name, string email)
 {
     Row row = new Row();
     row["name"] = name;
     row["email"] = email;
     left.Add(row);
 }
开发者ID:hoffmanc,项目名称:rhino-etl,代码行数:7,代码来源:BaseJoinFixture.cs


示例17: Accumulate

        protected override void Accumulate(Row row, Row aggregate) {
            if (aggregate.ContainsKey(_firstKey)) return;

            foreach (var key in _keys) {
                aggregate[key] = row[key];
            }
        }
开发者ID:modulexcite,项目名称:Transformalize,代码行数:7,代码来源:EntityKeysDistinct.cs


示例18: Transform

 public Row Transform(Row row) {
     foreach (var field in _fields.Where(f => row[f] == null)) {
         row[field] = _getDefaultFor[_index(field)]();
     }
     Increment();
     return row;
 }
开发者ID:mindis,项目名称:Pipeline.Net,代码行数:7,代码来源:DefaultTransform.cs


示例19: SplitElement

 public SplitElement(Row row)
     : base(UITableViewCellStyle.Default, "splitelement")
 {
     Value = row;
     BackgroundColor = UIColor.White;
     _font = Font.WithSize(Font.PointSize * Element.FontSizeRatio);
 }
开发者ID:rcaratchuk,项目名称:MonoTouch.Dialog,代码行数:7,代码来源:SplitElement.cs


示例20: Select

        public Row[] Select()
        {
            FbTransaction transaction = connection.BeginTransaction();

            FbCommand cmd = new FbCommand(selectCommand, connection, transaction);

            List<Row> rows = new List<Row>();
            Row nr;

            using (FbDataReader dr = cmd.ExecuteReader())
            {
                while (dr.Read())
                {
                    nr = new Row();
                    nr.ID = dr.GetInt32(0);
                    nr.Name = dr.GetString(1);
                    nr.Description = dr.GetString(2);
                    using (System.IO.Stream stream = dr.GetStream(3))
                    {
                        using (System.IO.MemoryStream mStream = new System.IO.MemoryStream())
                        {
                            stream.CopyTo(mStream);
                            nr.Image = mStream.ToArray();
                        }
                    }

                    rows.Add(nr);
                }
            }

            transaction.Commit();

            return rows.ToArray();
        }
开发者ID:rekino,项目名称:fb-ibpp-tut,代码行数:34,代码来源:CategoryTableAdapter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# RowDefinition类代码示例发布时间:2022-05-24
下一篇:
C# Rover类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap