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; }
CodeParameterDeclarationExpression GenerateParameter (XmlMemberMapping member, FieldDirection dir) { string type = member.GenerateTypeName (CodeGenerator); CodeParameterDeclarationExpression par = new CodeParameterDeclarationExpression (type, member.MemberName); par.Direction = dir; return par; }
internal static string FullTypeName(XmlMemberMapping mapping, CodeDomProvider codeProvider) { return mapping.GenerateTypeName(codeProvider); }
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; }