Exemplo n.º 1
0
        DocBase ProcessInfo(string targetNamePrefix, string fullName, string baseTypeName)
        {
            switch (targetNamePrefix)
            {
            case "T": {
                return(GetTypeByName(fullName, baseTypeName));
            }

            case "M": {
                var info = new MethodDoc(fullName);
                GetTypeByName(info.Namespace).AddMethod(info);
                return(info);
            }

            case "P": {
                var info = new PropertyDoc(fullName);
                GetTypeByName(info.Namespace).AddProperty(info);
                return(info);
            }

            case "E": {
                var info = new EventDoc(fullName);
                GetTypeByName(info.Namespace).AddEvent(info);
                return(info);
            }

            case "cT": {
                return(GetTypeByName(fullName, baseTypeName));
            }

            case "cM": {
                var info = new MethodDoc(fullName);
                GetTypeByName(info.Namespace).AddClientMethod(info);
                return(info);
            }

            case "cP": {
                var info = new ClientPropertyDoc(fullName);
                GetTypeByName(info.Namespace).AddClientProperty(info);
                return(info);
            }

            case "cE": {
                var info = new ClientEventDoc(fullName);
                GetTypeByName(info.Namespace).AddClientEvent(info);
                return(info);
            }
            }

            throw new ArgumentException("Unknown info type", "fullName");
        }
Exemplo n.º 2
0
 public void AddProperty(PropertyDoc info)
 {
     _properties.Add(info);
 }
Exemplo n.º 3
0
 public void AddProperty(PropertyDoc info)
 {
     _properties.Add(info);
 }
        DocBase ProcessInfo(string targetNamePrefix, string fullName, string baseTypeName)
        {
            switch(targetNamePrefix) {
                case "T": {
                        return GetTypeByName(fullName, baseTypeName);
                    }
                case "M": {
                        var info = new MethodDoc(fullName);
                        GetTypeByName(info.Namespace).AddMethod(info);
                        return info;
                    }
                case "P": {
                        var info = new PropertyDoc(fullName);
                        GetTypeByName(info.Namespace).AddProperty(info);
                        return info;
                    }
                case "E": {
                        var info = new EventDoc(fullName);
                        GetTypeByName(info.Namespace).AddEvent(info);
                        return info;
                    }
                case "cT": {
                        return GetTypeByName(fullName, baseTypeName);
                    }
                case "cM": {
                        var info = new MethodDoc(fullName);
                        GetTypeByName(info.Namespace).AddClientMethod(info);
                        return info;
                    }
                case "cP": {
                        var info = new ClientPropertyDoc(fullName);
                        GetTypeByName(info.Namespace).AddClientProperty(info);
                        return info;
                    }
                case "cE": {
                        var info = new ClientEventDoc(fullName);
                        GetTypeByName(info.Namespace).AddClientEvent(info);
                        return info;
                    }
            }

            throw new ArgumentException("Unknown info type", "fullName");
        }