Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CloakContext"/> class.
        /// </summary>
        /// <param name="settings">The settings.</param>
        public CloakContext(InitialisationSettings settings, ModuleDefinition moduleDefinition)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings", "settings is null.");
            }
            if (moduleDefinition == null)
            {
                throw new ArgumentNullException("moduleDefinition", "moduleDefinition is null.");
            }

            assemblyDefinition = moduleDefinition.Assembly;

            this.settings = settings;

            nameManager = new NameManager();

            mappingGraph = new MappingGraph();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CloakContext"/> class.
        /// </summary>
        /// <param name="settings">The settings.</param>
        public CloakContext(InitialisationSettings settings)
        {
            //Check for null
            if (settings == null) throw new ArgumentNullException("settings");

            //Make sure they're valid
            settings.Validate();

            //Finally store them
            this.settings = settings;

            //Create the name manager
            nameManager = new NameManager();

            //Create the mapping graph
            mappingGraph = new MappingGraph();

            //Initialise the assembly definitions
            assemblyDefinitionsLoaded = false;
            assemblyDefinitions = new Dictionary<string, AssemblyDefinition>();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CloakContext"/> class.
        /// </summary>
        /// <param name="settings">The settings.</param>
        public CloakContext(InitialisationSettings settings)
        {
            //Check for null
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            //Make sure they're valid
            settings.Validate();

            //Finally store them
            this.settings = settings;

            //Create the name manager
            nameManager = new NameManager();

            //Create the mapping graph
            mappingGraph = new MappingGraph();

            //Initialise the assembly definitions
            assemblyDefinitionsLoaded = false;
            assemblyDefinitions       = new Dictionary <string, AssemblyDefinition>();
        }