Exemple #1
0
        internal override void SetHeader(string strHeader)
        {
            this.Header = strHeader;
            var items = DCILDocument.SplitByWhitespace(strHeader);

            for (int itemCount = 0; itemCount < items.Count; itemCount++)
            {
                if (items[itemCount] == "extends" && itemCount > 0)
                {
                    this.Name         = items[itemCount - 1];
                    this.BaseTypeName = items[itemCount + 1];
                    return;
                }
            }
            this.Name = items[items.Count - 1];

            this.IsInterface = items.Contains("interface");
            this.IsPublic    = items.Contains("public");
            int index2 = items.IndexOf("implements");

            if (index2 > 0)
            {
                this.ImplementsInterfaces = new List <string>();
                for (int iCount = index2; iCount < items.Count; iCount++)
                {
                    this.ImplementsInterfaces.Add(items[iCount]);
                }
            }
            //if (strHeader.Contains("WriterControl") && this.IsPublic == false )
            //{

            //}
        }
Exemple #2
0
        internal override void SetHeader(string strHeader)
        {
            this.Header = strHeader;

            var words = DCILDocument.SplitByWhitespace(DCILDocument.RemoveChars(strHeader, "()"));

            this.Name          = words[words.Count - 1];
            this.ValueTypeName = words[words.Count - 2];
        }
Exemple #3
0
        internal override void SetHeader(string strHeader)
        {
            this.Header = strHeader;
            var items = DCILDocument.SplitByWhitespace(strHeader);

            for (int itemCount = 0; itemCount < items.Count; itemCount++)
            {
                var item    = items[itemCount];
                int index10 = item.IndexOf('(');
                if (index10 > 0)
                {
                    this.Name       = item.Substring(0, index10);
                    this.ReturnType = items[itemCount - 1];
                    //currentMethodName = group.Name;
                    break;
                }
            }
        }
Exemple #4
0
        internal override void SetHeader(string text)
        {
            this.Header = text;
            int indexEqual = text.IndexOf('=');

            if (indexEqual > 0)
            {
                this.HexValue = DCILDocument.GetHexString(text.Substring(indexEqual + 1));
            }
            var index = text.IndexOf("::.ctor", StringComparison.Ordinal);

            for (int iCount = index; iCount >= 0; iCount--)
            {
                if (DCILDocument.IsWhitespace(text[iCount]))// char.IsWhiteSpace( text[iCount]))
                {
                    this.Name = text.Substring(iCount, index - iCount);
                    break;
                }
            }
        }
Exemple #5
0
 public static void Test()
 {
     var doc = new DCILDocument(@"D:\temp2\ilcompress\DCILTemp\DCSoft.Writer.ForWinForm.dll.il", Encoding.UTF8);
 }