ReadElementContentAsString() 공개 메소드

Reads the current element's content as a string and consumes the element.
public ReadElementContentAsString ( ) : string
리턴 string
예제 #1
0
        private void ReadItem(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            context.Items = context.Items ?? new List <string>();
            context.Items.Add(reader.ReadElementContentAsString());
        }
예제 #2
0
        private static void ReadResolution(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            context.RefineResolution(
                name: reader.ReadAttributeString(SchemaStrings.AttributeName),
                formatString: reader.ReadElementContentAsString());
        }
예제 #3
0
        private static void ReadExceptionType(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            if (context.Exception)
            {
                context.RefineExceptionType(reader.ReadElementContentAsString());
            }
        }
예제 #4
0
        private void ReadIssue(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            string name      = 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 = reader.ReadElementContentAsString();

            context.RefineIssue(message, name, certainty, level, path, file, line);

            if (IssueRead != null)
            {
                IssueRead(context);
            }

            context.ClearIssue();
        }
예제 #5
0
        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();
        }
예제 #6
0
        private static void ReadInnerStackTrace(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            context.RefineInnerStackTrace(reader.ReadElementContentAsString());
        }
예제 #7
0
        private static void ReadInnerExceptionMessage(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            context.RefineInnerExceptionMessage(reader.ReadElementContentAsString());
        }
예제 #8
0
        private void ReadIssue(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            string name = 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 = reader.ReadElementContentAsString();

            context.RefineIssue(message, name, certainty, level, path, file, line);

            if (ResultRead != null)
            {
                ResultRead(context);
            }

            context.ClearIssue();
        }
예제 #9
0
        private void ReadInnerExceptionType(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            context.RefineInnerExceptionType(reader.ReadElementContentAsString());
        }
예제 #10
0
        private static void ReadStackTrace(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            context.RefineStackTrace(reader.ReadElementContentAsString());
        }
예제 #11
0
        private static void ReadExceptionType(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            if (context.Exception)
            {
                context.RefineExceptionType(reader.ReadElementContentAsString());
            }
        }
예제 #12
0
        private static void ReadExceptionMessage(SparseReader reader, object parent)
        {
            Context context = (Context)parent;

            context.RefineExceptionMessage(reader.ReadElementContentAsString());
        }