CanCastToXmlType() 개인적인 메소드

private CanCastToXmlType ( String xmlTypeName, String xmlTypeNamespace ) : bool
xmlTypeName String
xmlTypeNamespace String
리턴 bool
        [System.Security.SecuritySafeCritical]  // auto-generated
        internal static bool CanCastToXmlTypeHelper(RuntimeType castType, MarshalByRefObject o)
        {
            if (castType == null)
            {
                throw new ArgumentNullException("castType");
            }

            Contract.EndContractBlock();
            // MarshalByRefObject's can only be casted to MarshalByRefObject's or interfaces.
            if (!castType.IsInterface && !castType.IsMarshalByRef)
            {
                return(false);
            }

            // figure out xml type name
            String xmlTypeName      = null;
            String xmlTypeNamespace = null;

            if (!SoapServices.GetXmlTypeForInteropType(castType, out xmlTypeName, out xmlTypeNamespace))
            {
                // There's no registered interop type name, so just use the default.
                xmlTypeName      = castType.Name;
                xmlTypeNamespace =
                    SoapServices.CodeXmlNamespaceForClrTypeNamespace(
                        castType.Namespace, castType.GetRuntimeAssembly().GetSimpleName());
            }

            return(o.CanCastToXmlType(xmlTypeName, xmlTypeNamespace));
        } // CanCastToXmlType
예제 #2
0
        internal static bool CanCastToXmlTypeHelper(RuntimeType castType, MarshalByRefObject o)
        {
            if (castType == null)
            {
                throw new ArgumentNullException("castType");
            }
            if (!castType.IsInterface && !castType.IsMarshalByRef)
            {
                return(false);
            }
            string xmlType          = null;
            string xmlTypeNamespace = null;

            if (!SoapServices.GetXmlTypeForInteropType(castType, out xmlType, out xmlTypeNamespace))
            {
                xmlType          = castType.Name;
                xmlTypeNamespace = SoapServices.CodeXmlNamespaceForClrTypeNamespace(castType.Namespace, castType.GetRuntimeAssembly().GetSimpleName());
            }
            return(o.CanCastToXmlType(xmlType, xmlTypeNamespace));
        }
예제 #3
0
        [System.Security.SecuritySafeCritical]  // auto-generated
        internal static bool CanCastToXmlTypeHelper(RuntimeType castType, MarshalByRefObject o)
        {
            if (castType == null)
                throw new ArgumentNullException("castType");
        
            Contract.EndContractBlock();
            // MarshalByRefObject's can only be casted to MarshalByRefObject's or interfaces.
            if (!castType.IsInterface && !castType.IsMarshalByRef)
                return false;

            // figure out xml type name
            String xmlTypeName = null;
            String xmlTypeNamespace = null;
            if (!SoapServices.GetXmlTypeForInteropType(castType, out xmlTypeName, out xmlTypeNamespace))
            {
                // There's no registered interop type name, so just use the default.
                xmlTypeName = castType.Name;
                xmlTypeNamespace =
                    SoapServices.CodeXmlNamespaceForClrTypeNamespace(
                        castType.Namespace, castType.GetRuntimeAssembly().GetSimpleName());
            }

            return o.CanCastToXmlType(xmlTypeName, xmlTypeNamespace);
        } // CanCastToXmlType
 internal static bool CanCastToXmlTypeHelper(RuntimeType castType, MarshalByRefObject o)
 {
     if (castType == null)
     {
         throw new ArgumentNullException("castType");
     }
     if (!castType.IsInterface && !castType.IsMarshalByRef)
     {
         return false;
     }
     string xmlType = null;
     string xmlTypeNamespace = null;
     if (!SoapServices.GetXmlTypeForInteropType(castType, out xmlType, out xmlTypeNamespace))
     {
         xmlType = castType.Name;
         xmlTypeNamespace = SoapServices.CodeXmlNamespaceForClrTypeNamespace(castType.Namespace, castType.GetRuntimeAssembly().GetSimpleName());
     }
     return o.CanCastToXmlType(xmlType, xmlTypeNamespace);
 }