public override bool Equals(Expression other)
        {
            if (!(other is SafeCastExpression))
            {
                return(false);
            }
            SafeCastExpression safeCast = other as SafeCastExpression;

            if (this.TargetType.FullName != safeCast.TargetType.FullName)
            {
                return(false);
            }
            // might need null check here
            return(this.Expression.Equals(safeCast.Expression));
        }
 public override Expression CloneExpressionOnly()
 {
     SafeCastExpression result = new SafeCastExpression(Expression.CloneExpressionOnly(), this.TargetType, null);
     return result;
 }
        public override Expression Clone()
        {
			SafeCastExpression result = new SafeCastExpression(Expression.Clone(), this.TargetType, instructions);
			return result;
        }
		public override void VisitSafeCastExpression(SafeCastExpression node)
		{
			TypesDependingOn.UnionWith(Utilities.GetTypeReferenceTypesDepedningOn(node.ExpressionType));
			base.VisitSafeCastExpression(node);
		}
 public override void VisitSafeCastExpression(SafeCastExpression node)
 {
     WriteKeyword(KeyWordWriter.TryCast);
     WriteToken("(");
     Visit(node.Expression);
     WriteToken(",");
     WriteSpace();
     WriteReferenceAndNamespaceIfInCollision(node.TargetType);
     WriteToken(")");
 }
 public virtual void VisitSafeCastExpression(SafeCastExpression node)
 {
     Visit(node.Expression);
 }
        public override Expression CloneExpressionOnly()
        {
            SafeCastExpression result = new SafeCastExpression(Expression.CloneExpressionOnly(), this.TargetType, null);

            return(result);
        }
        public override Expression Clone()
        {
            SafeCastExpression result = new SafeCastExpression(Expression.Clone(), this.TargetType, instructions);

            return(result);
        }