Exemple #1
0
        private void RegisterDll(Action action, string fullPath)
        {
            using (RemoteDomain domain = CreateRemoteDomain(fullPath))
            {
                // This needs to be done in a remote AppDomain because it loads the assembly.

                if (domain.CanRegisterDll(fullPath))
                {
                    if (!IsAssociatedFile())
                    {
                        Artifact.SetMetadata(Constants.Catalogue.Artifact.Register, true);
                    }

                    // Only register if required.

                    if (action == Action.Assemble)
                    {
                        string message;
                        if ((message = domain.RegisterDll(fullPath)) != null)
                        {
                            LogMessage(message);
                        }
                    }
                }
            }
        }
Exemple #2
0
        private void UnregisterDll(Action action, string fullPath)
        {
            using (RemoteDomain domain = CreateRemoteDomain(fullPath))
            {
                // This needs to be done in a remote AppDomain because it loads the assembly.

                if (domain.CanRegisterDll(fullPath))
                {
                    // Only register if required.

                    if (action == Action.Assemble)
                    {
                        string log;
                        if ((log = domain.UnregisterDll(fullPath)) != null)
                        {
                            LogMessage(log);
                        }
                    }
                }
            }
        }