Esempio n. 1
0
        } // ProcessServiceActivatedNode


        // appears under "application/client"
        private static void ProcessClientWellKnownNode(ConfigNode node, RemotingXmlConfigFileData configData,
            RemotingXmlConfigFileData.RemoteAppEntry remoteApp)
        {
            String typeName = null;
            String assemName = null;
            String url = null;

            foreach (DictionaryEntry entry in node.Attributes)
            {
                String key = entry.Key.ToString();
                switch (key)
                {                
                case "displayName": break; // displayName is ignored (used by config utility for labelling the application)
                
                case "type":
                {
                    RemotingConfigHandler.ParseType((String)entry.Value, out typeName, out assemName);
                    break;
                } // case "type" 

                case "url": url = (String)entry.Value; break;

                default: break;
                } // switch
            } // foreach

            // check for errors    
            if (url == null)
                ReportMissingAttributeError("WellKnown client", "url", configData);

            if ((typeName == null) || (assemName == null))
                ReportMissingTypeAttributeError(node, "type", configData);

            if (CheckAssemblyNameForVersionInfo(assemName))
                ReportAssemblyVersionInfoPresent(assemName, "client wellknown", configData);

            remoteApp.AddWellKnownEntry(typeName, assemName, url);
        } // ProcessClientWellKnownNode
 private static void ProcessClientWellKnownNode(ConfigNode node, RemotingXmlConfigFileData configData, RemotingXmlConfigFileData.RemoteAppEntry remoteApp)
 {
     string typeName = null;
     string assemName = null;
     string url = null;
     foreach (DictionaryEntry entry in node.Attributes)
     {
         string str5;
         if (((str5 = entry.Key.ToString()) != null) && (str5 != "displayName"))
         {
             if (!(str5 == "type"))
             {
                 if (str5 == "url")
                 {
                     goto Label_0075;
                 }
             }
             else
             {
                 RemotingConfigHandler.ParseType((string) entry.Value, out typeName, out assemName);
             }
         }
         continue;
     Label_0075:
         url = (string) entry.Value;
     }
     if (url == null)
     {
         ReportMissingAttributeError("WellKnown client", "url", configData);
     }
     if ((typeName == null) || (assemName == null))
     {
         ReportMissingTypeAttributeError(node, "type", configData);
     }
     if (CheckAssemblyNameForVersionInfo(assemName))
     {
         ReportAssemblyVersionInfoPresent(assemName, "client wellknown", configData);
     }
     remoteApp.AddWellKnownEntry(typeName, assemName, url);
 }