Exemplo n.º 1
0
 private static void AddMethod(MethodMetaInfo info)
 {
     if (methods_.ContainsKey(info.MethodDefinition))
     {
         throw new ArgumentException(info.MethodDefinition.FullName + " is already has");
     }
     methods_.Add(info.MethodDefinition, info);
 }
Exemplo n.º 2
0
 private void Method()
 {
     if (model_.Methods != null)
     {
         foreach (var methodModel in model_.Methods)
         {
             var methods = TypeDefinition.Methods.Where(i => IsMethodMatchAll(i, methodModel));
             foreach (MethodDefinition methodDefinition in methods)
             {
                 MethodMetaInfo info = new MethodMetaInfo(methodDefinition, methodModel);
                 XmlMetaMaker.AddMethod(info);
             }
         }
     }
 }
Exemplo n.º 3
0
            private void Method()
            {
                if (model_.Methods != null)
                {
                    foreach (var methodModel in model_.Methods)
                    {
                        if (string.IsNullOrEmpty(methodModel.name))
                        {
                            throw new ArgumentException($"type [{model_.name}] has a method name is empty");
                        }

                        var info = methods_.GetOrDefault(methodModel.name);
                        if (info == null)
                        {
                            info = new MethodMetaInfo();
                            methods_.Add(methodModel.name, info);
                        }
                        info.Add(methodModel);
                    }
                }
            }