상속: System.MarshalByRefObject, IDisposable
        protected override object Instantiate()
        {
            RemotingRegistry registry = (RemotingRegistry)
                                        Model.ExtendedProperties["remoting.remoteregistry"];

            return(registry.CreateRemoteInstance(Model.Name));
        }
예제 #2
0
		/// <summary>
		///   Initializes a new instance of the <see cref = "RemotingInspector" /> class.
		/// </summary>
		/// <param name = "converter">The converter.</param>
		/// <param name = "isServer">if set to <c>true</c> is a server.</param>
		/// <param name = "isClient">if set to <c>true</c> is a client.</param>
		/// <param name = "baseUri">The base URI.</param>
		/// <param name = "remoteRegistry">The remote registry.</param>
		/// <param name = "localRegistry">The local registry.</param>
		public RemotingInspector(ITypeConverter converter, bool isServer, bool isClient,
		                         String baseUri, RemotingRegistry remoteRegistry, RemotingRegistry localRegistry)
		{
			this.converter = converter;
			this.isServer = isServer;
			this.isClient = isClient;
			this.baseUri = baseUri;
			this.remoteRegistry = remoteRegistry;
			this.localRegistry = localRegistry;
		}
 public RemotingInspector(ITypeConverter converter, bool isServer, bool isClient,
                          String baseUri, RemotingRegistry remoteRegistry, RemotingRegistry localRegistry)
 {
     this.converter      = converter;
     this.isServer       = isServer;
     this.isClient       = isClient;
     this.baseUri        = baseUri;
     this.remoteRegistry = remoteRegistry;
     this.localRegistry  = localRegistry;
 }
예제 #4
0
        private void ConfigureClientFacility()
        {
            var remoteKernelUri = FacilityConfig.Attributes["remoteKernelUri"];

            if (string.IsNullOrEmpty(remoteKernelUri))
            {
                var message = "When the remote facility is configured as " +
                              "client you must supply the URI for the kernel using the attribute 'remoteKernelUri'";

                throw new Exception(message);
            }

            remoteRegistry = (RemotingRegistry)
                             RemotingServices.Connect(typeof(RemotingRegistry), remoteKernelUri);
        }
예제 #5
0
        private void ConfigureClientFacility()
        {
            String remoteKernelUri = FacilityConfig.Attributes["remoteKernelUri"];

            if (remoteKernelUri == null || remoteKernelUri.Length == 0)
            {
                String message = "When the remote facility is configured as " +
                                 "client you must supply the URI for the kernel using the attribute 'remoteKernelUri'";
                throw new ConfigurationException(message);
            }

            remoteRegistry = (RemotingRegistry)
                             RemotingServices.Connect(typeof(RemotingRegistry), remoteKernelUri);

            disconnectRemoteRegistry = true;
        }
예제 #6
0
        private void ConfigureServerFacility()
        {
            Kernel.AddComponent("remoting.registry", typeof(RemotingRegistry));

            localRegistry = (RemotingRegistry)Kernel[typeof(RemotingRegistry)];

            String kernelUri = FacilityConfig.Attributes["registryUri"];

            if (kernelUri == null || kernelUri.Length == 0)
            {
                String message = "When the remote facility is configured as " +
                                 "server you must supply the URI for the component registry using the attribute 'registryUri'";
                throw new ConfigurationException(message);
            }

            RemotingServices.Marshal(localRegistry, kernelUri, typeof(RemotingRegistry));

            disconnectLocalRegistry = true;
        }
예제 #7
0
        private void ConfigureServerFacility()
        {
            Kernel.Register(Component.For <RemotingRegistry>().NamedAutomatically("remoting.registry"));

            localRegistry = Kernel.Resolve <RemotingRegistry>();

            var kernelUri = FacilityConfig.Attributes["registryUri"];

            if (string.IsNullOrEmpty(kernelUri))
            {
                var message = "When the remote facility is configured as " +
                              "server you must supply the URI for the component registry using the attribute 'registryUri'";

                throw new Exception(message);
            }

            RemotingServices.Marshal(localRegistry, kernelUri, typeof(RemotingRegistry));

            disconnectLocalRegistry = true;
        }
		private void ConfigureServerFacility()
		{
			Kernel.Register(Component.For<RemotingRegistry>().NamedAutomatically("remoting.registry"));

			localRegistry = Kernel.Resolve<RemotingRegistry>();

			var kernelUri = FacilityConfig.Attributes["registryUri"];

			if (string.IsNullOrEmpty(kernelUri))
			{
				var message = "When the remote facility is configured as " +
				              "server you must supply the URI for the component registry using the attribute 'registryUri'";

				throw new Exception(message);
			}

			RemotingServices.Marshal(localRegistry, kernelUri, typeof(RemotingRegistry));

			disconnectLocalRegistry = true;
		}
		private void ConfigureClientFacility()
		{
			var remoteKernelUri = FacilityConfig.Attributes["remoteKernelUri"];

			if (string.IsNullOrEmpty(remoteKernelUri))
			{
				var message = "When the remote facility is configured as " +
				              "client you must supply the URI for the kernel using the attribute 'remoteKernelUri'";

				throw new Exception(message);
			}

			remoteRegistry = (RemotingRegistry)
			                 RemotingServices.Connect(typeof(RemotingRegistry), remoteKernelUri);
		}
예제 #10
0
		private void ConfigureClientFacility()
		{
			String remoteKernelUri = FacilityConfig.Attributes["remoteKernelUri"];

			if (remoteKernelUri == null || remoteKernelUri.Length == 0)
			{
				String message = "When the remote facility is configured as " + 
					"client you must supply the URI for the kernel using the attribute 'remoteKernelUri'";

				throw new ConfigurationErrorsException(message);
			}

			remoteRegistry = (RemotingRegistry) 
				RemotingServices.Connect(typeof(RemotingRegistry), remoteKernelUri);
		}
예제 #11
0
		private void ConfigureServerFacility()
		{
			Kernel.AddComponent("remoting.registry", typeof(RemotingRegistry));

			localRegistry = (RemotingRegistry) Kernel[ typeof(RemotingRegistry) ];

			String kernelUri = FacilityConfig.Attributes["registryUri"];

			if (kernelUri == null || kernelUri.Length == 0)
			{
				String message = "When the remote facility is configured as " + 
					"server you must supply the URI for the component registry using the attribute 'registryUri'";

				throw new ConfigurationErrorsException(message);
			}

			RemotingServices.Marshal(localRegistry, kernelUri, typeof(RemotingRegistry));

			disconnectLocalRegistry = true;
		}