[MonoDevelop] Some changes to ambiences
    Mike Krüger 
    mkrueger at novell.com
       
    Sat Nov 29 01:26:52 EST 2008
    
    
  
Hi
> But an OutputSettings contains the flags, so I don't understand why
> you can't require that the data object is an OutputSettings, and have
> overloads on the *public* Ambience API (i.e. GetString etc) that will
> accept an OutputFlags or an OutputSettings.
> 
Hm, I'll refactor it. But if a new user will get confused about this
method I'm 100% sure he'll never be able to write a monodevelop addin.
> As a bonus, all of the static protected helper methods on Ambience can
> be moved to instance members of the OutputSettings object, e.g.
> protected static bool IncludeModifiers (object settings)
> becomes
> public bool IncludeModifiers
> on the settings object, and extracts the value from the flags enum in
> the settings. IMO,
> if (settings.IncludeModifiers) {}
> is more readable than
> if (IncludeModifiers (settings)) {}
> 
I've already seen this :), currently I've some duplication (I've the
static helper methods and some properties in settings, but not all,
therefore I've still the old ones). 
This is something I want to remove (I hate duplication) :) 
Regards
Mike
    
    
More information about the Monodevelop-list
mailing list