internal BuildAssembly(BuildAssemblyManager assemblyManager, string filePath)
            : base(assemblyManager, filePath)
        {
            var module = (BuildModule)_module;

            _state   = module.State;
            _builder = assemblyManager.Builder;
        }
Exemplo n.º 2
0
        protected internal BuildModule(BuildAssembly assembly, string filePath)
            : base(assembly, filePath)
        {
            var assemblyManager = (BuildAssemblyManager)assembly.AssemblyManager;

            _builder = assemblyManager.Builder;
            _state   = assemblyManager.GetState(Location);
            _state.Load(this);
            _stateOffset = _state.GetModuleOffset();
        }
Exemplo n.º 3
0
        protected override void Close()
        {
            if (_state != null)
            {
                _state.Close();
                _state = null;
            }

            base.Close();
        }
        internal ModuleState GetState(string filePath)
        {
            ModuleState state;

            if (!_stateByPath.TryGetValue(filePath, out state))
            {
                state = new ModuleState();
                _stateByPath.Add(filePath, state);
            }

            return(state);
        }
Exemplo n.º 5
0
        private void Sign(ModuleState state)
        {
            byte[] keyPair = File.ReadAllBytes(state.StrongNameKeyFilePath);

            if (!string.IsNullOrEmpty(state.StrongNameKeyPassword))
            {
                keyPair = StrongNameUtils.ExtractKeyPairFromPKCS12(keyPair, state.StrongNameKeyPassword);
            }

            foreach (string filePath in state.SignFiles)
            {
                StrongNameUtils.SignAssemblyFromKeyPair(filePath, keyPair, StrongNameGenerationFlags.None);
            }
        }
 internal void Init(int rid, ModuleState state)
 {
     _rid   = rid;
     _state = state;
 }
Exemplo n.º 7
0
 protected internal BuildMethod(BuildModule module, int rid, int typeRID)
     : base(module, rid, typeRID)
 {
     _state       = module.State;
     _stateOffset = _state.GetMethodOffset(rid);
 }
Exemplo n.º 8
0
 protected internal BuildType(BuildModule module, int rid, int enclosingTypeRID)
     : base(module, rid, enclosingTypeRID)
 {
     _state       = module.State;
     _stateOffset = _state.GetTypeOffset(rid);
 }
 protected internal BuildProperty(BuildModule module, int rid, int typeRID)
     : base(module, rid, typeRID)
 {
     _state       = module.State;
     _stateOffset = _state.GetPropertyOffset(rid);
 }
Exemplo n.º 10
0
 protected internal BuildResource(BuildModule module, int rid)
     : base(module, rid)
 {
     _state       = module.State;
     _stateOffset = _state.GetResourceOffset(rid);
 }
Exemplo n.º 11
0
 internal ModuleObjectState(ModuleState state, IBinaryAccessor accessor)
 {
     _state = state;
     Deserialize(accessor);
 }
Exemplo n.º 12
0
 internal ModuleObjectState(ModuleState state)
 {
     _state = state;
     _items = new StateObject[0x10];
 }