'----------------------------------------------------------------------------------- ' Licensed to the Apache Software Foundation (ASF) under one ' or more contributor license agreements. See the NOTICE file ' distributed with this work for additional information ' regarding copyright ownership. The ASF licenses this file ' to you under the Apache License, Version 2.0 (the ' "License"); you may not use this file except in compliance ' with the License. You may obtain a copy of the License at ' ' http://www.apache.org/licenses/LICENSE-2.0 ' ' Unless required by applicable law or agreed to in writing, ' software distributed under the License is distributed on an ' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ' KIND, either express or implied. See the License for the ' specific language governing permissions and limitations ' under the License. '----------------------------------------------------------------------------------- #If _MyType <> "Empty" Then Namespace My ''' ''' Module used to define the properties that are available in the My Namespace for Web projects. ''' ''' _ 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) ''' ''' Returns information about the host computer. ''' _ Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.ServerComputer Get Return s_Computer.GetInstance() End Get End Property ''' ''' Returns information for the current Web user. ''' _ Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.WebUser Get Return s_User.GetInstance() End Get End Property ''' ''' Returns Request object. ''' _ _ Friend ReadOnly Property Request() As Global.System.Web.HttpRequest _ 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 ''' ''' Returns Response object. ''' _ _ Friend ReadOnly Property Response() As Global.System.Web.HttpResponse _ 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 ''' ''' Returns the Asp log object. ''' _ 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