本文整理汇总了C#中IEmitter类的典型用法代码示例。如果您正苦于以下问题:C# IEmitter类的具体用法?C# IEmitter怎么用?C# IEmitter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IEmitter类属于命名空间,在下文中一共展示了IEmitter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1:
/// <summary>
/// Writes this object's state to a YAML emitter.
/// </summary>
/// <param name="emitter"></param>
void IYamlSerializable.WriteYaml(IEmitter emitter)
{
foreach (var item in events)
{
emitter.Emit(item);
}
}
示例2: foreach
/// <summary>
/// Writes this object's state to a YAML emitter.
/// </summary>
void IYamlConvertible.Write(IEmitter emitter, ObjectSerializer nestedObjectSerializer)
{
foreach (var item in events)
{
emitter.Emit(item);
}
}
示例3: AfterTypesEmit
public void AfterTypesEmit(IEmitter emitter, IList<ITypeInfo> types)
{
foreach (var plugin in this.Parts)
{
plugin.AfterTypesEmit(emitter, types);
}
}
示例4: Enter
public override bool Enter(IObjectDescriptor value, IEmitter context)
{
var typeConverter = typeConverters.FirstOrDefault(t => t.Accepts(value.Type));
if (typeConverter != null)
{
typeConverter.WriteYaml(context, value.Value, value.Type);
return false;
}
var convertible = value.Value as IYamlConvertible;
if (convertible != null)
{
convertible.Write(context, nestedObjectSerializer);
return false;
}
#pragma warning disable 0618 // IYamlSerializable is obsolete
var serializable = value.Value as IYamlSerializable;
if (serializable != null)
{
serializable.WriteYaml(context);
return false;
}
#pragma warning restore
return base.Enter(value, context);
}
示例5: AfterEmit
public void AfterEmit(IEmitter emitter, ITranslator translator)
{
foreach (var plugin in this.Parts)
{
plugin.AfterEmit(emitter, translator);
}
}
示例6: ExpressionListBlock
public ExpressionListBlock(IEmitter emitter, IEnumerable<Expression> expressions, Expression paramArg)
: base(emitter, null)
{
this.Emitter = emitter;
this.Expressions = expressions;
this.ParamExpression = paramArg;
}
示例7: AfterTypeEmit
public void AfterTypeEmit(IEmitter emitter, ITypeInfo type)
{
foreach (var plugin in this.Parts)
{
plugin.AfterTypeEmit(emitter, type);
}
}
示例8: ConstructorBlock
public ConstructorBlock(IEmitter emitter, ITypeInfo typeInfo, bool staticBlock)
: base(emitter, typeInfo.TypeDeclaration)
{
this.Emitter = emitter;
this.TypeInfo = typeInfo;
this.StaticBlock = staticBlock;
}
示例9: Parser
Token id, iprop; // id is the current ID for the current line
/// <summary>
/// Create a new iCalendar parser.
/// </summary>
/// <param name="reader">The reader that contains the stream of text iCalendar</param>
/// <param name="_emitter">The emitter that will transform the iCalendar elements</param>
public Parser(StreamReader reader, IEmitter _emitter)
{
scanner = new Scanner(reader);
emitter = _emitter;
emitter.VParser = this;
errors = new ArrayList();
}
示例10: ExpressionListBlock
public ExpressionListBlock(IEmitter emitter, IEnumerable<Expression> expressions, Expression paramArg, InvocationExpression invocation = null)
: base(emitter, null)
{
this.Emitter = emitter;
this.Expressions = expressions;
this.ParamExpression = paramArg;
this.InvocationExpression = invocation;
}
示例11: Emit
public override void Emit(MappingStartEventInfo eventInfo, IEmitter emitter)
{
if(tagMappings.ContainsKey(eventInfo.Source.Type))
{
eventInfo.Tag = tagMappings[eventInfo.Source.Type];
}
base.Emit(eventInfo, emitter);
}
示例12: Add
public EmitComposite Add(IEmitter node)
{
if (node.IsNotNull())
{
_nodes.Add(node);
}
return this;
}
示例13: CustomSerializationObjectGraphVisitor
public CustomSerializationObjectGraphVisitor(IEmitter emitter, IObjectGraphVisitor nextVisitor, IEnumerable<IYamlTypeConverter> typeConverters)
: base(nextVisitor)
{
this.emitter = emitter;
this.typeConverters = typeConverters != null
? typeConverters.ToList()
: Enumerable.Empty<IYamlTypeConverter>();
}
示例14: Pdp11Assembler
public Pdp11Assembler(Pdp11Architecture arch, Address addrBase, IEmitter emitter)
{
this.arch = arch;
this.BaseAddress = addrBase;
this.emitter = emitter;
this.Equates = new Dictionary<string, object>();
this.symtab = new SymbolTable();
}
示例15: SwitchBlock
public SwitchBlock(IEmitter emitter, CaseLabel caseLabel, string varName, bool isFirst)
: base(emitter, caseLabel)
{
this.Emitter = emitter;
this.CaseLabel = caseLabel;
varName_ = varName;
isFirst_ = isFirst;
}