~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to contrib/ICSharpCode.Decompiler/DecompilerSettings.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
using System;
20
20
using System.ComponentModel;
 
21
using ICSharpCode.NRefactory.CSharp;
21
22
 
22
23
namespace ICSharpCode.Decompiler
23
24
{
71
72
                        }
72
73
                }
73
74
                
 
75
                bool asyncAwait = true;
 
76
                
 
77
                /// <summary>
 
78
                /// Decompile async methods.
 
79
                /// </summary>
 
80
                public bool AsyncAwait {
 
81
                        get { return asyncAwait; }
 
82
                        set {
 
83
                                if (asyncAwait != value) {
 
84
                                        asyncAwait = value;
 
85
                                        OnPropertyChanged("AsyncAwait");
 
86
                                }
 
87
                        }
 
88
                }
 
89
                
74
90
                bool automaticProperties = true;
75
91
                
76
92
                /// <summary>
234
250
                        set {
235
251
                                if (showXmlDocumentation != value) {
236
252
                                        showXmlDocumentation = value;
237
 
                                        OnPropertyChanged ("ShowXmlDocumentation");
 
253
                                        OnPropertyChanged("ShowXmlDocumentation");
 
254
                                }
 
255
                        }
 
256
                }
 
257
 
 
258
                bool foldBraces = false;
 
259
                
 
260
                public bool FoldBraces {
 
261
                        get { return foldBraces; }
 
262
                        set {
 
263
                                if (foldBraces != value) {
 
264
                                        foldBraces = value;
 
265
                                        OnPropertyChanged("FoldBraces");
238
266
                                }
239
267
                        }
240
268
                }
241
269
 
242
270
                bool hideNonPublicMembers = false;
 
271
                
243
272
                public bool HideNonPublicMembers {
244
273
                        get { return hideNonPublicMembers; }
245
274
                        set {
246
275
                                if (hideNonPublicMembers != value) {
247
276
                                        hideNonPublicMembers = value;
248
 
                                        OnPropertyChanged ("HideNonPublicMembers");
 
277
                                        OnPropertyChanged("HideNonPublicMembers");
249
278
                                }
250
279
                        }
251
280
                }
282
311
                }
283
312
                #endregion
284
313
                
 
314
                CSharpFormattingOptions csharpFormattingOptions;
 
315
                
 
316
                public CSharpFormattingOptions CSharpFormattingOptions {
 
317
                        get {
 
318
                                if (csharpFormattingOptions == null) {
 
319
                                        csharpFormattingOptions = FormattingOptionsFactory.CreateAllman();
 
320
                                        csharpFormattingOptions.IndentSwitchBody = false;
 
321
                                }
 
322
                                return csharpFormattingOptions;
 
323
                        }
 
324
                        set {
 
325
                                if (value == null)
 
326
                                        throw new ArgumentNullException();
 
327
                                if (csharpFormattingOptions != value) {
 
328
                                        csharpFormattingOptions = value;
 
329
                                        OnPropertyChanged("CSharpFormattingOptions");
 
330
                                }
 
331
                        }
 
332
                }
 
333
                
285
334
                public event PropertyChangedEventHandler PropertyChanged;
286
335
                
287
336
                protected virtual void OnPropertyChanged(string propertyName)
294
343
                public DecompilerSettings Clone()
295
344
                {
296
345
                        DecompilerSettings settings = (DecompilerSettings)MemberwiseClone();
 
346
                        if (csharpFormattingOptions != null)
 
347
                                settings.csharpFormattingOptions = csharpFormattingOptions.Clone();
297
348
                        settings.PropertyChanged = null;
298
349
                        return settings;
299
350
                }