Ejemplo n.º 1
0
        private static bool ReturnTypesMatch(string csTypeFullName, string xmlTypeFullName, MyClassInfo memberDeclaringType, List <MyGenericParameterInfo> memberGenericParameters)
        {
            string almostXmlRepresentation = MyParameterInfo.GetXMLCompatibleRepresentation(csTypeFullName, false, false);
            string almostCSRepresentation  = GetAlmostCSRepresentation(xmlTypeFullName, memberDeclaringType, memberGenericParameters);

            return(almostXmlRepresentation == almostCSRepresentation);
        }
Ejemplo n.º 2
0
        private static bool SignaturesMatch(List <String> memberParametersNames, Dictionary <string, MyParameterInfo> memberParameters, List <string> xmlParamsTypes, MyClassInfo memberDeclaringType, List <MyGenericParameterInfo> memberGenericParameters)
        {
            if (memberParametersNames.Count != xmlParamsTypes.Count)
            {
                return(false);
            }

            bool signaturesMatch = true;
            int  i = 0;

            foreach (string paramName in memberParametersNames)
            {
                MyParameterInfo myParameterInfo = memberParameters[paramName];

                string almostXmlRepresentation = myParameterInfo.GetXMLCompatibleRepresentation();
                string almostCSRepresentation  = GetAlmostCSRepresentation(xmlParamsTypes[i], memberDeclaringType, memberGenericParameters);

                if (almostXmlRepresentation != almostCSRepresentation)
                {
                    signaturesMatch = false;
                    break;
                }

                i++;
            }

            return(signaturesMatch);
        }