Skip to content

Commit 939f31a

Browse files
authored
Merge pull request #5684 from drewnoakes/vb-simplifications
VB code simplifications
2 parents e78cefb + 0899ff0 commit 939f31a

182 files changed

Lines changed: 1323 additions & 1323 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Microsoft.VisualStudio.AppDesigner/ApplicationDesigner/ApplicationDesignerEditorFactory.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
2929
Private Shared ReadOnly s_commandUIGuid As New Guid("{d06cd5e3-d961-44dc-9d80-c89a1a8d9d56}")
3030

3131
'Exposing the GUID for the rest of the assembly to see
32-
Public Shared ReadOnly Property EditorGuid() As Guid
32+
Public Shared ReadOnly Property EditorGuid As Guid
3333
Get
3434
Return s_editorGuid
3535
End Get
3636
End Property
3737

3838
'Exposing the GUID for the rest of the assembly to see
39-
Public Shared ReadOnly Property CommandUIGuid() As Guid
39+
Public Shared ReadOnly Property CommandUIGuid As Guid
4040
Get
4141
Return s_commandUIGuid
4242
End Get

src/Microsoft.VisualStudio.AppDesigner/ApplicationDesigner/ApplicationDesignerPanel.vb

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
128128
''' Returns the PropertyPageInfo for this designer panel, if it corresponds to a property page.
129129
''' Otherwise returns Nothing.
130130
''' </summary>
131-
Public ReadOnly Property PropertyPageInfo() As PropertyPageInfo
131+
Public ReadOnly Property PropertyPageInfo As PropertyPageInfo
132132
Get
133133
Return _propertyPageInfo
134134
End Get
135135
End Property
136136

137-
Public ReadOnly Property IsPropertyPage() As Boolean
137+
Public ReadOnly Property IsPropertyPage As Boolean
138138
Get
139139
Dim ReturnValue As Boolean = (_propertyPageInfo IsNot Nothing)
140140
Debug.Assert(Not ReturnValue OrElse EditorGuid.Equals(GetType(PropPageDesigner.PropPageDesignerEditorFactory).GUID),
@@ -143,19 +143,19 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
143143
End Get
144144
End Property
145145

146-
Public ReadOnly Property Hierarchy() As IVsHierarchy
146+
Public ReadOnly Property Hierarchy As IVsHierarchy
147147
Get
148148
Return _hierarchy
149149
End Get
150150
End Property
151151

152-
Public ReadOnly Property ItemId() As UInteger
152+
Public ReadOnly Property ItemId As UInteger
153153
Get
154154
Return _itemId
155155
End Get
156156
End Property
157157

158-
Public ReadOnly Property DocCookie() As UInteger
158+
Public ReadOnly Property DocCookie As UInteger
159159
Get
160160
Return _docCookie
161161
End Get
@@ -165,11 +165,11 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
165165
''' Provides a custom view control that can be displayed instead of hosting a designer. We can display either
166166
''' a custom view provider or a hosted designer, but not both at once.
167167
''' </summary>
168-
Public Property CustomViewProvider() As CustomViewProvider
168+
Public Property CustomViewProvider As CustomViewProvider
169169
Get
170170
Return _customViewProvider
171171
End Get
172-
Set(value As CustomViewProvider)
172+
Set
173173
If _customViewProvider Is value Then
174174
Exit Property
175175
End If
@@ -646,11 +646,11 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
646646
''' <summary>
647647
''' Get/set the window frame owned by this panel
648648
''' </summary>
649-
Public Property VsWindowFrame() As IVsWindowFrame
649+
Public Property VsWindowFrame As IVsWindowFrame
650650
Get
651651
Return _vsWindowFrame
652652
End Get
653-
Set(Value As IVsWindowFrame)
653+
Set
654654
If Value IsNot _vsWindowFrame Then
655655
Common.Switches.TracePDFocus(TraceLevel.Info, "ApplicationDesignerPanel.set_VsWindowFrame")
656656
CloseFrame()
@@ -669,11 +669,11 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
669669
''' The Guid used by the editor for this panel. For property pages, this is always
670670
''' PropPageDesignerView's guid.
671671
''' </summary>
672-
Public Property EditorGuid() As Guid
672+
Public Property EditorGuid As Guid
673673
Get
674674
Return _editorGuid
675675
End Get
676-
Set(Value As Guid)
676+
Set
677677
If IsPropertyPage Then
678678
Debug.Fail("Cannot change EditorGuid for property page designer panels")
679679
Exit Property
@@ -687,7 +687,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
687687
''' The Guid used by the object actually represented in this panel. For property pages,
688688
''' this is the guid of the property page. For all others, this is the same as EditorGuid.
689689
''' </summary>
690-
Public ReadOnly Property ActualGuid() As Guid
690+
Public ReadOnly Property ActualGuid As Guid
691691
Get
692692
If _propertyPageInfo IsNot Nothing Then
693693
Return _propertyPageInfo.Guid
@@ -700,31 +700,31 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
700700
''' <summary>
701701
''' Physical view guid for the editor
702702
''' </summary>
703-
Public Property PhysicalView() As String
703+
Public Property PhysicalView As String
704704
Get
705705
Return _physicalView
706706
End Get
707-
Set(Value As String)
707+
Set
708708
_physicalView = Value
709709
End Set
710710
End Property
711711

