Matches() 공개 정적인 메소드

public static Matches ( CSharpBlock block ) : bool
block CSharpBlock
리턴 bool
예제 #1
0
        public IEnumerable <IUmlObject> Parse(IEnumerable <string> lines)
        {
            char[] chars = StripComments(lines).Where(FilterEmptyLines).ToCharacters().ToArray();

            int i = 0;

            CSharpBlock[] blocks = Parse(chars, ref i);
            foreach (CSharpBlock np in blocks)
            {
                if (np.Name.Contains("namespace"))
                {
                    foreach (CSharpBlock block in np.Content)
                    {
                        if (UmlClass.Matches(block))
                        {
                            yield return(new UmlClass(block));
                        }
                        else if (UmlEnum.Matches(block))
                        {
                            yield return(new UmlEnum(block));
                        }
                    }
                }
            }
        }
예제 #2
0
        public IEnumerable <IUmlObject> Parse(IEnumerable <string> lines)
        {
            if (lines.Count() > 0)
            {
                int        i      = 0;
                UmlBlock[] blocks = ParseBlocks(lines.Where(FilterIgnoreLines).ToArray(), ref i, -1);

                foreach (UmlBlock block in blocks)
                {
                    if (UmlClass.Matches(block))
                    {
                        yield return(new UmlClass(block));
                    }
                    else if (UmlEnum.Matches(block))
                    {
                        yield return(new UmlEnum(block));
                    }
                }
            }
        }
예제 #3
0
 public IEnumerable <IUmlObject> ParseContent(IEnumerable <UmlBlock> blocks)
 {
     foreach (UmlBlock subblock in blocks)
     {
         if (UmlClass.Matches(subblock))
         {
             yield return(new UmlClass(subblock));
         }
         else if (UmlEnum.Matches(subblock))
         {
             yield return(new UmlEnum(subblock));
         }
         else if (UmlMethod.Matches(subblock))
         {
             yield return(new UmlMethod(subblock, this));
         }
         else if (UmlAttribute.Matches(subblock))
         {
             yield return(new UmlAttribute(subblock, this));
         }
     }
 }