Esempio n. 1
0
        private void DoInstall(InstallSource source, InstallDestination installDestination)
        {
            source.InstallEnvironment             = environment;
            installDestination.InstallEnvironment = environment;

            ApplicationDesc app = source.OpenForReading <ApplicationDesc>().Object;

            using (TypedStream <ApplicationDesc> appstream = installDestination.OpenForWriting <ApplicationDesc>())
            {
                appstream.Object = app;
            }

            /* register default bindings */
            foreach (string type in app.DefaultBindings.Keys)
            {
                documentManagement.RegisterDocumentUsage(
                    type, installDestination.ToString(), app.DefaultBindings[type]);
            }
        }
Esempio n. 2
0
        void DoCopy(InstallSource source, InstallDestination destination)
        {
            source.InstallEnvironment      = environment;
            destination.InstallEnvironment = environment;

            /* -- no, we don't do that anymore
             * if (destination.Exists)
             * {
             *  destination.Delete();
             * }
             */

            foreach (Type t in source.Types)
            {
                // Console.Out.WriteLine("{0}[{1}] -> {1}", source, t.Name, destination);
                TypedStream <object> dstStream = destination.OpenForWriting(t);
                using (TypedStream <object> srcStream = source.OpenForReading(t))
                {
                    dstStream.Array = srcStream.Array;
                    dstStream.Dispose();
                }
            }
        }