CodeParameterDeclarationExpression GenerateParameter(XmlMemberMapping member, FieldDirection dir)
        {
            string type = member.GenerateTypeName(CodeGenerator);
            CodeParameterDeclarationExpression par = new CodeParameterDeclarationExpression(type, member.MemberName);

            par.Direction = dir;
            return(par);
        }
Beispiel #2
0
        CodeParameterDeclarationExpression GenerateParameter(XmlMemberMapping member, FieldDirection dir)
        {
#if NET_2_0
            string type = member.GenerateTypeName(CodeGenerator);
#else
            string type = member.TypeFullName;
#endif
            CodeParameterDeclarationExpression par = new CodeParameterDeclarationExpression(type, member.MemberName);
            par.Direction = dir;
            return(par);
        }
Beispiel #3
0
        internal string GetTypeName(XmlMemberMapping member)
        {
            string str = member.GenerateTypeName(this.options.CodeProvider);

            if ((this.codeNamespace != null) && !string.IsNullOrEmpty(this.codeNamespace.Name))
            {
                foreach (CodeTypeDeclaration declaration in this.codeNamespace.Types)
                {
                    if (declaration.Name == str)
                    {
                        str = this.codeNamespace.Name + "." + str;
                    }
                }
            }
            return(str);
        }
Beispiel #4
0
        internal string GetTypeName(XmlMemberMapping member)
        {
            string typeName = member.GenerateTypeName(options.CodeProvider);
            // If it is an array type, get the array element type name instead
            string comparableTypeName = typeName.Replace("[]", null);

            if (codeNamespace != null && !string.IsNullOrEmpty(codeNamespace.Name))
            {
                foreach (CodeTypeDeclaration typeDecl in codeNamespace.Types)
                {
                    if (typeDecl.Name == comparableTypeName)
                    {
                        typeName = codeNamespace.Name + "." + typeName;
                    }
                }
            }
            return(typeName);
        }
 internal static string FullTypeName(XmlMemberMapping mapping, CodeDomProvider codeProvider)
 {
     return(mapping.GenerateTypeName(codeProvider));
 }