コード例 #1
0
        protected override Expression VisitBinary(BinaryExpression be)
        {
            if (be.NodeType == ExpressionType.Equal)
            {
                if (ExpressionTreeHelpers.IsMemberEqualsValueExpression(be, typeof(VirtualMachineProperties), "CloudServiceName"))
                {
                    _cloudServiceName = ExpressionTreeHelpers.GetValueFromEqualsExpression(be, typeof(VirtualMachineProperties), "CloudServiceName");
                    return(be);
                }

                else
                {
                    return(base.VisitBinary(be));
                }
            }
            else
            {
                return(base.VisitBinary(be));
            }
        }
コード例 #2
0
 protected override Expression VisitBinary(BinaryExpression be)
 {
     if (be.NodeType == ExpressionType.Equal)
     {
         if (ExpressionTreeHelpers.IsMemberEqualsValueExpression(be, typeof(StorageAccount), "Name"))
         {
             _storageAccounts.Add(ExpressionTreeHelpers.GetValueFromEqualsExpression(be, typeof(StorageAccount), "Name"));
             return(be);
         }
         else if (ExpressionTreeHelpers.IsMemberEqualsValueExpression(be, typeof(StorageAccount), "Url"))
         {
             _storageAccounts.Add(ExpressionTreeHelpers.GetValueFromEqualsExpression(be, typeof(StorageAccount), "Url"));
             return(be);
         }
         else
         {
             return(base.VisitBinary(be));
         }
     }
     else
     {
         return(base.VisitBinary(be));
     }
 }