code style improvements

master
xieguigang 5 years ago
parent 5f1a2c6397
commit a87266ecde

@ -30,12 +30,10 @@
' OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#End Region
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.InteropServices
Namespace Google.Protobuf.Collections
''' <summary>
''' Read-only wrapper around another dictionary.
''' </summary>

@ -34,20 +34,22 @@ Imports System.Reflection
Imports System.Runtime.CompilerServices
Namespace Google.Protobuf.Compatibility
''' <summary>
''' Extension methods for <see cref="PropertyInfo"/>, effectively providing
''' the familiar members from previous desktop framework versions while
''' targeting the newer releases, .NET Core etc.
''' </summary>
Friend Module PropertyInfoExtensions
''' <summary>
''' Returns the public getter of a property, or null if there is no such getter
''' (either because it's read-only, or the getter isn't public).
''' </summary>
<Extension()>
Friend Function GetGetMethod(target As PropertyInfo) As MethodInfo
#If DOTNET35
var method = target.GetGetMethod();
#If DOTNET35 Then
Dim method = target.GetGetMethod()
#Else
Dim method = target.GetMethod
#End If
@ -60,8 +62,8 @@ Namespace Google.Protobuf.Compatibility
''' </summary>
<Extension()>
Friend Function GetSetMethod(target As PropertyInfo) As MethodInfo
#If DOTNET35
var method = target.GetSetMethod();
#If DOTNET35 Then
Dim method = target.GetSetMethod()
#Else
Dim method = target.SetMethod
#End If

@ -30,12 +30,13 @@
' OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#End Region
Imports System
Imports System.Reflection
Imports System.Runtime.CompilerServices
#If Not DOTNET35
#If Not DOTNET35 Then
Namespace Google.Protobuf.Compatibility
''' <summary>
''' Provides extension methods on Type that just proxy to TypeInfo.
''' These are used to support the new type system from .NET 4.5, without
@ -45,6 +46,7 @@ Namespace Google.Protobuf.Compatibility
''' evaluate each new use appropriately.
''' </summary>
Friend Module TypeExtensions
''' <summary>
''' See https://msdn.microsoft.com/en-us/library/system.type.isassignablefrom
''' </summary>

@ -31,6 +31,7 @@
#End Region
Namespace Google.Protobuf
''' <summary>
''' A message type that has a custom string format for diagnostic purposes.
''' </summary>
@ -53,6 +54,7 @@ Namespace Google.Protobuf
''' </remarks>
Public Interface ICustomDiagnosticMessage
Inherits IMessage
''' <summary>
''' Returns a string representation of this object, for diagnostic purposes.
''' </summary>

Loading…
Cancel
Save