712712
''' <summary>
713713
''' The editor's caption
714714
''' </summary>
715-
Public Property EditorCaption() As String
715+
Public Property EditorCaption As String
716716
Get
717717
Return _editorCaption
718718
End Get
719-
Set(Value As String)
719+
Set
720720
_editorCaption = Value
721721
End Set
722722
End Property
723723

724724
''' <summary>
725725
''' The filename moniker of the file which is being edited by the editor
726726
''' </summary>
727-
Public Property MkDocument() As String
727+
Public Property MkDocument As String
728728
Get
729729
If _mkDocument <> "" Then
730730
Return _mkDocument
@@ -734,7 +734,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
734734
Return ""
735735
End If
736736
End Get
737-
Set(Value As String)
737+
Set
738738
Debug.Assert(_mkDocument Is Nothing, "MkDocument set multiple times")
739739
_mkDocument = Value
740740
End Set
@@ -743,11 +743,11 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
743743
''' <summary>
744744
''' The filename moniker of the file which is being edited by the editor
745745
''' </summary>
746-
Public Property CustomMkDocumentProvider() As CustomDocumentMonikerProvider
746+
Public Property CustomMkDocumentProvider As CustomDocumentMonikerProvider
747747
Get
748748
Return _customMkDocumentProvider
749749
End Get
750-
Set(Value As CustomDocumentMonikerProvider)
750+
Set
751751
Debug.Assert(_customMkDocumentProvider Is Nothing OrElse Value Is Nothing, "m_CustomMkDocumentProvider set multiple times")
752752
_customMkDocumentProvider = Value
753753
End Set
@@ -756,47 +756,47 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
756756
''' <summary>
757757
''' The DocData for the editor
758758
''' </summary>
759-
Public Property DocData() As Object
759+
Public Property DocData As Object
760760
Get
761761
Return _docData
762762
End Get
763-
Set(Value As Object)
763+
Set
764764
_docData = Value
765765
End Set
766766
End Property
767767

768768
''' <summary>
769769
''' The DocView for the editor
770770
''' </summary>
771-
Public Property DocView() As Control
771+
Public Property DocView As Control
772772
Get
773773
Return _docView
774774
End Get
775-
Set(Value As Control)
775+
Set
776776
_docView = Value
777777
End Set
778778
End Property
779779

780780
''' <summary>
781781
''' Flags to be passed to VsUIShellOpenDocument
782782
''' </summary>
783-
Public Property EditFlags() As UInteger
783+
Public Property EditFlags As UInteger
784784
Get
785785
Return _editFlags
786786
End Get
787-
Set(Value As UInteger)
787+
Set
788788
_editFlags = Value
789789
End Set
790790
End Property
791791

