diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-01-17 21:23:17 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-01-17 21:23:17 -0800 |
commit | cdb850c6cf90381e6db75365272b7d65ef5fe359 (patch) | |
tree | 8a466b7fc77e7811bf1aa21499614bad21d1798a /samples/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb | |
parent | 6b0a88f4e2ee416ce05db01551b1b51f00cdaba8 (diff) | |
parent | 552e0f13814655312525164f948bca6015287227 (diff) | |
download | DotNetOpenAuth-cdb850c6cf90381e6db75365272b7d65ef5fe359.zip DotNetOpenAuth-cdb850c6cf90381e6db75365272b7d65ef5fe359.tar.gz DotNetOpenAuth-cdb850c6cf90381e6db75365272b7d65ef5fe359.tar.bz2 |
Merge branch 'v3.4'
Diffstat (limited to 'samples/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb')
-rw-r--r-- | samples/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/samples/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb b/samples/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb new file mode 100644 index 0000000..78c7c19 --- /dev/null +++ b/samples/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb @@ -0,0 +1,73 @@ +#If _MyType <> "Empty" Then + +Namespace My + ''' <summary> + ''' Module used to define the properties that are available in the My Namespace for Web projects. + ''' </summary> + ''' <remarks></remarks> + <Global.Microsoft.VisualBasic.HideModuleName()> _ + Module MyWebExtension + Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.ServerComputer) + Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.WebUser) + Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.AspLog) + ''' <summary> + ''' Returns information about the host computer. + ''' </summary> + <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _ + Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.ServerComputer + Get + Return s_Computer.GetInstance() + End Get + End Property + ''' <summary> + ''' Returns information for the current Web user. + ''' </summary> + <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _ + Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.WebUser + Get + Return s_User.GetInstance() + End Get + End Property + ''' <summary> + ''' Returns Request object. + ''' </summary> + <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _ + <Global.System.ComponentModel.Design.HelpKeyword("My.Request")> _ + Friend ReadOnly Property Request() As Global.System.Web.HttpRequest + <Global.System.Diagnostics.DebuggerHidden()> _ + Get + Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current + If CurrentContext IsNot Nothing Then + Return CurrentContext.Request + End If + Return Nothing + End Get + End Property + ''' <summary> + ''' Returns Response object. + ''' </summary> + <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _ + <Global.System.ComponentModel.Design.HelpKeyword("My.Response")> _ + Friend ReadOnly Property Response() As Global.System.Web.HttpResponse + <Global.System.Diagnostics.DebuggerHidden()> _ + Get + Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current + If CurrentContext IsNot Nothing Then + Return CurrentContext.Response + End If + Return Nothing + End Get + End Property + ''' <summary> + ''' Returns the Asp log object. + ''' </summary> + <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _ + Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.AspLog + Get + Return s_Log.GetInstance() + End Get + End Property + End Module +End Namespace + +#End If
\ No newline at end of file |