Example #1
0
        public static ServiceInstance FromLegacyInstance(Legacy.ServiceInstance legacyInstance, ServiceConfiguration configuration, Profile profile = null)
        {
            var serviceInstance = new ServiceInstance()
            {
                Configuration  = ServiceInstanceConfiguration.FromLegacyConfiguration(legacyInstance, configuration, profile ?? configuration.Profile),
                LegacyInstance = legacyInstance
            };

            serviceInstance.Configuration.Instance = serviceInstance;
            return(serviceInstance);
        }
Example #2
0
        public static ServiceInstanceConfiguration FromLegacyConfiguration(Legacy.ServiceInstance legacyInstance, ServiceConfiguration baseConfiguration = null, Profile profile = null, Dictionary <string, string> options = null)
        {
            ServiceInstanceConfiguration configuration = ServiceConfiguration.FromLegacyConfiguration <ServiceInstanceConfiguration>(
                legacyInstance.Configuration,
                baseConfiguration,
                profile,
                options
                );

            configuration.SchedulingRules.Clear();
            return(configuration);
        }