792792
''' <summary>
793793
''' The title that should be used for this panel's tab
794794
''' </summary>
795-
Public Property TabTitle() As String
795+
Public Property TabTitle As String
796796
Get
797797
Return _tabTitle
798798
End Get
799-
Set(value As String)
799+
Set
800800
_tabTitle = value
801801

802802
' We set Window.Text to be the page Title to help screen reader.
@@ -813,11 +813,11 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
813813
''' <summary>
814814
''' The name for the tab that is not localized and is seen by QA automation tools
815815
''' </summary>
816-
Public Property TabAutomationName() As String
816+
Public Property TabAutomationName As String
817817
Get
818818
Return _tabAutomationName
819819
End Get
820-
Set(value As String)
820+
Set
821821
_tabAutomationName = value
822822
End Set
823823
End Property
@@ -1033,7 +1033,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
10331033
'''<summary>
10341034
''' Initialize layout...
10351035
'''</summary>
1036-
<DebuggerStepThrough()>
1036+
<DebuggerStepThrough>
10371037
Private Sub InitializeComponent()
10381038
_pageHostingPanel = New Panel
10391039
_pageNameLabel = New Label

src/Microsoft.VisualStudio.AppDesigner/ApplicationDesigner/ApplicationDesignerRootComponent.vb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
2525
''' resx file to be edited by the user.
2626
''' </summary>
2727
''' <value>The associated ResourceEditorRootDesigner.</value>
28-
Public ReadOnly Property RootDesigner() As ApplicationDesignerRootDesigner
28+
Public ReadOnly Property RootDesigner As ApplicationDesignerRootDesigner
2929
Get
3030
If _rootDesigner Is Nothing Then
3131
'Not yet cached - get this info from the designer host
@@ -42,23 +42,23 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
4242
''' <summary>
4343
''' The IVsHierarchy associated with the AppDesigner node
4444
''' </summary>
45-
Public Property Hierarchy() As IVsHierarchy
45+
Public Property Hierarchy As IVsHierarchy
4646
Get
4747
Return _hierarchy
4848
End Get
49-
Set(Value As IVsHierarchy)
49+
Set
5050
_hierarchy = Value
5151
End Set
5252
End Property
5353

5454
''' <summary>
5555
''' The ItemId associated with the AppDesigner node
5656
''' </summary>
57-
Public Property ItemId() As UInteger
57+
Public Property ItemId As UInteger
5858
Get
5959
Return _itemId
6060
End Get
61-
Set(Value As UInteger)
61+
Set
6262
_itemId = Value
6363
End Set
6464
End Property

src/Microsoft.VisualStudio.AppDesigner/ApplicationDesigner/ApplicationDesignerRootDesigner.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
2424
''' Returns the ApplicationDesignerRootComponent component that is being edited by this designer.
2525
''' </summary>
2626
''' <value>The ApplicationDesignerRootComponent object.</value>
27-
Public Shadows ReadOnly Property Component() As ApplicationDesignerRootComponent
27+
Public Shadows ReadOnly Property Component As ApplicationDesignerRootComponent
2828
Get
2929
Dim RootComponent As ApplicationDesignerRootComponent = CType(MyBase.Component, ApplicationDesignerRootComponent)
3030
Debug.Assert(Not RootComponent Is Nothing)
@@ -77,7 +77,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
7777
''' <remarks>
7878
''' The view technology we support, which is currently only Windows Forms
7979
''' </remarks>
80-
Private ReadOnly Property IRootDesigner_SupportedTechnologies() As ViewTechnology() Implements IRootDesigner.SupportedTechnologies
80+
Private ReadOnly Property IRootDesigner_SupportedTechnologies As ViewTechnology() Implements IRootDesigner.SupportedTechnologies
8181
Get
8282
Return New ViewTechnology() {ViewTechnology.Default}
8383
End Get

