本文整理汇总了C#中com.writeFieldName方法的典型用法代码示例。如果您正苦于以下问题:C# com.writeFieldName方法的具体用法?C# com.writeFieldName怎么用?C# com.writeFieldName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com
的用法示例。
在下文中一共展示了com.writeFieldName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: _writePath
/// <exception cref="System.IO.IOException"/>
private void _writePath(com.fasterxml.jackson.core.JsonGenerator gen)
{
if ((_filter == null) || (_filter == com.fasterxml.jackson.core.filter.TokenFilter
.INCLUDE_ALL))
{
return;
}
if (_parent != null)
{
_parent._writePath(gen);
}
if (_startHandled)
{
// even if Object started, need to start leaf-level name
if (_needToHandleName)
{
_needToHandleName = false;
// at parent must explicitly clear
gen.writeFieldName(_currentName);
}
}
else
{
_startHandled = true;
if (_type == TYPE_OBJECT)
{
gen.writeStartObject();
if (_needToHandleName)
{
_needToHandleName = false;
// at parent must explicitly clear
gen.writeFieldName(_currentName);
}
}
else
{
if (_type == TYPE_ARRAY)
{
gen.writeStartArray();
}
}
}
}
示例2: writePath
/// <summary>
/// Method called to ensure that parent path from root is written up to
/// and including this node.
/// </summary>
/// <exception cref="System.IO.IOException"/>
public virtual void writePath(com.fasterxml.jackson.core.JsonGenerator gen)
{
if ((_filter == null) || (_filter == com.fasterxml.jackson.core.filter.TokenFilter
.INCLUDE_ALL))
{
return;
}
if (_parent != null)
{
_parent._writePath(gen);
}
if (_startHandled)
{
// even if Object started, need to start leaf-level name
if (_needToHandleName)
{
gen.writeFieldName(_currentName);
}
}
else
{
_startHandled = true;
if (_type == TYPE_OBJECT)
{
gen.writeStartObject();
gen.writeFieldName(_currentName);
}
else
{
// we know name must be written
if (_type == TYPE_ARRAY)
{
gen.writeStartArray();
}
}
}
}