本文整理汇总了C#中Row.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# Row.GetString方法的具体用法?C# Row.GetString怎么用?C# Row.GetString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Row
的用法示例。
在下文中一共展示了Row.GetString方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Transform
public Row Transform(Row row) {
var values = row.GetString(_input).Split(_separator);
if (values.Length > 0) {
for (var i = 0; i < values.Length && i < _output.Length; i++) {
var output = _output[i];
row[output] = output.Convert(values[i]);
}
}
Increment();
return row;
}
示例2: Transform
public Row Transform(Row row) {
var xml = row.GetString(_input);
if (xml.Equals(string.Empty)) {
return row;
}
var count = 0;
var doc = new NanoXmlDocument(xml);
if (_elements.ContainsKey(doc.RootNode.Name)) {
var field = _elements[doc.RootNode.Name];
row[field] = field.Convert(doc.RootNode.Value ?? (field.ReadInnerXml ? doc.RootNode.InnerText() : doc.RootNode.ToString()));
count++;
}
var subNodes = doc.RootNode.SubNodes.ToArray();
while (subNodes.Any()) {
var nextNodes = new List<NanoXmlNode>();
foreach (var node in subNodes) {
if (_elements.ContainsKey(node.Name)) {
var field = _elements[node.Name];
count++;
var value = node.Value ?? (field.ReadInnerXml ? node.InnerText() : node.ToString());
if (!string.IsNullOrEmpty(value)) {
if (field.Type == "string") {
row.SetString(field, value);
} else {
row[field] = field.Convert(value);
}
}
}
if (_searchAttributes) {
foreach (var attribute in node.Attributes.Where(attribute => _attributes.ContainsKey(attribute.Name))) {
var field = _attributes[attribute.Name];
count++;
if (!string.IsNullOrEmpty(attribute.Value)) {
if (field.Type == "string") {
row.SetString(field, attribute.Value);
} else {
row[field] = field.Convert(attribute.Value);
}
}
}
}
if (count < _total) {
nextNodes.AddRange(node.SubNodes);
}
}
subNodes = nextNodes.ToArray();
}
Increment();
return row;
}
示例3: Transform
public Row Transform(Row row) {
row.SetString(Context.Field, string.Concat(_input.Select(f => row.GetString(f))));
Increment();
return row;
}
示例4: Transform
public Row Transform(Row row) {
row.SetString(Context.Field, row.GetString(_input).Trim(_trimChars));
Increment();
return row;
}
示例5: Transform
public Row Transform(Row row) {
row.SetString(Context.Field, row.GetString(_input).ToLowerInvariant());
Increment();
return row;
}
示例6: Transform
public Row Transform(Row row) {
row[Context.Field] = _contains(row.GetString(_input));
Increment();
return row;
}
示例7: Transform
public Row Transform(Row row) {
row.SetString(Context.Field, row.GetString(_input).PadLeft(Context.Transform.TotalWidth, Context.Transform.PaddingChar));
Increment();
return row;
}
示例8: Transform
public Row Transform(Row row) {
row.SetString(Context.Field, row.GetString(_input).Left(_length));
Increment();
return row;
}
示例9: Transform
public Row Transform(Row row) {
row[Context.Field] = row.GetString(_input).Split(_separator).Length;
Increment();
return row;
}
示例10: Transform
public Row Transform(Row row) {
row.SetString(Context.Field, string.Join(Context.Transform.Separator, _input.Select(f => row.GetString(f))));
Increment();
return row;
}
示例11: Transform
public Row Transform(Row row) {
row.SetString(_output, Decompress(row.GetString(_input)));
Increment();
return row;
}
示例12: Transform
public Row Transform(Row row) {
row.SetString(Context.Field, Decode(row.GetString(_input)));
Increment();
return row;
}
示例13: Transform
public Row Transform(Row row) {
row.SetString(Context.Field, string.Format(Context.Transform.Format, _input.Select(f => row.GetString(f)).ToArray()));
Increment();
return row;
}