本文整理汇总了C#中IValueWriter.WriteManyNodes方法的典型用法代码示例。如果您正苦于以下问题:C# IValueWriter.WriteManyNodes方法的具体用法?C# IValueWriter.WriteManyNodes怎么用?C# IValueWriter.WriteManyNodes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IValueWriter
的用法示例。
在下文中一共展示了IValueWriter.WriteManyNodes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
/// <summary>
/// Writes the <see cref="Skeleton"/> to an <see cref="IValueWriter"/>.
/// </summary>
/// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
/// <exception cref="ArgumentNullException"><paramref name="writer" /> is <c>null</c>.</exception>
public void Write(IValueWriter writer)
{
if (writer == null)
throw new ArgumentNullException("writer");
writer.WriteManyNodes(_nodesNodeName, RootNode.GetAllNodes(), ((w, item) => item.Write(w)));
}
示例2: SaveRefractionEffects
void SaveRefractionEffects(IValueWriter w)
{
w.WriteStartNode(_refractionEffectsNodeName);
{
var validFx = _refractionEffects.Where(x => RefractionEffectFactory.IsValidType(x.GetType())).ToImmutable();
w.WriteManyNodes(_refractionEffectListNodeName, validFx, RefractionEffectFactory.Write);
}
w.WriteEndNode(_refractionEffectsNodeName);
}
示例3: Write
public void Write(IValueWriter writer)
{
writer.WriteManyNodes(_itemsNodeName, Items, ((w, item) => item.Write(w)));
}
示例4: SaveGrhs
/// <summary>
/// Writes all the MapGrhs to an <see cref="IValueWriter"/>.
/// </summary>
/// <param name="w">IValueWriter to write to.</param>
void SaveGrhs(IValueWriter w)
{
w.WriteStartNode(_mapGrhsNodeName);
{
// Used GrhIndexes
w.WriteMany(_usedIndiciesNodeName, GetMapGrhList(), w.Write);
// MapGrhs
w.WriteManyNodes(_mapGrhsNodeName, Spatial.GetMany<MapGrh>().Distinct(),
((writer, item) => item.WriteState(writer)));
}
w.WriteEndNode(_mapGrhsNodeName);
}
示例5: SaveLighting
void SaveLighting(IValueWriter w)
{
w.WriteStartNode(_lightingNodeName);
{
w.Write("Ambient", AmbientLight);
w.WriteManyNodes(_lightsNodeName, _lights.ToArray(), (wr, l) => l.WriteState(wr));
}
w.WriteEndNode(_lightingNodeName);
}
示例6: Write
public void Write(IValueWriter writer)
{
writer.WriteManyNodes(_framesNodeName, KeyFrames, ((w, item) => item.Write(w)));
}
示例7: SaveBackgroundImages
/// <summary>
/// Writes all the BackgroundImages.
/// </summary>
/// <param name="w">IValueWriter to write to..</param>
void SaveBackgroundImages(IValueWriter w)
{
var bgImagesToWrite = _backgroundImages.Where(x => x != null);
w.WriteManyNodes(_bgImagesNodeName, bgImagesToWrite, ((writer, item) => item.Write(writer)));
}
示例8: Write
/// <summary>
/// Writes the NPCChatDialogItemBase's values to an IValueWriter.
/// </summary>
/// <param name="writer">IValueWriter to write the values to.</param>
public void Write(IValueWriter writer)
{
AssertBranchHasTwoResponses();
AssertNonBranchHasNoConditionals();
AssertResponsesHaveValidValues();
writer.Write("ID", ID);
writer.Write("Title", Title ?? string.Empty);
writer.Write("Text", Text ?? string.Empty);
writer.Write("IsBranch", IsBranch);
writer.WriteManyNodes("Responses", Responses, ((w, item) => item.Write(w)));
if (IsBranch)
{
writer.WriteStartNode("Conditionals");
{
var c = Conditionals;
var hasConditionals = (c != null) && (c.Count() > 0);
writer.Write("HasConditionals", hasConditionals);
if (hasConditionals)
c.Write(writer);
}
writer.WriteEndNode("Conditionals");
}
}
示例9: WriteWalls
static void WriteWalls(IValueWriter w, KeyValuePair<GrhIndex, List<WallEntityBase>> item)
{
var grhIndex = item.Key;
var walls = item.Value;
w.Write(_grhIndexValueKey, grhIndex);
w.WriteManyNodes(_wallsNodeName, walls, ((pwriter, pitem) => pitem.Write(pwriter)));
}
示例10: Write
/// <summary>
/// Writes the NPCChatConditionalCollectionItemBase's values to an IValueWriter.
/// </summary>
/// <param name="writer">IValueWriter to write the values to.</param>
public void Write(IValueWriter writer)
{
writer.Write("Not", Not);
writer.Write("ConditionalName", Conditional.Name);
writer.WriteManyNodes("Parameters", Parameters, ((w, item) => item.Write(w)));
}
示例11: WriteState
/// <summary>
/// Writes the state of the object to an <see cref="IValueWriter"/>.
/// </summary>
/// <param name="writer">The <see cref="IValueWriter"/> to write the values to.</param>
public override void WriteState(IValueWriter writer)
{
base.WriteState(writer);
CreateSlots();
writer.WriteManyNodes("QuickBarItems", _slots.Select(x => new QuickBarSlotValues(x)).ToArray(), (w, x) => x.Write(w));
}
示例12: WriteState
/// <summary>
/// Writes the state of the object to an <see cref="IValueWriter"/>.
/// </summary>
/// <param name="writer">The <see cref="IValueWriter"/> to write the values to.</param>
public void WriteState(IValueWriter writer)
{
writer.WriteStartNode(_particleEffectNodeName);
{
// Write the effect properties
PersistableHelper.Write(this, writer);
// Write the emitters
writer.WriteManyNodes(_emittersNodeName, _emitters, ParticleEmitterFactory.Write);
}
writer.WriteEndNode(_particleEffectNodeName);
}
示例13: Write
/// <summary>
/// Writes the <see cref="TableSchema"/> the specified writer.
/// </summary>
/// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
public void Write(IValueWriter writer)
{
writer.Write(_tableNameValueKey, _tableName);
writer.WriteManyNodes(_columnsNodeName, _columns.ToArray(), (w, x) => x.Write(w));
}
示例14: Write
/// <summary>
/// Writes the <see cref="BodyInfoManager"/> data to an <see cref="IValueWriter"/>.
/// </summary>
/// <param name="writer">The <see cref="IValueWriter"/> to write the <see cref="BodyInfoManager"/> data to.</param>
public void Write(IValueWriter writer)
{
writer.WriteManyNodes(_bodyNodeName, _bodies.Values, (w, body) => body.Write(w));
}
示例15: Write
/// <summary>
/// Writes the <see cref="ColumnSchema"/>.
/// </summary>
/// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
public void Write(IValueWriter writer)
{
var v = _values.OrderBy(x => x.Key).ToArray();
writer.WriteManyNodes(_valuesNodeName, v, WriteKVP);
}