public Type GetLiaisonType() { if (liaison_type == null) { liaison_type = TypeCreator.CreateType("ObjectLiaison_" + GetTargetType().Name, TypeAttributesExtensions.PUBLIC_CLASS, delegate(TypeBuilder type_builder) { type_builder.SetParent(typeof(ObjectLiaison)); target_serializer_prop_groups = target_props .Convert(p => TypeSerializerProp.Create(type_builder, p)) .Group( p => p.GetUpdateInterval(), (i, ps) => new TypeSerializerPropGroup(type_builder, i, ps) ).ToList(); liaison_update_interval = target_serializer_prop_groups .Convert(g => g.GetUpdateInterval()) .Min(); type_builder.CreateConstructor(MethodAttributesExtensions.PUBLIC, delegate(ConstructorBuilderEX method) { return(new ILBlock( method.GetBaseILConstruct(method.GetEffectiveILParameter(0)), target_serializer_prop_groups .Convert(g => g.GenerateConstructor(method.GetILThis())) .ToBlock() )); }, typeof(TypeSerializer)); }); } return(liaison_type); }
public static Signal CreateSignal(VHDL.Object.Signal s) { return(new Signal(TypeCreator.CreateType(s.Type), s)); }
public object create(string typeName, params object[] args) { Trace.Assert(!String.IsNullOrWhiteSpace(typeName)); return(typeCreator.CreateType(typeName, args)); }