Пример #1
0
        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");
        }
Пример #2
0
        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();
        }
Пример #3
0
        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();

        }
Пример #4
0
        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();
        }
Пример #5
0
        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");
        }