public SymbolFixer(AssemblyDefinition assembly, PreloadingAssemblyResolver resolver, TaskLoggingHelper log) { this.Assembly = assembly; this.Resolver = resolver; this.Log = log; this.SigumEntities = assembly.Name.Name == "Signum.Entities" ? assembly : resolver.Resolve("Signum.Entities"); this.SemiSymbolEntity = SigumEntities.MainModule.GetType("Signum.Entities", "Symbol"); }
public FieldAutoInitializer(AssemblyDefinition assembly, PreloadingAssemblyResolver resolver, TaskLoggingHelper log) { this.Assembly = assembly; this.Resolver = resolver; this.Log = log; this.SystemType = resolver.Resolve("mscorlib").MainModule.GetType("System", "Type"); this.GetTypeFromHandle = this.SystemType.GetMethods().Single(a => a.Name == "GetTypeFromHandle"); this.SigumEntities = assembly.Name.Name == "Signum.Entities" ? assembly : resolver.SignumEntities; this.AutoInit = SigumEntities.MainModule.GetType("Signum.Entities", "AutoInitAttribute"); this.OperationSymbol = SigumEntities.MainModule.GetType("Signum.Entities", "OperationSymbol").Resolve(); this.OperationSymbolConstruct = this.OperationSymbol.NestedTypes.Single(t => t.Name == "Construct`1").Resolve(); }
public FieldAutoInitializer(AssemblyDefinition assembly, PreloadingAssemblyResolver resolver, TextWriter log) { this.Assembly = assembly; this.Resolver = resolver; this.Log = log; var module = resolver.Resolve(AssemblyNameReference.Parse("System.Runtime")).MainModule; var tr = module.ExportedTypes.Single(a => a.FullName == "System.Type"); this.SystemType = tr.Resolve(); this.GetTypeFromHandle = this.SystemType.GetMethods().Single(a => a.Name == "GetTypeFromHandle"); this.SigumEntities = assembly.Name.Name == "Signum.Entities" ? assembly : resolver.SignumEntities; this.AutoInit = SigumEntities.MainModule.GetType("Signum.Entities", "AutoInitAttribute"); this.OperationSymbol = SigumEntities.MainModule.GetType("Signum.Entities", "OperationSymbol").Resolve(); this.OperationSymbolConstruct = this.OperationSymbol.NestedTypes.Single(t => t.Name == "Construct`1").Resolve(); }