src/Microsoft.VisualStudio.AppDesigner/ApplicationDesigner/ApplicationDesignerView.vb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
253253
End If
254254
End Sub
255255

256-
Public ReadOnly Property WindowFrame() As IVsWindowFrame
256+
Public ReadOnly Property WindowFrame As IVsWindowFrame
257257
Get
258258
Return CType(GetService(GetType(IVsWindowFrame)), IVsWindowFrame)
259259
End Get
@@ -262,13 +262,13 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
262262
''' <summary>
263263
''' Retrieves the DTE project object associated with this project designer instance.
264264
''' </summary>
265-
Public ReadOnly Property DTEProject() As Project
265+
Public ReadOnly Property DTEProject As Project
266266
Get
267267
Return _dteProject
268268
End Get
269269
End Property
270270

271-
Public ReadOnly Property SpecialFiles() As IVsProjectSpecialFiles
271+
Public ReadOnly Property SpecialFiles As IVsProjectSpecialFiles
272272
Get
273273
Return _specialFiles
274274
End Get
@@ -278,7 +278,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
278278
''' Instance of the loaded IVBPackage
279279
''' </summary>
280280
''' <remarks>Used to persist user data</remarks>
281-
Private ReadOnly Property Package() As IVBPackage
281+
Private ReadOnly Property Package As IVBPackage
282282
Get
283283
If _editorsPackage Is Nothing Then
284284
Dim shell As IVsShell = DirectCast(GetService(GetType(IVsShell)), IVsShell)
@@ -297,7 +297,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
297297
''' <summary>
298298
''' Get/set the last viewed tab of for this application page...
299299
''' </summary>
300-
Private Property LastShownTab() As Integer
300+
Private Property LastShownTab As Integer
301301
Get
302302
Dim editorsPackage As IVBPackage = Package
303303
If editorsPackage IsNot Nothing Then
@@ -308,7 +308,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
308308
End If
309309
Return 0
310310
End Get
311-
Set(value As Integer)
311+
Set
312312
Dim editorsPackage As IVBPackage = Package
313313
If editorsPackage IsNot Nothing Then
314314
editorsPackage.SetLastShownApplicationDesignerTab(_projectHierarchy, value)
@@ -564,7 +564,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
564564
End Function
565565

566566
Private _vsCfgProvider As IVsCfgProvider2
567-
Private ReadOnly Property VsCfgProvider() As IVsCfgProvider2
567+
Private ReadOnly Property VsCfgProvider As IVsCfgProvider2
568568
Get
569569
If _vsCfgProvider Is Nothing Then
570570
Dim Value As Object = Nothing
@@ -586,7 +586,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
586586
End Function
587587

588588

589-
Public Property ActiveView() As Guid
589+
Public Property ActiveView As Guid
590590
Get
591591
If _activePanelIndex < 0 OrElse _activePanelIndex >= _designerPanels.Length OrElse _designerPanels(_activePanelIndex) Is Nothing Then
592592
Return Guid.Empty
@@ -597,7 +597,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
597597
Return Panel.ActualGuid
598598
End Get
599599

600-
Set(Value As Guid)
600+
Set
601601
Common.Switches.TracePDFocus(TraceLevel.Info, "ApplicationDesignerView: set_ActiveView")
602602
'Find the guid and switch to that tab
603603
'Keep the current tab if guid not found
@@ -1328,7 +1328,7 @@ Namespace Microsoft.VisualStudio.Editors.ApplicationDesigner
13281328
''' by ApplicationDesignerPanel to delay any window frame activations until after
13291329
''' initialization.
13301330
''' </summary>
1331-
Public ReadOnly Property InitializationComplete() As Boolean
1331+
Public ReadOnly Property InitializationComplete As Boolean
13321332
Get
13331333
Return _initializationComplete
13341334
End Get

0 commit comments

Comments
 (0)