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

« back to all changes in this revision

Viewing changes to contrib/ICSharpCode.NRefactory.CSharp/Formatter/CSharpFormattingOptions.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:
1
 
// 
2
 
// CSharpFormattingOptions.cs
3
 
//  
4
 
// Author:
5
 
//       Mike KrĆ¼ger <mkrueger@novell.com>
6
 
//  
7
 
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
8
 
// 
9
 
// Permission is hereby granted, free of charge, to any person obtaining a copy
10
 
// of this software and associated documentation files (the "Software"), to deal
11
 
// in the Software without restriction, including without limitation the rights
12
 
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
 
// copies of the Software, and to permit persons to whom the Software is
14
 
// furnished to do so, subject to the following conditions:
15
 
// 
16
 
// The above copyright notice and this permission notice shall be included in
17
 
// all copies or substantial portions of the Software.
18
 
// 
19
 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
 
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
 
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
 
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
 
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
 
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
 
// THE SOFTWARE.
26
 
 
27
 
using System;
28
 
using System.Reflection;
29
 
using System.Linq;
30
 
 
31
 
namespace ICSharpCode.NRefactory.CSharp
32
 
{
33
 
        public enum BraceStyle
34
 
        {
35
 
                DoNotChange,
36
 
                EndOfLine,
37
 
                EndOfLineWithoutSpace,
38
 
                NextLine,
39
 
                NextLineShifted,
40
 
                NextLineShifted2,
41
 
                BannerStyle
42
 
        }
43
 
 
44
 
        public enum BraceForcement
45
 
        {
46
 
                DoNotChange,
47
 
                RemoveBraces,
48
 
                AddBraces
49
 
        }
50
 
 
51
 
        public enum PropertyFormatting
52
 
        {
53
 
                AllowOneLine,
54
 
                ForceOneLine,
55
 
                ForceNewLine
56
 
        }
57
 
 
58
 
        public enum Wrapping {
59
 
                DoNotChange,
60
 
                DoNotWrap,
61
 
                WrapAlways,
62
 
                WrapIfTooLong
63
 
        }
64
 
 
65
 
        public enum NewLinePlacement {
66
 
                DoNotCare,
67
 
                NewLine,
68
 
                SameLine
69
 
        }
70
 
 
71
 
        public class CSharpFormattingOptions
72
 
        {
73
 
                public string Name {
74
 
                        get;
75
 
                        set;
76
 
                }
77
 
 
78
 
                public bool IsBuiltIn {
79
 
                        get;
80
 
                        set;
81
 
                }
82
 
 
83
 
                public CSharpFormattingOptions Clone ()
84
 
                {
85
 
                        return (CSharpFormattingOptions)MemberwiseClone ();
86
 
                }
87
 
 
88
 
                #region Indentation
89
 
                public bool IndentNamespaceBody { // tested
90
 
                        get;
91
 
                        set;
92
 
                }
93
 
 
94
 
                public bool IndentClassBody { // tested
95
 
                        get;
96
 
                        set;
97
 
                }
98
 
 
99
 
                public bool IndentInterfaceBody { // tested
100
 
                        get;
101
 
                        set;
102
 
                }
103
 
 
104
 
                public bool IndentStructBody { // tested
105
 
                        get;
106
 
                        set;
107
 
                }
108
 
 
109
 
                public bool IndentEnumBody { // tested
110
 
                        get;
111
 
                        set;
112
 
                }
113
 
 
114
 
                public bool IndentMethodBody { // tested
115
 
                        get;
116
 
                        set;
117
 
                }
118
 
 
119
 
                public bool IndentPropertyBody { // tested
120
 
                        get;
121
 
                        set;
122
 
                }
123
 
 
124
 
                public bool IndentEventBody { // tested
125
 
                        get;
126
 
                        set;
127
 
                }
128
 
 
129
 
                public bool IndentBlocks { // tested
130
 
                        get;
131
 
                        set;
132
 
                }
133
 
 
134
 
                public bool IndentSwitchBody { // tested
135
 
                        get;
136
 
                        set;
137
 
                }
138
 
 
139
 
                public bool IndentCaseBody { // tested
140
 
                        get;
141
 
                        set;
142
 
                }
143
 
 
144
 
                public bool IndentBreakStatements { // tested
145
 
                        get;
146
 
                        set;
147
 
                }
148
 
 
149
 
                public bool AlignEmbeddedUsingStatements { // tested
150
 
                        get;
151
 
                        set;
152
 
                }
153
 
 
154
 
                public bool AlignEmbeddedIfStatements { // tested
155
 
                        get;
156
 
                        set;
157
 
                }
158
 
 
159
 
                public PropertyFormatting PropertyFormatting { // tested
160
 
                        get;
161
 
                        set;
162
 
                }
163
 
 
164
 
                #endregion
165
 
                
166
 
                #region Braces
167
 
                public BraceStyle NamespaceBraceStyle { // tested
168
 
                        get;
169
 
                        set;
170
 
                }
171
 
 
172
 
                public BraceStyle ClassBraceStyle { // tested
173
 
                        get;
174
 
                        set;
175
 
                }
176
 
 
177
 
                public BraceStyle InterfaceBraceStyle { // tested
178
 
                        get;
179
 
                        set;
180
 
                }
181
 
 
182
 
                public BraceStyle StructBraceStyle { // tested
183
 
                        get;
184
 
                        set;
185
 
                }
186
 
 
187
 
                public BraceStyle EnumBraceStyle { // tested
188
 
                        get;
189
 
                        set;
190
 
                }
191
 
 
192
 
                public BraceStyle MethodBraceStyle { // tested
193
 
                        get;
194
 
                        set;
195
 
                }
196
 
 
197
 
                public BraceStyle AnonymousMethodBraceStyle {
198
 
                        get;
199
 
                        set;
200
 
                }
201
 
 
202
 
                public BraceStyle ConstructorBraceStyle {  // tested
203
 
                        get;
204
 
                        set;
205
 
                }
206
 
 
207
 
                public BraceStyle DestructorBraceStyle { // tested
208
 
                        get;
209
 
                        set;
210
 
                }
211
 
 
212
 
                public BraceStyle PropertyBraceStyle { // tested
213
 
                        get;
214
 
                        set;
215
 
                }
216
 
 
217
 
                public BraceStyle PropertyGetBraceStyle { // tested
218
 
                        get;
219
 
                        set;
220
 
                }
221
 
 
222
 
                public BraceStyle PropertySetBraceStyle { // tested
223
 
                        get;
224
 
                        set;
225
 
                }
226
 
 
227
 
                public bool AllowPropertyGetBlockInline { // tested
228
 
                        get;
229
 
                        set;
230
 
                }
231
 
 
232
 
                public bool AllowPropertySetBlockInline { // tested
233
 
                        get;
234
 
                        set;
235
 
                }
236
 
 
237
 
                public BraceStyle EventBraceStyle { // tested
238
 
                        get;
239
 
                        set;
240
 
                }
241
 
 
242
 
                public BraceStyle EventAddBraceStyle { // tested
243
 
                        get;
244
 
                        set;
245
 
                }
246
 
 
247
 
                public BraceStyle EventRemoveBraceStyle { // tested
248
 
                        get;
249
 
                        set;
250
 
                }
251
 
 
252
 
                public bool AllowEventAddBlockInline { // tested
253
 
                        get;
254
 
                        set;
255
 
                }
256
 
 
257
 
                public bool AllowEventRemoveBlockInline { // tested
258
 
                        get;
259
 
                        set;
260
 
                }
261
 
 
262
 
                public BraceStyle StatementBraceStyle { // tested
263
 
                        get;
264
 
                        set;
265
 
                }
266
 
 
267
 
                public bool AllowIfBlockInline {
268
 
                        get;
269
 
                        set;
270
 
                }
271
 
 
272
 
                #endregion
273
 
                
274
 
                #region Force Braces
275
 
                public BraceForcement IfElseBraceForcement { // tested
276
 
                        get;
277
 
                        set;
278
 
                }
279
 
 
280
 
                public BraceForcement ForBraceForcement { // tested
281
 
                        get;
282
 
                        set;
283
 
                }
284
 
 
285
 
                public BraceForcement ForEachBraceForcement { // tested
286
 
                        get;
287
 
                        set;
288
 
                }
289
 
 
290
 
                public BraceForcement WhileBraceForcement { // tested
291
 
                        get;
292
 
                        set;
293
 
                }
294
 
 
295
 
                public BraceForcement UsingBraceForcement { // tested
296
 
                        get;
297
 
                        set;
298
 
                }
299
 
 
300
 
                public BraceForcement FixedBraceForcement { // tested
301
 
                        get;
302
 
                        set;
303
 
                }
304
 
 
305
 
                #endregion
306
 
                
307
 
                #region NewLines
308
 
                public NewLinePlacement ElseNewLinePlacement { // tested
309
 
                        get;
310
 
                        set;
311
 
                }
312
 
 
313
 
                public NewLinePlacement ElseIfNewLinePlacement { // tested
314
 
                        get;
315
 
                        set;
316
 
                }
317
 
 
318
 
                public NewLinePlacement CatchNewLinePlacement { // tested
319
 
                        get;
320
 
                        set;
321
 
                }
322
 
 
323
 
                public NewLinePlacement FinallyNewLinePlacement { // tested
324
 
                        get;
325
 
                        set;
326
 
                }
327
 
 
328
 
                public NewLinePlacement WhileNewLinePlacement { // tested
329
 
                        get;
330
 
                        set;
331
 
                }
332
 
                #endregion
333
 
                
334
 
                #region Spaces
335
 
                // Methods
336
 
                public bool SpaceBeforeMethodDeclarationParentheses { // tested
337
 
                        get;
338
 
                        set;
339
 
                }
340
 
 
341
 
                public bool SpaceBetweenEmptyMethodDeclarationParentheses {
342
 
                        get;
343
 
                        set;
344
 
                }
345
 
 
346
 
                public bool SpaceBeforeMethodDeclarationParameterComma { // tested
347
 
                        get;
348
 
                        set;
349
 
                }
350
 
 
351
 
                public bool SpaceAfterMethodDeclarationParameterComma { // tested
352
 
                        get;
353
 
                        set;
354
 
                }
355
 
 
356
 
                public bool SpaceWithinMethodDeclarationParentheses { // tested
357
 
                        get;
358
 
                        set;
359
 
                }
360
 
                
361
 
                // Method calls
362
 
                public bool SpaceBeforeMethodCallParentheses { // tested
363
 
                        get;
364
 
                        set;
365
 
                }
366
 
 
367
 
                public bool SpaceBetweenEmptyMethodCallParentheses { // tested
368
 
                        get;
369
 
                        set;
370
 
                }
371
 
 
372
 
                public bool SpaceBeforeMethodCallParameterComma { // tested
373
 
                        get;
374
 
                        set;
375
 
                }
376
 
 
377
 
                public bool SpaceAfterMethodCallParameterComma { // tested
378
 
                        get;
379
 
                        set;
380
 
                }
381
 
 
382
 
                public bool SpaceWithinMethodCallParentheses { // tested
383
 
                        get;
384
 
                        set;
385
 
                }
386
 
                
387
 
                // fields
388
 
                
389
 
                public bool SpaceBeforeFieldDeclarationComma { // tested
390
 
                        get;
391
 
                        set;
392
 
                }
393
 
 
394
 
                public bool SpaceAfterFieldDeclarationComma { // tested
395
 
                        get;
396
 
                        set;
397
 
                }
398
 
                
399
 
                // local variables
400
 
                
401
 
                public bool SpaceBeforeLocalVariableDeclarationComma { // tested
402
 
                        get;
403
 
                        set;
404
 
                }
405
 
 
406
 
                public bool SpaceAfterLocalVariableDeclarationComma { // tested
407
 
                        get;
408
 
                        set;
409
 
                }
410
 
                
411
 
                // constructors
412
 
                
413
 
                public bool SpaceBeforeConstructorDeclarationParentheses { // tested
414
 
                        get;
415
 
                        set;
416
 
                }
417
 
 
418
 
                public bool SpaceBetweenEmptyConstructorDeclarationParentheses { // tested
419
 
                        get;
420
 
                        set;
421
 
                }
422
 
 
423
 
                public bool SpaceBeforeConstructorDeclarationParameterComma { // tested
424
 
                        get;
425
 
                        set;
426
 
                }
427
 
 
428
 
                public bool SpaceAfterConstructorDeclarationParameterComma { // tested
429
 
                        get;
430
 
                        set;
431
 
                }
432
 
 
433
 
                public bool SpaceWithinConstructorDeclarationParentheses { // tested
434
 
                        get;
435
 
                        set;
436
 
                }
437
 
                
438
 
                // indexer
439
 
                public bool SpaceBeforeIndexerDeclarationBracket { // tested
440
 
                        get;
441
 
                        set;
442
 
                }
443
 
 
444
 
                public bool SpaceWithinIndexerDeclarationBracket { // tested
445
 
                        get;
446
 
                        set;
447
 
                }
448
 
 
449
 
                public bool SpaceBeforeIndexerDeclarationParameterComma {
450
 
                        get;
451
 
                        set;
452
 
                }
453
 
 
454
 
                public bool SpaceAfterIndexerDeclarationParameterComma {
455
 
                        get;
456
 
                        set;
457
 
                }
458
 
                
459
 
                // delegates
460
 
                
461
 
                public bool SpaceBeforeDelegateDeclarationParentheses {
462
 
                        get;
463
 
                        set;
464
 
                }
465
 
 
466
 
                public bool SpaceBetweenEmptyDelegateDeclarationParentheses {
467
 
                        get;
468
 
                        set;
469
 
                }
470
 
 
471
 
                public bool SpaceBeforeDelegateDeclarationParameterComma {
472
 
                        get;
473
 
                        set;
474
 
                }
475
 
 
476
 
                public bool SpaceAfterDelegateDeclarationParameterComma {
477
 
                        get;
478
 
                        set;
479
 
                }
480
 
 
481
 
                public bool SpaceWithinDelegateDeclarationParentheses {
482
 
                        get;
483
 
                        set;
484
 
                }
485
 
 
486
 
                public bool SpaceBeforeNewParentheses { // tested
487
 
                        get;
488
 
                        set;
489
 
                }
490
 
 
491
 
                public bool SpaceBeforeIfParentheses { // tested
492
 
                        get;
493
 
                        set;
494
 
                }
495
 
 
496
 
                public bool SpaceBeforeWhileParentheses { // tested
497
 
                        get;
498
 
                        set;
499
 
                }
500
 
 
501
 
                public bool SpaceBeforeForParentheses { // tested
502
 
                        get;
503
 
                        set;
504
 
                }
505
 
 
506
 
                public bool SpaceBeforeForeachParentheses { // tested
507
 
                        get;
508
 
                        set;
509
 
                }
510
 
 
511
 
                public bool SpaceBeforeCatchParentheses { // tested
512
 
                        get;
513
 
                        set;
514
 
                }
515
 
 
516
 
                public bool SpaceBeforeSwitchParentheses { // tested
517
 
                        get;
518
 
                        set;
519
 
                }
520
 
 
521
 
                public bool SpaceBeforeLockParentheses { // tested
522
 
                        get;
523
 
                        set;
524
 
                }
525
 
 
526
 
                public bool SpaceBeforeUsingParentheses { // tested
527
 
                        get;
528
 
                        set;
529
 
                }
530
 
 
531
 
                public bool SpaceAroundAssignment { // tested
532
 
                        get;
533
 
                        set;
534
 
                }
535
 
 
536
 
                public bool SpaceAroundLogicalOperator { // tested
537
 
                        get;
538
 
                        set;
539
 
                }
540
 
 
541
 
                public bool SpaceAroundEqualityOperator { // tested
542
 
                        get;
543
 
                        set;
544
 
                }
545
 
 
546
 
                public bool SpaceAroundRelationalOperator { // tested
547
 
                        get;
548
 
                        set;
549
 
                }
550
 
 
551
 
                public bool SpaceAroundBitwiseOperator { // tested
552
 
                        get;
553
 
                        set;
554
 
                }
555
 
 
556
 
                public bool SpaceAroundAdditiveOperator { // tested
557
 
                        get;
558
 
                        set;
559
 
                }
560
 
 
561
 
                public bool SpaceAroundMultiplicativeOperator { // tested
562
 
                        get;
563
 
                        set;
564
 
                }
565
 
 
566
 
                public bool SpaceAroundShiftOperator { // tested
567
 
                        get;
568
 
                        set;
569
 
                }
570
 
 
571
 
                public bool SpaceAroundNullCoalescingOperator {
572
 
                        get;
573
 
                        set;
574
 
                }
575
 
 
576
 
                public bool SpacesWithinParentheses { // tested
577
 
                        get;
578
 
                        set;
579
 
                }
580
 
 
581
 
                public bool SpacesWithinIfParentheses { // tested
582
 
                        get;
583
 
                        set;
584
 
                }
585
 
 
586
 
                public bool SpacesWithinWhileParentheses { // tested
587
 
                        get;
588
 
                        set;
589
 
                }
590
 
 
591
 
                public bool SpacesWithinForParentheses { // tested
592
 
                        get;
593
 
                        set;
594
 
                }
595
 
 
596
 
                public bool SpacesWithinForeachParentheses { // tested
597
 
                        get;
598
 
                        set;
599
 
                }
600
 
 
601
 
                public bool SpacesWithinCatchParentheses { // tested
602
 
                        get;
603
 
                        set;
604
 
                }
605
 
 
606
 
                public bool SpacesWithinSwitchParentheses { // tested
607
 
                        get;
608
 
                        set;
609
 
                }
610
 
 
611
 
                public bool SpacesWithinLockParentheses { // tested
612
 
                        get;
613
 
                        set;
614
 
                }
615
 
 
616
 
                public bool SpacesWithinUsingParentheses { // tested
617
 
                        get;
618
 
                        set;
619
 
                }
620
 
 
621
 
                public bool SpacesWithinCastParentheses { // tested
622
 
                        get;
623
 
                        set;
624
 
                }
625
 
 
626
 
                public bool SpacesWithinSizeOfParentheses { // tested
627
 
                        get;
628
 
                        set;
629
 
                }
630
 
 
631
 
                public bool SpaceBeforeSizeOfParentheses { // tested
632
 
                        get;
633
 
                        set;
634
 
                }
635
 
 
636
 
                public bool SpacesWithinTypeOfParentheses { // tested
637
 
                        get;
638
 
                        set;
639
 
                }
640
 
 
641
 
                public bool SpacesWithinNewParentheses { // tested
642
 
                        get;
643
 
                        set;
644
 
                }
645
 
 
646
 
                public bool SpacesBetweenEmptyNewParentheses { // tested
647
 
                        get;
648
 
                        set;
649
 
                }
650
 
 
651
 
                public bool SpaceBeforeNewParameterComma { // tested
652
 
                        get;
653
 
                        set;
654
 
                }
655
 
 
656
 
                public bool SpaceAfterNewParameterComma { // tested
657
 
                        get;
658
 
                        set;
659
 
                }
660
 
 
661
 
                public bool SpaceBeforeTypeOfParentheses { // tested
662
 
                        get;
663
 
                        set;
664
 
                }
665
 
 
666
 
                public bool SpacesWithinCheckedExpressionParantheses { // tested
667
 
                        get;
668
 
                        set;
669
 
                }
670
 
 
671
 
                public bool SpaceBeforeConditionalOperatorCondition { // tested
672
 
                        get;
673
 
                        set;
674
 
                }
675
 
 
676
 
                public bool SpaceAfterConditionalOperatorCondition { // tested
677
 
                        get;
678
 
                        set;
679
 
                }
680
 
 
681
 
                public bool SpaceBeforeConditionalOperatorSeparator { // tested
682
 
                        get;
683
 
                        set;
684
 
                }
685
 
 
686
 
                public bool SpaceAfterConditionalOperatorSeparator { // tested
687
 
                        get;
688
 
                        set;
689
 
                }
690
 
                
691
 
                // brackets
692
 
                public bool SpacesWithinBrackets { // tested
693
 
                        get;
694
 
                        set;
695
 
                }
696
 
 
697
 
                public bool SpacesBeforeBrackets { // tested
698
 
                        get;
699
 
                        set;
700
 
                }
701
 
 
702
 
                public bool SpaceBeforeBracketComma { // tested
703
 
                        get;
704
 
                        set;
705
 
                }
706
 
 
707
 
                public bool SpaceAfterBracketComma { // tested
708
 
                        get;
709
 
                        set;
710
 
                }
711
 
 
712
 
                public bool SpaceBeforeForSemicolon { // tested
713
 
                        get;
714
 
                        set;
715
 
                }
716
 
 
717
 
                public bool SpaceAfterForSemicolon { // tested
718
 
                        get;
719
 
                        set;
720
 
                }
721
 
 
722
 
                public bool SpaceAfterTypecast { // tested
723
 
                        get;
724
 
                        set;
725
 
                }
726
 
 
727
 
                public bool SpaceBeforeArrayDeclarationBrackets { // tested
728
 
                        get;
729
 
                        set;
730
 
                }
731
 
 
732
 
                public bool SpaceInNamedArgumentAfterDoubleColon {
733
 
                        get;
734
 
                        set;
735
 
                }
736
 
                #endregion
737
 
                
738
 
                #region Blank Lines
739
 
                public int BlankLinesBeforeUsings {
740
 
                        get;
741
 
                        set;
742
 
                }
743
 
 
744
 
                public int BlankLinesAfterUsings {
745
 
                        get;
746
 
                        set;
747
 
                }
748
 
 
749
 
                public int BlankLinesBeforeFirstDeclaration {
750
 
                        get;
751
 
                        set;
752
 
                }
753
 
 
754
 
                public int BlankLinesBetweenTypes {
755
 
                        get;
756
 
                        set;
757
 
                }
758
 
 
759
 
                public int BlankLinesBetweenFields {
760
 
                        get;
761
 
                        set;
762
 
                }
763
 
 
764
 
                public int BlankLinesBetweenEventFields {
765
 
                        get;
766
 
                        set;
767
 
                }
768
 
 
769
 
                public int BlankLinesBetweenMembers {
770
 
                        get;
771
 
                        set;
772
 
                }
773
 
 
774
 
                #endregion
775
 
 
776
 
 
777
 
                #region Keep formatting
778
 
                public bool KeepCommentsAtFirstColumn {
779
 
                        get;
780
 
                        set;
781
 
                }
782
 
                #endregion
783
 
 
784
 
                #region Wrapping
785
 
 
786
 
                public Wrapping ArrayInitializerWrapping {
787
 
                        get;
788
 
                        set;
789
 
                }
790
 
 
791
 
                public BraceStyle ArrayInitializerBraceStyle {
792
 
                        get;
793
 
                        set;
794
 
                }
795
 
 
796
 
                public Wrapping ChainedMethodCallWrapping {
797
 
                        get;
798
 
                        set;
799
 
                }
800
 
 
801
 
                public Wrapping MethodCallArgumentWrapping {
802
 
                        get;
803
 
                        set;
804
 
                }
805
 
 
806
 
                public bool NewLineAferMethodCallOpenParentheses {
807
 
                        get;
808
 
                        set;
809
 
                }
810
 
 
811
 
                public bool MethodCallClosingParenthesesOnNewLine {
812
 
                        get;
813
 
                        set;
814
 
                }
815
 
 
816
 
                public Wrapping IndexerArgumentWrapping {
817
 
                        get;
818
 
                        set;
819
 
                }
820
 
 
821
 
                public bool NewLineAferIndexerOpenBracket {
822
 
                        get;
823
 
                        set;
824
 
                }
825
 
 
826
 
                public bool IndexerClosingBracketOnNewLine {
827
 
                        get;
828
 
                        set;
829
 
                }
830
 
 
831
 
                public Wrapping MethodDeclarationParameterWrapping {
832
 
                        get;
833
 
                        set;
834
 
                }
835
 
 
836
 
                public bool NewLineAferMethodDeclarationOpenParentheses {
837
 
                        get;
838
 
                        set;
839
 
                }
840
 
 
841
 
                public bool MethodDeclarationClosingParenthesesOnNewLine {
842
 
                        get;
843
 
                        set;
844
 
                }
845
 
 
846
 
                public Wrapping IndexerDeclarationParameterWrapping {
847
 
                        get;
848
 
                        set;
849
 
                }
850
 
 
851
 
                public bool NewLineAferIndexerDeclarationOpenBracket {
852
 
                        get;
853
 
                        set;
854
 
                }
855
 
 
856
 
                public bool IndexerDeclarationClosingBracketOnNewLine {
857
 
                        get;
858
 
                        set;
859
 
                }
860
 
                #endregion
861
 
 
862
 
                internal CSharpFormattingOptions()
863
 
                {
864
 
                }
865
 
 
866
 
                /*public static CSharpFormattingOptions Load (FilePath selectedFile)
867
 
                {
868
 
                        using (var stream = System.IO.File.OpenRead (selectedFile)) {
869
 
                                return Load (stream);
870
 
                        }
871
 
                }
872
 
 
873
 
                public static CSharpFormattingOptions Load (System.IO.Stream input)
874
 
                {
875
 
                        CSharpFormattingOptions result = FormattingOptionsFactory.CreateMonoOptions ();
876
 
                        result.Name = "noname";
877
 
                        using (XmlTextReader reader = new XmlTextReader (input)) {
878
 
                                while (reader.Read ()) {
879
 
                                        if (reader.NodeType == XmlNodeType.Element) {
880
 
                                                if (reader.LocalName == "Property") {
881
 
                                                        var info = typeof(CSharpFormattingOptions).GetProperty (reader.GetAttribute ("name"));
882
 
                                                        string valString = reader.GetAttribute ("value");
883
 
                                                        object value;
884
 
                                                        if (info.PropertyType == typeof(bool)) {
885
 
                                                                value = Boolean.Parse (valString);
886
 
                                                        } else if (info.PropertyType == typeof(int)) {
887
 
                                                                value = Int32.Parse (valString);
888
 
                                                        } else {
889
 
                                                                value = Enum.Parse (info.PropertyType, valString);
890
 
                                                        }
891
 
                                                        info.SetValue (result, value, null);
892
 
                                                } else if (reader.LocalName == "FormattingProfile") {
893
 
                                                        result.Name = reader.GetAttribute ("name");
894
 
                                                }
895
 
                                        } else if (reader.NodeType == XmlNodeType.EndElement && reader.LocalName == "FormattingProfile") {
896
 
                                                //Console.WriteLine ("result:" + result.Name);
897
 
                                                return result;
898
 
                                        }
899
 
                                }
900
 
                        }
901
 
                        return result;
902
 
                }
903
 
 
904
 
                public void Save (string fileName)
905
 
                {
906
 
                        using (var writer = new XmlTextWriter (fileName, Encoding.Default)) {
907
 
                                writer.Formatting = System.Xml.Formatting.Indented;
908
 
                                writer.Indentation = 1;
909
 
                                writer.IndentChar = '\t';
910
 
                                writer.WriteStartElement ("FormattingProfile");
911
 
                                writer.WriteAttributeString ("name", Name);
912
 
                                foreach (PropertyInfo info in typeof (CSharpFormattingOptions).GetProperties ()) {
913
 
                                        if (info.GetCustomAttributes (false).Any (o => o.GetType () == typeof(ItemPropertyAttribute))) {
914
 
                                                writer.WriteStartElement ("Property");
915
 
                                                writer.WriteAttributeString ("name", info.Name);
916
 
                                                writer.WriteAttributeString ("value", info.GetValue (this, null).ToString ());
917
 
                                                writer.WriteEndElement ();
918
 
                                        }
919
 
                                }
920
 
                                writer.WriteEndElement ();
921
 
                        }
922
 
                }
923
 
 
924
 
                public bool Equals (CSharpFormattingOptions other)
925
 
                {
926
 
                        foreach (PropertyInfo info in typeof (CSharpFormattingOptions).GetProperties ()) {
927
 
                                if (info.GetCustomAttributes (false).Any (o => o.GetType () == typeof(ItemPropertyAttribute))) {
928
 
                                        object val = info.GetValue (this, null);
929
 
                                        object otherVal = info.GetValue (other, null);
930
 
                                        if (val == null) {
931
 
                                                if (otherVal == null)
932
 
                                                        continue;
933
 
                                                return false;
934
 
                                        }
935
 
                                        if (!val.Equals (otherVal)) {
936
 
                                                //Console.WriteLine ("!equal");
937
 
                                                return false;
938
 
                                        }
939
 
                                }
940
 
                        }
941
 
                        //Console.WriteLine ("== equal");
942
 
                        return true;
943
 
                }*/
944
 
        }
945
 
}