public ReadChildren ( string tagName, object parent ) : void | ||
tagName | string | Name of the tag. |
parent | object | The parent. |
리턴 | void |
private static void ReadFxCopReport(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineReport(reader.ReadAttributeString(SchemaStrings.AttributeVersion)); reader.ReadChildren(SchemaStrings.ElementFxCopReport, parent); context.ClearReport(); }
private static void ReadMember(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineMember(reader.ReadAttributeString(SchemaStrings.AttributeName)); reader.ReadChildren(SchemaStrings.ElementMember, parent); context.ClearMember(); }
private void ReadNamespace(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineNamespace(reader.ReadAttributeString(SchemaStrings.AttributeName)); reader.ReadChildren(SchemaStrings.ElementNamespace, parent); context.ClearNamespace(); }
private static void ReadTarget(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineTarget(reader.ReadAttributeString(SchemaStrings.AttributeName)); reader.ReadChildren(SchemaStrings.ElementTarget, parent); context.ClearTarget(); }
private static void ReadResource(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineResource(reader.ReadAttributeString(SchemaStrings.AttributeName)); reader.ReadChildren(SchemaStrings.ElementResource, parent); context.ClearResource(); }
private static void ReadMessage(SparseReader reader, object parent) { Context context = (Context)parent; string messageId = reader.ReadAttributeString(SchemaStrings.AttributeId); string typename = reader.ReadAttributeString(SchemaStrings.AttributeTypeName); string category = reader.ReadAttributeString(SchemaStrings.AttributeCategory); string checkId = reader.ReadAttributeString(SchemaStrings.AttributeCheckId); string fixCategory = reader.ReadAttributeString(SchemaStrings.AttributeFixCategory); context.RefineMessage(checkId, typename, messageId, category, fixCategory); reader.ReadChildren(SchemaStrings.ElementMessage, parent); context.ClearMessage(); }
private static void ReadType(SparseReader reader, object parent) { Context context = (Context)parent; if (context.Exception) { ReadExceptionType(reader, parent); } else { context.RefineType(reader.ReadAttributeString(SchemaStrings.AttributeName)); reader.ReadChildren(SchemaStrings.ElementType, parent); context.ClearType(); } }
private void ReadRule(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineRule( typeName: reader.ReadAttributeString(SchemaStrings.AttributeTypeName), category: reader.ReadAttributeString(SchemaStrings.AttributeCategory), checkId: reader.ReadAttributeString(SchemaStrings.AttributeCheckId)); reader.ReadChildren(SchemaStrings.ElementRule, parent); if (RuleRead != null) { RuleRead(context); } context.ClearRule(); }
private void ReadException(SparseReader reader, object parent) { Context context = (Context)parent; string ruleId = reader.ReadAttributeString(SchemaStrings.AttributeKeyword); string kind = reader.ReadAttributeString(SchemaStrings.AttributeKind); string checkId = reader.ReadAttributeString(SchemaStrings.AttributeCheckId); string target = reader.ReadAttributeString(SchemaStrings.AttributeTarget); context.RefineException(true, ruleId, target); reader.ReadChildren(SchemaStrings.ElementException, parent); string exception = MakeExceptionMessage(kind, checkId, context.ExceptionType, context.ExceptionMessage, context.StackTrace, context.InnerExceptionType, context.InnerExceptionMessage, context.InnerStackTrace); context.RefineIssue(exception, null, null, null, null, null, null); if (ResultRead != null) { ResultRead(context); } context.ClearIssue(); context.ClearException(); }
private void ReadIssue(SparseReader reader, object parent) { Context context = (Context)parent; string resolutionName = reader.ReadAttributeString(SchemaStrings.AttributeName); string certainty = reader.ReadAttributeString(SchemaStrings.AttributeCertainty); string level = reader.ReadAttributeString(SchemaStrings.AttributeLevel); string path = reader.ReadAttributeString(SchemaStrings.AttributePath); string file = reader.ReadAttributeString(SchemaStrings.AttributeFile); int? line = reader.ReadAttributeInt(SchemaStrings.AttributeLine); string message = null; if (_readingProjectFile) { // FxCop does not emit a resolution name attribute in cases where it is "Default" resolutionName = resolutionName ?? "Default"; reader.ReadChildren(SchemaStrings.ElementIssue, parent, out message); context.RefineIssue(message, message == null ? resolutionName : null, certainty, level, path, file, line); } else { // An FxCop project file Issue has a fully-formed output // message as its element content. message = reader.ReadElementContentAsString(); context.RefineIssue(message, resolutionName, certainty, level, path, file, line); } if (ResultRead != null) { ResultRead(context); } context.ClearIssue(); }
private static void ReadTypes(SparseReader reader, object parent) { reader.ReadChildren(SchemaStrings.ElementTypes, parent); }
private static void ReadExceptions(SparseReader reader, object parent) { reader.ReadChildren(SchemaStrings.ElementExceptions, parent); }
private static void ReadExceptions(SparseReader reader, object parent) { reader.ReadChildren(SchemaStrings.ElementExceptions, parent); }
private static void ReadFxCopReport(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineReport(reader.ReadAttributeString(SchemaStrings.AttributeVersion)); reader.ReadChildren(SchemaStrings.ElementFxCopReport, parent); context.ClearReport(); }
private void ReadNamespace(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineNamespace(reader.ReadAttributeString(SchemaStrings.AttributeName)); reader.ReadChildren(SchemaStrings.ElementNamespace, parent); context.ClearNamespace(); }
private static void ReadTargets(SparseReader reader, object parent) { Context context = (Context)parent; reader.ReadChildren(SchemaStrings.ElementTargets, parent); }
private void ReadMessage(SparseReader reader, object parent) { Context context = (Context)parent; string messageId = reader.ReadAttributeString(SchemaStrings.AttributeId); string typename = reader.ReadAttributeString(SchemaStrings.AttributeTypeName); string category = reader.ReadAttributeString(SchemaStrings.AttributeCategory); string checkId = reader.ReadAttributeString(SchemaStrings.AttributeCheckId); string fixCategory = reader.ReadAttributeString(SchemaStrings.AttributeFixCategory); string status = reader.ReadAttributeString(SchemaStrings.AttributeStatus); context.RefineMessage(checkId, typename, messageId, category, fixCategory, status); if ("Excluded".Equals(status) || "ExcludedInSource".Equals(status)) { // FxCop doesn't actually emit message details for most excluded items // and so we must fire here for these items, as the scan for child // <Issue> elements may not produce anything. FxCop seems to emit // issues for excluded items which are at the namespace level only. if (ResultRead != null) { ResultRead(context); } } reader.ReadChildren(SchemaStrings.ElementMessage, parent); context.ClearMessage(); }
private void ReadModules(SparseReader reader, object parent) { reader.ReadChildren(SchemaStrings.ElementModules, parent); }
private static void ReadMember(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineMember(reader.ReadAttributeString(SchemaStrings.AttributeName)); reader.ReadChildren(SchemaStrings.ElementMember, parent); context.ClearMember(); }
private void ReadModules(SparseReader reader, object parent) { reader.ReadChildren(SchemaStrings.ElementModules, parent); }
private static void ReadType(SparseReader reader, object parent) { Context context = (Context)parent; if (context.Exception) { ReadExceptionType(reader, parent); } else { context.RefineType(reader.ReadAttributeString(SchemaStrings.AttributeName)); reader.ReadChildren(SchemaStrings.ElementType, parent); context.ClearType(); } }
private static void ReadTarget(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineTarget(reader.ReadAttributeString(SchemaStrings.AttributeName)); reader.ReadChildren(SchemaStrings.ElementTarget, parent); context.ClearTarget(); }
private static void ReadResource(SparseReader reader, object parent) { Context context = (Context)parent; context.RefineResource(reader.ReadAttributeString(SchemaStrings.AttributeName)); reader.ReadChildren(SchemaStrings.ElementResource, parent); context.ClearResource(); }
private static void ReadTypes(SparseReader reader, object parent) { reader.ReadChildren(SchemaStrings.ElementTypes, parent); }
private void ReadException(SparseReader reader, object parent) { Context context = (Context)parent; string ruleId = reader.ReadAttributeString(SchemaStrings.AttributeKeyword); string kind = reader.ReadAttributeString(SchemaStrings.AttributeKind); string checkId = reader.ReadAttributeString(SchemaStrings.AttributeCheckId); string target = reader.ReadAttributeString(SchemaStrings.AttributeTarget); context.RefineException(true, ruleId, target); reader.ReadChildren(SchemaStrings.ElementException, parent); string exception = MakeExceptionMessage(kind, checkId, context.ExceptionType, context.ExceptionMessage, context.StackTrace, context.InnerExceptionType, context.InnerExceptionMessage, context.InnerStackTrace); context.RefineIssue(exception, null, null, null, null, null, null); if (ResultRead != null) { ResultRead(context); } context.ClearIssue(); context.ClearException(); }