private CanCastToXmlType ( String xmlTypeName, String xmlTypeNamespace ) : bool | ||
xmlTypeName | String | |
xmlTypeNamespace | String | |
return | 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
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)); }
[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); }