Пример #1
0
 private void ImportMethodsForAllFromConfig(
     MethodElementCollection xmlMethods,
     IEnumerable <IMethod> methods,
     IService parentServ)
 {
     if (xmlMethods == null)
     {
         foreach (IMethod method1 in methods)
         {
             method1.ExposedState = ExposedMethodStateType.NonExposed;
             foreach (IMethod method2 in parentServ.Methods)
             {
                 if (method2.Name == method1.Name)
                 {
                     method1.ExposedState = method2.ExposedState;
                 }
             }
         }
     }
     else
     {
         if (methods == null)
         {
             return;
         }
         foreach (IMethod method in methods)
         {
             MethodElement methodElement = xmlMethods.Get(method.Name);
             if (methodElement != null)
             {
                 method.ExposedState = methodElement.ExposedType;
             }
         }
     }
 }
Пример #2
0
 private void ImportMethodsFromConfig(
     MethodElementCollection xmlMethods,
     IEnumerable <IMethod> methods)
 {
     if (xmlMethods.Count <= 0 || methods == null)
     {
         return;
     }
     foreach (IMethod method in methods)
     {
         MethodElement methodElement = xmlMethods.Get(method.Name);
         if (methodElement != null)
         {
             method.ExposedState = methodElement.ExposedType;
         }
     }
 }
Пример #3
0
 public void Add(MethodElement myElement)
 {
     this.BaseAdd((ConfigurationElement)myElement);
 }