IsCustomXmlElement() private method

private IsCustomXmlElement ( ) : bool
return bool
Ejemplo n.º 1
0
        internal bool IsCustomXmlElement()
        {
            if (arrayElemObjectInfo != null)
            {
                return(arrayElemObjectInfo.IsCustomXmlElement());
            }

            if ((typeAttributeInfo != null) &&
                ((typeAttributeInfo.m_attributeType & SoapAttributeType.XmlElement) != 0))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
 internal static InternalNameSpaceE GetNameSpaceEnum(InternalPrimitiveTypeE code, Type type, WriteObjectInfo objectInfo, out string typeName)
 {
     InternalNameSpaceE none = InternalNameSpaceE.None;
     typeName = null;
     if (code != InternalPrimitiveTypeE.Invalid)
     {
         if (code == InternalPrimitiveTypeE.Char)
         {
             none = InternalNameSpaceE.UrtSystem;
             typeName = "System.Char";
         }
         else
         {
             none = InternalNameSpaceE.XdrPrimitive;
             typeName = ToXmlDataType(code);
         }
     }
     if ((none == InternalNameSpaceE.None) && (type != null))
     {
         if (type == typeofString)
         {
             none = InternalNameSpaceE.XdrString;
         }
         else if (objectInfo == null)
         {
             typeName = type.FullName;
             if (type.Module.Assembly == urtAssembly)
             {
                 none = InternalNameSpaceE.UrtSystem;
             }
             else
             {
                 none = InternalNameSpaceE.UrtUser;
             }
         }
         else
         {
             typeName = objectInfo.GetTypeFullName();
             if (objectInfo.GetAssemblyString().Equals(urtAssemblyString))
             {
                 none = InternalNameSpaceE.UrtSystem;
             }
             else
             {
                 none = InternalNameSpaceE.UrtUser;
             }
         }
     }
     if (objectInfo != null)
     {
         if (!objectInfo.isSi && ((objectInfo.IsAttributeNameSpace() || objectInfo.IsCustomXmlAttribute()) || objectInfo.IsCustomXmlElement()))
         {
             return InternalNameSpaceE.Interop;
         }
         if (objectInfo.IsCallElement())
         {
             none = InternalNameSpaceE.CallElement;
         }
     }
     return none;
 }
        internal static InternalNameSpaceE GetNameSpaceEnum(InternalPrimitiveTypeE code, Type type, WriteObjectInfo objectInfo, out String typeName)
        {
            InternalST.Soap("Converter", "GetNameSpaceEnum Entry ",((Enum)code).ToString()," type ",type);                  
            InternalNameSpaceE nameSpaceEnum = InternalNameSpaceE.None;
            typeName = null;

            if (code != InternalPrimitiveTypeE.Invalid)
            {

                if (code == InternalPrimitiveTypeE.Char)
                {
                    nameSpaceEnum = InternalNameSpaceE.UrtSystem;
                    typeName = "System.Char";
                }
                else
                {
                    nameSpaceEnum = InternalNameSpaceE.XdrPrimitive;
                    typeName = ToXmlDataType(code);
                }
            }

            if ((nameSpaceEnum == InternalNameSpaceE.None) && (type != null))
            {
                if (type == typeofString)
                    nameSpaceEnum = InternalNameSpaceE.XdrString;
                else
                {
                    if (objectInfo == null)
                    {
                        typeName = type.FullName;
                        if (type.Module.Assembly == urtAssembly)
                            nameSpaceEnum = InternalNameSpaceE.UrtSystem;
                        else
                            nameSpaceEnum = InternalNameSpaceE.UrtUser;                     
                    }
                    else
                    {
                        typeName = objectInfo.GetTypeFullName();
                        // If objref is created from a proxy, it will have the proxy namespace
                        // Need to force ObjRef to have system namespace
                        if (objectInfo.GetAssemblyString().Equals(urtAssemblyString))
                            nameSpaceEnum = InternalNameSpaceE.UrtSystem;
                        else
                            nameSpaceEnum = InternalNameSpaceE.UrtUser;
                    }
                }
            }

            // If there is an explicitly specified namespace, then it is used
            if (objectInfo != null)
            {
                if (!objectInfo.isSi &&
                    (objectInfo.IsAttributeNameSpace() ||
                    objectInfo.IsCustomXmlAttribute() ||
                    objectInfo.IsCustomXmlElement()))
                {
                    nameSpaceEnum = InternalNameSpaceE.Interop;
                }
                else if (objectInfo.IsCallElement())
                {
                    nameSpaceEnum = InternalNameSpaceE.CallElement;
                }
            }

            InternalST.Soap("Converter", "GetNameSpaceEnum Exit ", ((Enum)nameSpaceEnum).ToString()," typeName ",typeName);                             
            return nameSpaceEnum;
        }
        internal static InternalNameSpaceE GetNameSpaceEnum(InternalPrimitiveTypeE code, Type type, WriteObjectInfo objectInfo, out string typeName)
        {
            InternalNameSpaceE none = InternalNameSpaceE.None;

            typeName = null;
            if (code != InternalPrimitiveTypeE.Invalid)
            {
                if (code == InternalPrimitiveTypeE.Char)
                {
                    none     = InternalNameSpaceE.UrtSystem;
                    typeName = "System.Char";
                }
                else
                {
                    none     = InternalNameSpaceE.XdrPrimitive;
                    typeName = ToXmlDataType(code);
                }
            }
            if ((none == InternalNameSpaceE.None) && (type != null))
            {
                if (type == typeofString)
                {
                    none = InternalNameSpaceE.XdrString;
                }
                else if (objectInfo == null)
                {
                    typeName = type.FullName;
                    if (type.Module.Assembly == urtAssembly)
                    {
                        none = InternalNameSpaceE.UrtSystem;
                    }
                    else
                    {
                        none = InternalNameSpaceE.UrtUser;
                    }
                }
                else
                {
                    typeName = objectInfo.GetTypeFullName();
                    if (objectInfo.GetAssemblyString().Equals(urtAssemblyString))
                    {
                        none = InternalNameSpaceE.UrtSystem;
                    }
                    else
                    {
                        none = InternalNameSpaceE.UrtUser;
                    }
                }
            }
            if (objectInfo != null)
            {
                if (!objectInfo.isSi && ((objectInfo.IsAttributeNameSpace() || objectInfo.IsCustomXmlAttribute()) || objectInfo.IsCustomXmlElement()))
                {
                    return(InternalNameSpaceE.Interop);
                }
                if (objectInfo.IsCallElement())
                {
                    none = InternalNameSpaceE.CallElement;
                }
            }
            return(none);
        }