> > +           public override ParameterDirection Direction {
> > +                   get {
> > +                           if (_direction == ((ParameterDirection) 0)) {
> > +                                           return ParameterDirection.Input;
> > +                           }
> 
> what is this check for? revert to previous default assignment of
> ParameterDirection.Input.
> 
> > +                           return _direction;
> > +                   }
> > +                   set {
> > +                           if (_direction != value) {
> > +                                   switch (value) {
> > +                                                   case 
> > ParameterDirection.Input:
> > +                                                   case 
> > ParameterDirection.Output:
> > +                                                   case 
> > ParameterDirection.InputOutput:
> > +                                                   case 
> > ParameterDirection.ReturnValue:
> > +                                                   {
> > +                                                           
> > PropertyChanging();
> > +                                                           _direction = 
> > value;
> > +                                                           return;
> > +                                                   }
> > +                                   }
> > +                                   throw 
> > ExceptionHelper.InvalidParameterDirection(value);
> > +                           }
> > +                   
> 
> By the property declaration, this property cannot be set of any value
> other than of type ParameterDirection. These exception handling are
> irrelevant. Or am I missing something?
> 

I was wrong. Any int value can be casted to this property. so the
exception handling is necessary.

Why not assigning ParameterDirection.Input by default to _direction
rather than checking with 0 and returning it back?

Thanks & Best Regards,
suresh.
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to