Ejemplo n.º 1
0
        private void RegisterPackages(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.CanRegisterPackages(fullPath))
                {
                    if (!IsAssociatedFile())
                    {
                        Artifact.SetMetadata(Constants.Catalogue.Artifact.RegisterPackages, true);
                    }

                    // Only register if required.

                    if (action == Action.Assemble)
                    {
                        string log;
                        if ((log = domain.RegisterPackages(fullPath)) != null)
                        {
                            LogMessage(log);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void UnregisterPackages(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.CanRegisterPackages(fullPath))
                {
                    // Only unregister if required.

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