Exemple #1
0
        private void Write(ContainerTypeFromNameMethod method)
        {
            WriteSignature(method);
            using (_builder.IndentBraced)
            {
                _("global::System.Type resolvedType;");
                _("resolvedType = Context.DefaultResolveTypeInternal(typeName,  \"{0}\", \"{1}\");", method.ClientNamespace, method.ServerNamespace);
                _("if (resolvedType != null)");
                using (_builder.IndentBraced)
                {
                    _("return resolvedType;");
                }

                _("return null;");
            }
        }
Exemple #2
0
        private void Write(ContainerTypeFromNameMethod method)
        {
            WriteSignature(method);
            using (_builder.IndentBraced)
            {
                _("global::System.Type resolvedType;");
                _("resolvedType = Context.DefaultResolveTypeInternal(typeName,  \"{0}\", \"{1}\");", method.ClientNamespace, method.ServerNamespace);
                _("if (resolvedType != null)");
                using (_builder.IndentBraced)
                {
                    _("return resolvedType;");
                }

                _("return null;");
            }
        }