コード例 #1
0
            internal void AddActivatedClientType(ActivatedClientTypeEntry entry)
            {
                if (this.CheckForRedirectedClientType(entry.TypeName, entry.AssemblyName))
                {
                    throw new RemotingException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_Config_TypeAlreadyRedirected"), new object[] { entry.TypeName, entry.AssemblyName }));
                }
                if (this.CheckForServiceEntryWithType(entry.TypeName, entry.AssemblyName))
                {
                    throw new RemotingException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_Config_CantRedirectActivationOfWellKnownService"), new object[] { entry.TypeName, entry.AssemblyName }));
                }
                string applicationUrl = entry.ApplicationUrl;

                System.Runtime.Remoting.RemoteAppEntry entry2 = (System.Runtime.Remoting.RemoteAppEntry) this._remoteAppInfo[applicationUrl];
                if (entry2 == null)
                {
                    entry2 = new System.Runtime.Remoting.RemoteAppEntry(applicationUrl, applicationUrl);
                    this._remoteAppInfo.Add(applicationUrl, entry2);
                }
                if (entry2 != null)
                {
                    entry.CacheRemoteAppEntry(entry2);
                }
                string key = this.EncodeTypeAndAssemblyNames(entry.TypeName, entry.AssemblyName);

                this._remoteTypeInfo.Add(key, entry);
            }
コード例 #2
0
            internal ActivatedClientTypeEntry QueryRemoteActivate(string typeName, string assemblyName)
            {
                string str = this.EncodeTypeAndAssemblyNames(typeName, assemblyName);
                ActivatedClientTypeEntry entry = this._remoteTypeInfo[str] as ActivatedClientTypeEntry;

                if (entry == null)
                {
                    return(null);
                }
                if (entry.GetRemoteAppEntry() == null)
                {
                    System.Runtime.Remoting.RemoteAppEntry entry2 = (System.Runtime.Remoting.RemoteAppEntry) this._remoteAppInfo[entry.ApplicationUrl];
                    if (entry2 == null)
                    {
                        throw new RemotingException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_Activation_MissingRemoteAppEntry"), new object[] { entry.ApplicationUrl }));
                    }
                    entry.CacheRemoteAppEntry(entry2);
                }
                return(entry);
            }
コード例 #3
0
ファイル: configuration.cs プロジェクト: REALTOBIZ/mono
            } // CheckForRedirectedClientType
            

            internal void AddActivatedClientType(ActivatedClientTypeEntry entry)
            {
                if (CheckForRedirectedClientType(entry.TypeName, entry.AssemblyName))
                {
                    throw new RemotingException(
                        String.Format(
                            CultureInfo.CurrentCulture, Environment.GetResourceString(
                                "Remoting_Config_TypeAlreadyRedirected"),
                            entry.TypeName, entry.AssemblyName));
                }                 

                if (CheckForServiceEntryWithType(entry.TypeName, entry.AssemblyName))
                {
                   throw new RemotingException(
                       String.Format(
                           CultureInfo.CurrentCulture, Environment.GetResourceString(
                               "Remoting_Config_CantRedirectActivationOfWellKnownService"),
                           entry.TypeName, entry.AssemblyName));
                }
            
                String appUrl = entry.ApplicationUrl;
                RemoteAppEntry appEntry = (RemoteAppEntry)_remoteAppInfo[appUrl];
                if (appEntry == null)
                {
                    appEntry = new RemoteAppEntry(appUrl, appUrl);
                    _remoteAppInfo.Add(appUrl, appEntry);
                }
                    
                if (appEntry != null)
                {
                    entry.CacheRemoteAppEntry(appEntry);
                }
                    
                String index = EncodeTypeAndAssemblyNames(entry.TypeName, entry.AssemblyName);
                _remoteTypeInfo.Add(index, entry);
            } // AddActivatedClientType
 internal void AddActivatedClientType(ActivatedClientTypeEntry entry)
 {
     if (this.CheckForRedirectedClientType(entry.TypeName, entry.AssemblyName))
     {
         throw new RemotingException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_Config_TypeAlreadyRedirected"), new object[] { entry.TypeName, entry.AssemblyName }));
     }
     if (this.CheckForServiceEntryWithType(entry.TypeName, entry.AssemblyName))
     {
         throw new RemotingException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_Config_CantRedirectActivationOfWellKnownService"), new object[] { entry.TypeName, entry.AssemblyName }));
     }
     string applicationUrl = entry.ApplicationUrl;
     System.Runtime.Remoting.RemoteAppEntry entry2 = (System.Runtime.Remoting.RemoteAppEntry) this._remoteAppInfo[applicationUrl];
     if (entry2 == null)
     {
         entry2 = new System.Runtime.Remoting.RemoteAppEntry(applicationUrl, applicationUrl);
         this._remoteAppInfo.Add(applicationUrl, entry2);
     }
     if (entry2 != null)
     {
         entry.CacheRemoteAppEntry(entry2);
     }
     string key = this.EncodeTypeAndAssemblyNames(entry.TypeName, entry.AssemblyName);
     this._remoteTypeInfo.Add(key, entry);
 }