Esempio n. 1
0
 protected virtual void ProcessSection(ISyntaxInfo Info)
 {
     if (Info is IRangeInfo)
     {
         IRangeInfo info1 = (IRangeInfo)Info;
         if (info1.StartPoint.Y >= 0)
         {
             this.sections.Add(info1);
         }
         this.ProcessSections(info1.Regions);
         this.ProcessSections(info1.Comments);
     }
     if (Info is IInterfaceInfo)
     {
         IInterfaceInfo info2 = (InterfaceInfo)Info;
         this.ProcessSections(info2.Methods);
         this.ProcessSections(info2.Properties);
         this.ProcessSections(info2.Events);
     }
     if (Info is IClassInfo)
     {
         IClassInfo info3 = (IClassInfo)Info;
         this.ProcessSections(info3.Classes);
         this.ProcessSections(info3.Interfaces);
         this.ProcessSections(info3.Structures);
         this.ProcessSections(info3.Enums);
     }
     if (Info is IMethodInfo)
     {
         this.ProcessSections(((IMethodInfo)Info).Statements);
     }
     else if (Info is IPropInfo)
     {
         IPropInfo info4 = (ICsPropInfo)Info;
         if (info4.PropertyGet != null)
         {
             this.ProcessSection(info4.PropertyGet);
         }
         if (info4.PropertySet != null)
         {
             this.ProcessSection(info4.PropertySet);
         }
     }
     else if (Info is IEventInfo)
     {
         IEventInfo info5 = (ICsEventInfo)Info;
         if (info5.EventAdd != null)
         {
             this.ProcessSection(info5.EventAdd);
         }
         if (info5.EventRemove != null)
         {
             this.ProcessSection(info5.EventRemove);
         }
     }
     else if (Info is IAccessorInfo)
     {
         this.ProcessSections(((IAccessorInfo)Info).Statements);
     }
 }
Esempio n. 2
0
        public FixPropValue(PropertyTag propertyTag)
            : base()
        {
            _fixedPropType = FTFactory.Instance.CreateFixedPropType();
            _propInfo = FTFactory.Instance.CreatePropInfo(propertyTag);
            _fixedSizeValue = FTFactory.Instance.CreateFixedSizeValue(_fixedPropType, propertyTag.PropType);

            Children.Add(_fixedPropType);
            Children.Add(_propInfo);
            Children.Add(_fixedSizeValue);
        }
Esempio n. 3
0
        public VarPropValue(PropertyTag propertyTag)
            : base()
        {
            PropTag = propertyTag;
            _varPropType = FTFactory.Instance.CreateVarPropType();
            _propInfo = FTFactory.Instance.CreatePropInfo(propertyTag);
            _length = FTFactory.Instance.CreatePropValueLength();
            _varSizeValue = FTFactory.Instance.CreateVarSizeValue(_varPropType, _length, propertyTag.PropType);

            Children.Add(_varPropType);
            Children.Add(_propInfo);
            Children.Add(_length);
            Children.Add(_varSizeValue);
        }
Esempio n. 4
0
        public MvPropValue(PropertyTag propertyTag)
            : base()
        {
            PropTag = propertyTag;
            _mvPropType = FTFactory.Instance.CreateMvPropType();
            _propInfo = FTFactory.Instance.CreatePropInfo(propertyTag);
            _length = FTFactory.Instance.CreatePropValueLength();
            _SizeValue = FTFactory.Instance.CreateSizeValue(propertyTag, _length);

            Children.Add(_mvPropType);
            Children.Add(_propInfo);
            Children.Add(_length);
            Children.Add(_SizeValue);
        }
Esempio n. 5
0
        protected void ParseProperty(ISyntaxInfo Info, ISyntaxInfos Infos, int Level)
        {
            int       num1  = 1;
            IPropInfo info1 = (IPropInfo)Info;
            string    text1 = string.Empty;

            while (!base.Eof && !this.IsBlockEnd(ref num1))
            {
                string text2;
                text1 = base.TokenString.ToLower();
                if (base.Token != 2)
                {
                    goto Label_00DA;
                }
                if ((text2 = text1) == null)
                {
                    goto Label_00D1;
                }
                text2 = string.IsInterned(text2);
                if (text2 != "get")
                {
                    if (text2 == "set")
                    {
                        goto Label_0095;
                    }
                    goto Label_00D1;
                }
                info1.PropertyGet = new AccessorInfo(text1, new Point(this.tokenPos, base.LineIndex), Level);
                this.NextValidToken();
                base.ParseBlock(null, info1.PropertyGet, Level, null, this.parseAccessorProc);
                continue;
Label_0095:
                info1.PropertySet = new AccessorInfo(text1, new Point(this.tokenPos, base.LineIndex), Level);
                this.NextValidToken();
                base.ParseBlock(null, info1.PropertySet, Level, null, this.parseAccessorProc);
                continue;
Label_00D1:
                this.NextValidToken();
                continue;
Label_00DA:
                this.NextValidToken();
            }
        }
Esempio n. 6
0
 public void ParsePropValue(byte[] buffer, ref int pos)
 {
     PropInfo = StreamUtil.CreatePropInfo(buffer, ref pos);
     FixedSizeValue = StreamUtil.CreateFixedSizeValue(FixedPropType, buffer, ref pos);
 }
Esempio n. 7
0
 public void ParsePropValue(byte[] buffer, ref int pos)
 {
     PropInfo = StreamUtil.CreatePropInfo(buffer, ref pos);
     Length = PTypInteger32.CreateLength(buffer, ref pos);
     VarSizeValue = StreamUtil.CreateVarSizeValue(VarPropType, Length, buffer, ref pos);
 }
Esempio n. 8
0
 public void ParsePropValue(byte[] buffer, ref int pos)
 {
     throw new NotSupportedException();
     PropInfo = StreamUtil.CreatePropInfo(buffer, ref pos);
     while (true)
     {
         // todo
     }
 }