private static void AnalyzeEnumExtValuesID(SyntaxNodeAnalysisContext context) { EnumExtensionTypeSyntax enumExtensionTypeSyntax = context.Node as EnumExtensionTypeSyntax; string appAllowedRanges = GetAppObjectRange(context); AnalyzeEnumExtValuesIDs(context, enumExtensionTypeSyntax, appAllowedRanges); }
protected void ProcessEnumExtensionTypeNode(ALSymbolInformation symbol, EnumExtensionTypeSyntax syntax) { if (syntax.BaseObject != null) { symbol.extends = ALSyntaxHelper.DecodeName(syntax.BaseObject.ToString()); } }
public static void AnalyzeEnumExtValuesIDs(SyntaxNodeAnalysisContext context, EnumExtensionTypeSyntax enumExtensionTypeSyntax, string appAllowedRanges) { if (appAllowedRanges == null || enumExtensionTypeSyntax == null) { return; } if (enumExtensionTypeSyntax.Values != null) { SyntaxList <EnumValueSyntax> values = enumExtensionTypeSyntax.Values; foreach (EnumValueSyntax enumValueSyntax in values) { SyntaxToken fieldNo = enumValueSyntax.Id; if (!CheckNoInAllowedRange(int.Parse(fieldNo.Value.ToString()), appAllowedRanges)) { ReportEnumValuesInAllowedRange(context, fieldNo.GetLocation(), enumValueSyntax.Name.Identifier.Value.ToString(), enumValueSyntax.Name); } } } }