コード例 #1
0
 /// <summary>
 /// Saves the current node to the specified emitter.
 /// </summary>
 /// <param name="emitter">The emitter where the node is to be saved.</param>
 /// <param name="state">The state.</param>
 internal void Save(IEmitter emitter, EmitterState state)
 {
     if (!string.IsNullOrEmpty(Anchor) && !state.EmittedAnchors.Add(Anchor))
     {
         emitter.Emit(new AnchorAlias(Anchor));
     }
     else
     {
         Emit(emitter, state);
     }
 }
コード例 #2
0
 /// <summary>
 /// Saves the current node to the specified emitter.
 /// </summary>
 /// <param name="emitter">The emitter where the node is to be saved.</param>
 /// <param name="state">The state.</param>
 internal override void Emit(IEmitter emitter, EmitterState state)
 {
     throw new NotSupportedException("A YamlAliasNode is an implementation detail and should never be saved.");
 }
コード例 #3
0
 /// <summary>
 /// Saves the current node to the specified emitter.
 /// </summary>
 /// <param name="emitter">The emitter where the node is to be saved.</param>
 /// <param name="state">The state.</param>
 internal override void Emit(IEmitter emitter, EmitterState state)
 {
     emitter.Emit(new Scalar(Anchor, Tag, Value, Style, string.IsNullOrEmpty(Tag), false));
 }
コード例 #4
0
 /// <summary>
 /// Saves the current node to the specified emitter.
 /// </summary>
 /// <param name="emitter">The emitter where the node is to be saved.</param>
 /// <param name="state">The state.</param>
 internal override void Emit(IEmitter emitter, EmitterState state)
 {
     emitter.Emit(new Scalar(Anchor, Tag, Value, Style, string.IsNullOrEmpty(Tag), false));
 }
コード例 #5
0
ファイル: YamlNode.cs プロジェクト: Kryptos-FR/xenko-reloaded
 /// <summary>
 /// Saves the current node to the specified emitter.
 /// </summary>
 /// <param name="emitter">The emitter where the node is to be saved.</param>
 /// <param name="state">The state.</param>
 internal abstract void Emit(IEmitter emitter, EmitterState state);
コード例 #6
0
ファイル: YamlNode.cs プロジェクト: Kryptos-FR/xenko-reloaded
 /// <summary>
 /// Saves the current node to the specified emitter.
 /// </summary>
 /// <param name="emitter">The emitter where the node is to be saved.</param>
 /// <param name="state">The state.</param>
 internal void Save(IEmitter emitter, EmitterState state)
 {
     if (!string.IsNullOrEmpty(Anchor) && !state.EmittedAnchors.Add(Anchor))
     {
         emitter.Emit(new AnchorAlias(Anchor));
     }
     else
     {
         Emit(emitter, state);
     }
 }
コード例 #7
0
 /// <summary>
 /// Saves the current node to the specified emitter.
 /// </summary>
 /// <param name="emitter">The emitter where the node is to be saved.</param>
 /// <param name="state">The state.</param>
 internal override void Emit(IEmitter emitter, EmitterState state)
 {
     throw new NotSupportedException("A YamlAliasNode is an implementation detail and should never be saved.");
 }
コード例 #8
0
 /// <summary>
 /// Saves the current node to the specified emitter.
 /// </summary>
 /// <param name="emitter">The emitter where the node is to be saved.</param>
 /// <param name="state">The state.</param>
 internal abstract void Emit(IEmitter emitter, EmitterState state);