public object GetService(Type serviceType)
        {
            object service = null;

            if (serviceType == typeof(IReferenceService))
                service = new ActivityCodeDomReferenceService(this.serializationManager.GetService(serviceType) as IReferenceService);

            if (serviceType == typeof(IServiceContainer))
            {
                service = serializationManager.GetService(serviceType);

                if (service == null)
                {
                    service = serviceContainer;
                }
            }

            // If we haven't provded the service, try the serialization manager we wrap
            if (service == null)
                service = this.serializationManager.GetService(serviceType);

            // Last ditch effort, see if our consumer had added the service
            if (service == null)
                service = serviceContainer.GetService(serviceType);

            return service;
        }
 public object GetService(Type serviceType)
 {
     object service = null;
     if (serviceType == typeof(IReferenceService))
     {
         service = new ActivityCodeDomReferenceService(this.serializationManager.GetService(serviceType) as IReferenceService);
     }
     if (serviceType == typeof(IServiceContainer))
     {
         service = this.serializationManager.GetService(serviceType);
         if (service == null)
         {
             service = this.serviceContainer;
         }
     }
     if (service == null)
     {
         service = this.serializationManager.GetService(serviceType);
     }
     if (service == null)
     {
         service = this.serviceContainer.GetService(serviceType);
     }
     return service;
 }