Esempio n. 1
0
        public PropertyBlock(PropertyGetBlock getBlock, PropertySetBlock setBlock)
            : base()
        {
            GetAccessor = getBlock;
            SetAccessor = setBlock;

            Init();
        }
Esempio n. 2
0
        public PropertyBlock()
            : base()
        {
            GetAccessor = new PropertyGetBlock();
            SetAccessor = new PropertySetBlock();

            Init();
        }
Esempio n. 3
0
        public PropertyBlock(PropertyGetBlock getBlock, PropertySetBlock setBlock)
            : base()
        {
            GetAccessor = getBlock;
            SetAccessor = setBlock;

            Init();
        }
Esempio n. 4
0
        public PropertyBlock()
            : base()
        {
            GetAccessor = new PropertyGetBlock();
            SetAccessor = new PropertySetBlock();

            Init();
        }
Esempio n. 5
0
 public override void AddChildren(IEnumerable <Block> restoredChildren)
 {
     foreach (Block child in restoredChildren)
     {
         if (child is PropertyGetBlock)
         {
             GetAccessor = child as PropertyGetBlock;
         }
         if (child is PropertySetBlock)
         {
             SetAccessor = child as PropertySetBlock;
         }
     }
 }
Esempio n. 6
0
        public static ParameterList FindParameters(Block point)
        {
            MethodBlock method = FindContainingMethod(point);

            if (method != null)
            {
                return(method.Parameters.Parameters);
            }

            PropertySetBlock propAccessor = FindContainingPropertyAccessor(point) as PropertySetBlock;

            if (propAccessor != null)
            {
                return(propAccessor.Parameters);
            }

            return(null);
        }
Esempio n. 7
0
 private void AssignSetAccessor(PropertySetBlock value)
 {
     if (value == null && mSetAccessor != null)
     {
         if (GetAccessor == null)
         {
             this.ReplaceWithField();
         }
         else
         {
             BlockActions.DeleteBlock(mSetAccessor);
         }
     }
     else if (mSetAccessor == null && value != null)
     {
         this.VMembers.Add(value);
     }
     else if (mSetAccessor != null && value != null)
     {
         mSetAccessor.Replace(value);
     }
     mSetAccessor = value;
 }
Esempio n. 8
0
 private void AssignSetAccessor(PropertySetBlock value)
 {
     if (value == null && mSetAccessor != null)
     {
         if (GetAccessor == null)
         {
             this.ReplaceWithField();
         }
         else
         {
             BlockActions.DeleteBlock(mSetAccessor);
         }
     }
     else if (mSetAccessor == null && value != null)
     {
         this.VMembers.Add(value);
     }
     else if (mSetAccessor != null && value != null)
     {
         mSetAccessor.Replace(value);
     }
     mSetAccessor = value;
 }