Beispiel #1
0
        internal AppDomainSetup(AppDomainSetup copy, bool copyDomainBoundData)
        {
            string[] mine = Value;
            if (copy != null)
            {
                string[] other     = copy.Value;
                int      mineSize  = _Entries.Length;
                int      otherSize = other.Length;
                int      size      = (otherSize < mineSize) ? otherSize : mineSize;

                for (int i = 0; i < size; i++)
                {
                    mine[i] = other[i];
                }

                if (size < mineSize)
                {
                    for (int i = size; i < mineSize; i++)
                    {
                        mine[i] = null;
                    }
                }

                _LoaderOptimization = copy._LoaderOptimization;

                _AppDomainInitializerArguments = copy.AppDomainInitializerArguments;
                _ActivationArguments           = copy.ActivationArguments;
                if (copyDomainBoundData)
                {
                    _AppDomainInitializer = copy.AppDomainInitializer;
                }
                else
                {
                    _AppDomainInitializer = null;
                }

                _ConfigurationBytes = copy.GetConfigurationBytes();
            }
            else
            {
                _LoaderOptimization = LoaderOptimization.NotSpecified;
            }
        }
Beispiel #2
0
        private void DeserializeNonPrimitives()
        {
            lock (this) {
                if (serialized_non_primitives == null)
                {
                    return;
                }

                BinaryFormatter bf = new BinaryFormatter();
                MemoryStream    ms = new MemoryStream(serialized_non_primitives);

                object [] arr = (object [])bf.Deserialize(ms);

                _activationArguments = (ActivationArguments)arr [0];
                domain_initializer   = (AppDomainInitializer)arr [1];
                application_trust    = (ApplicationTrust)arr [2];

                serialized_non_primitives = null;
            }
        }
Beispiel #3
0
 internal AppDomainSetup(AppDomainSetup setup)
 {
     application_base           = setup.application_base;
     application_name           = setup.application_name;
     cache_path                 = setup.cache_path;
     configuration_file         = setup.configuration_file;
     dynamic_base               = setup.dynamic_base;
     license_file               = setup.license_file;
     private_bin_path           = setup.private_bin_path;
     private_bin_path_probe     = setup.private_bin_path_probe;
     shadow_copy_directories    = setup.shadow_copy_directories;
     shadow_copy_files          = setup.shadow_copy_files;
     publisher_policy           = setup.publisher_policy;
     path_changed               = setup.path_changed;
     loader_optimization        = setup.loader_optimization;
     disallow_binding_redirects = setup.disallow_binding_redirects;
     disallow_code_downloads    = setup.disallow_code_downloads;
     _activationArguments       = setup._activationArguments;
     domain_initializer         = setup.domain_initializer;
     application_trust          = setup.application_trust;
     domain_initializer_args    = setup.domain_initializer_args;
     disallow_appbase_probe     = setup.disallow_appbase_probe;
     configuration_bytes        = setup.configuration_bytes;
 }
Beispiel #4
0
 public AppDomainSetup(ActivationContext activationContext)
 {
     _activationArguments = new ActivationArguments(activationContext);
 }
Beispiel #5
0
 public AppDomainSetup(ActivationArguments activationArguments)
 {
     _activationArguments = activationArguments;
 }
Beispiel #6
0
 public AppDomainSetup(ActivationArguments activationArguments)
 {
     throw new NotImplementedException();
 }