public static bool IsXmlReaderSettingsType(ITypeSymbol symbol, CompilationSecurityTypes xmlTypes) { return symbol == xmlTypes.XmlReaderSettings; }
public static int GetXsltSettingsParameterIndex(IMethodSymbol method, CompilationSecurityTypes xmlTypes) { return GetSpecifiedParameterIndex(method, xmlTypes, IsXsltSettingsType); }
public static bool IsXsltSettingsCtor(IMethodSymbol method, CompilationSecurityTypes xmlTypes) { return method != null && method.MatchMethodByName(xmlTypes.XsltSettings, WellKnownMemberNames.InstanceConstructorName); }
public static bool IsXmlReaderSettingsType(ITypeSymbol symbol, CompilationSecurityTypes xmlTypes) { return(symbol == xmlTypes.XmlReaderSettings); }
public static bool IsXmlTextReaderDtdProcessingPropertyDerived(IPropertySymbol symbol, CompilationSecurityTypes xmlTypes) { return IsSpecifiedPropertyDerived(symbol, xmlTypes.XmlTextReader, SecurityMemberNames.DtdProcessing); }
public static bool IsXmlReaderSettingsDtdProcessingProperty(IPropertySymbol symbol, CompilationSecurityTypes xmlTypes) { return IsSpecifiedProperty(symbol, xmlTypes.XmlReaderSettings, SecurityMemberNames.DtdProcessing); }
public static bool IsXmlTextReaderXmlResolverProperty(IPropertySymbol symbol, CompilationSecurityTypes xmlTypes) { return(IsSpecifiedProperty(symbol, xmlTypes.XmlTextReader, SecurityMemberNames.XmlResolver)); }
private static int GetSpecifiedParameterIndex(IMethodSymbol method, CompilationSecurityTypes xmlTypes, Func<ITypeSymbol, CompilationSecurityTypes, bool> func) { int index = -1; if (method == null) { return index; } for (int i = 0; i < method.Parameters.Length; i++) { ITypeSymbol parameter = method.Parameters[i].Type; if (func(parameter, xmlTypes)) { index = i; break; } } return index; }
public static bool IsXmlTextReaderCtorDerived(IMethodSymbol method, CompilationSecurityTypes xmlTypes) { return(method != null && method.MatchMethodDerivedByName(xmlTypes.XmlTextReader, WellKnownMemberNames.InstanceConstructorName)); }
public static bool IsXmlTextReaderDtdProcessingPropertyDerived(IPropertySymbol symbol, CompilationSecurityTypes xmlTypes) { return(IsSpecifiedPropertyDerived(symbol, xmlTypes.XmlTextReader, SecurityMemberNames.DtdProcessing)); }
public static int HasXmlReaderParameter(IMethodSymbol method, CompilationSecurityTypes xmlTypes) { return(GetSpecifiedParameterIndex(method, xmlTypes, IsXmlReaderType)); }
public static bool IsXmlReaderType(ITypeSymbol symbol, CompilationSecurityTypes xmlTypes) { return(symbol != null && symbol.DerivesFrom(xmlTypes.XmlReader, baseTypesOnly: true)); }
public static int GetXsltSettingsParameterIndex(IMethodSymbol method, CompilationSecurityTypes xmlTypes) { return(GetSpecifiedParameterIndex(method, xmlTypes, IsXsltSettingsType)); }
public static bool IsXmlReaderType(ITypeSymbol symbol, CompilationSecurityTypes xmlTypes) { return symbol != null && symbol.DerivesFrom(xmlTypes.XmlReader, baseTypesOnly: true); }
public static bool IsXmlReaderSettingsDtdProcessingProperty(IPropertySymbol symbol, CompilationSecurityTypes xmlTypes) { return(IsSpecifiedProperty(symbol, xmlTypes.XmlReaderSettings, SecurityMemberNames.DtdProcessing)); }
public static int HasXmlReaderParameter(IMethodSymbol method, CompilationSecurityTypes xmlTypes) { return GetSpecifiedParameterIndex(method, xmlTypes, IsXmlReaderType); }
public static bool IsXmlReaderSettingsMaxCharactersFromEntitiesProperty(IPropertySymbol symbol, CompilationSecurityTypes xmlTypes) { return(IsSpecifiedProperty(symbol, xmlTypes.XmlReaderSettings, SecurityMemberNames.MaxCharactersFromEntities)); }
public static bool IsXmlTextReaderCtorDerived(IMethodSymbol method, CompilationSecurityTypes xmlTypes) { return method != null && method.MatchMethodDerivedByName(xmlTypes.XmlTextReader, WellKnownMemberNames.InstanceConstructorName); }
public static bool IsXsltSettingsCtor(IMethodSymbol method, CompilationSecurityTypes xmlTypes) { return(method != null && method.MatchMethodByName(xmlTypes.XsltSettings, WellKnownMemberNames.InstanceConstructorName)); }
public static bool IsXmlTextReaderXmlResolverProperty(IPropertySymbol symbol, CompilationSecurityTypes xmlTypes) { return IsSpecifiedProperty(symbol, xmlTypes.XmlTextReader, SecurityMemberNames.XmlResolver); }
public static bool IsXsltSettingsEnableScriptProperty(IPropertySymbol symbol, CompilationSecurityTypes xmlTypes) { return(IsSpecifiedProperty(symbol, xmlTypes.XsltSettings, SecurityMemberNames.EnableScript)); }
public static bool IsXmlReaderSettingsMaxCharactersFromEntitiesProperty(IPropertySymbol symbol, CompilationSecurityTypes xmlTypes) { return IsSpecifiedProperty(symbol, xmlTypes.XmlReaderSettings, SecurityMemberNames.MaxCharactersFromEntities); }
public static bool IsXslCompiledTransformLoad(IMethodSymbol method, CompilationSecurityTypes xmlTypes) { return method != null && method.MatchMethodByName(xmlTypes.XslCompiledTransform, SecurityMemberNames.Load); }
public static bool IsXsltSettingsEnableScriptProperty(IPropertySymbol symbol, CompilationSecurityTypes xmlTypes) { return IsSpecifiedProperty(symbol, xmlTypes.XsltSettings, SecurityMemberNames.EnableScript); }
public static bool IsXslCompiledTransformLoad(IMethodSymbol method, CompilationSecurityTypes xmlTypes) { return(method != null && method.MatchMethodByName(xmlTypes.XslCompiledTransform, SecurityMemberNames.Load)); }