示例#1
0
 public SreMethodBuilder(SreTypeSystem system, MethodBuilder methodBuilder,
                         IReadOnlyList <IXamlType> parameters) : base(system, methodBuilder)
 {
     MethodBuilder = methodBuilder;
     Generator     = new IlGen(system, methodBuilder.GetILGenerator());
     _parameters   = parameters;
 }
示例#2
0
 public SreCustomAttribute(SreTypeSystem system, CustomAttributeData data, IXamlType type)
 {
     Type       = type;
     _data      = data;
     Parameters = data.ConstructorArguments.Select(p =>
                                                   p.Value is Type t ? system.ResolveType(t) : p.Value
                                                   ).ToList();
     Properties = data.NamedArguments?.ToDictionary(x => x.MemberName, x => x.TypedValue.Value) ??
                  new Dictionary <string, object>();
 }
示例#3
0
 public SreConstructorBuilder(SreTypeSystem system, ConstructorBuilder ctor) : base(system, ctor)
 {
     Generator = new IlGen(system, ctor.GetILGenerator());
 }
示例#4
0
 public SreTypeBuilder(SreTypeSystem system, TypeBuilder tb) : base(system, null, tb)
 {
     _system = system;
     _tb     = tb;
 }
示例#5
0
 public IlGen(SreTypeSystem system, ILGenerator ilg)
 {
     TypeSystem = system;
     _ilg       = ilg;
     LocalsPool = new XamlLocalsPool(t => this.DefineLocal(t));
 }
示例#6
0
 public SreField(SreTypeSystem system, FieldInfo field) : base(system, field)
 {
     Field     = field;
     FieldType = system.ResolveType(field.FieldType);
 }
示例#7
0
 public SreEvent(SreTypeSystem system, EventInfo ev) : base(system, ev)
 {
     Event = ev;
     Add   = new SreMethod(system, ev.AddMethod);
 }
示例#8
0
 public SreProperty(SreTypeSystem system, PropertyInfo member) : base(system, member)
 {
     Member = member;
     Setter = member.SetMethod == null ? null : new SreMethod(system, member.SetMethod);
     Getter = member.GetMethod == null ? null : new SreMethod(system, member.GetMethod);
 }
示例#9
0
 public SreConstructor(SreTypeSystem system, ConstructorInfo ctor) : base(system, ctor)
 {
     Constuctor = ctor;
 }
示例#10
0
 public SreMethod(SreTypeSystem system, MethodInfo method) : base(system, method)
 {
     Method  = method;
     _system = system;
 }
示例#11
0
 public SreMethodBase(SreTypeSystem system, MethodBase method) : base(system, method)
 {
     _method = method;
 }
示例#12
0
 public SreType(SreTypeSystem system, SreAssembly asm, Type type) : base(system, type)
 {
     Assembly = asm;
     Type     = type;
 }
示例#13
0
 public SreMemberInfo(SreTypeSystem system, MemberInfo member)
 {
     System  = system;
     _member = member;
 }
示例#14
0
 public SreAssembly(SreTypeSystem system, Assembly asm)
 {
     _system  = system;
     Assembly = asm;
 }