亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? systeminfo.cs

?? 詳細講述了數據庫編程
?? CS
?? 第 1 頁 / 共 3 頁
字號:
#region Copyright & License
//
// Copyright 2001-2006 The Apache Software Foundation
//
// Licensed 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.
//
#endregion

using System;
using System.Configuration;
using System.Reflection;
using System.Text;
using System.IO;
using System.Runtime.InteropServices;
using System.Collections;

namespace log4net.Util
{
	/// <summary>
	/// Utility class for system specific information.
	/// </summary>
	/// <remarks>
	/// <para>
	/// Utility class of static methods for system specific information.
	/// </para>
	/// </remarks>
	/// <author>Nicko Cadell</author>
	/// <author>Gert Driesen</author>
	/// <author>Alexey Solofnenko</author>
	public sealed class SystemInfo
	{
		#region Private Constants

		private const string DEFAULT_NULL_TEXT = "(null)";
		private const string DEFAULT_NOT_AVAILABLE_TEXT = "NOT AVAILABLE";

		#endregion

		#region Private Instance Constructors

		/// <summary>
		/// Private constructor to prevent instances.
		/// </summary>
		/// <remarks>
		/// <para>
		/// Only static methods are exposed from this type.
		/// </para>
		/// </remarks>
		private SystemInfo() 
		{
		}

		#endregion Private Instance Constructors

		#region Public Static Constructor

		/// <summary>
		/// Initialize default values for private static fields.
		/// </summary>
		/// <remarks>
		/// <para>
		/// Only static methods are exposed from this type.
		/// </para>
		/// </remarks>
		static SystemInfo()
		{
			string nullText = DEFAULT_NULL_TEXT;
			string notAvailableText = DEFAULT_NOT_AVAILABLE_TEXT;

#if !NETCF
			// Look for log4net.NullText in AppSettings
			string nullTextAppSettingsKey = SystemInfo.GetAppSetting("log4net.NullText");
			if (nullTextAppSettingsKey != null && nullTextAppSettingsKey.Length > 0)
			{
				LogLog.Debug("SystemInfo: Initializing NullText value to [" + nullTextAppSettingsKey + "].");
				nullText = nullTextAppSettingsKey;
			}

			// Look for log4net.NotAvailableText in AppSettings
			string notAvailableTextAppSettingsKey = SystemInfo.GetAppSetting("log4net.NotAvailableText");
			if (notAvailableTextAppSettingsKey != null && notAvailableTextAppSettingsKey.Length > 0)
			{
				LogLog.Debug("SystemInfo: Initializing NotAvailableText value to [" + notAvailableTextAppSettingsKey + "].");
				notAvailableText = notAvailableTextAppSettingsKey;
			}
#endif
			s_notAvailableText = notAvailableText;
			s_nullText = nullText;
		}

		#endregion

		#region Public Static Properties

		/// <summary>
		/// Gets the system dependent line terminator.
		/// </summary>
		/// <value>
		/// The system dependent line terminator.
		/// </value>
		/// <remarks>
		/// <para>
		/// Gets the system dependent line terminator.
		/// </para>
		/// </remarks>
		public static string NewLine
		{
			get
			{
#if NETCF
				return "\r\n";
#else
				return System.Environment.NewLine;
#endif
			}
		}

		/// <summary>
		/// Gets the base directory for this <see cref="AppDomain"/>.
		/// </summary>
		/// <value>The base directory path for the current <see cref="AppDomain"/>.</value>
		/// <remarks>
		/// <para>
		/// Gets the base directory for this <see cref="AppDomain"/>.
		/// </para>
		/// <para>
		/// The value returned may be either a local file path or a URI.
		/// </para>
		/// </remarks>
		public static string ApplicationBaseDirectory
		{
			get 
			{
#if NETCF
				return System.IO.Path.GetDirectoryName(SystemInfo.EntryAssemblyLocation) + System.IO.Path.DirectorySeparatorChar;
#else
				return AppDomain.CurrentDomain.BaseDirectory;
#endif
			}
		}

		/// <summary>
		/// Gets the path to the configuration file for the current <see cref="AppDomain"/>.
		/// </summary>
		/// <value>The path to the configuration file for the current <see cref="AppDomain"/>.</value>
		/// <remarks>
		/// <para>
		/// The .NET Compact Framework 1.0 does not have a concept of a configuration
		/// file. For this runtime, we use the entry assembly location as the root for
		/// the configuration file name.
		/// </para>
		/// <para>
		/// The value returned may be either a local file path or a URI.
		/// </para>
		/// </remarks>
		public static string ConfigurationFileLocation
		{
			get 
			{
#if NETCF
				return SystemInfo.EntryAssemblyLocation+".config";
#else
				return System.AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
#endif
			}
		}

		/// <summary>
		/// Gets the path to the file that first executed in the current <see cref="AppDomain"/>.
		/// </summary>
		/// <value>The path to the entry assembly.</value>
		/// <remarks>
		/// <para>
		/// Gets the path to the file that first executed in the current <see cref="AppDomain"/>.
		/// </para>
		/// </remarks>
		public static string EntryAssemblyLocation
		{
			get 
			{
#if NETCF
				return SystemInfo.NativeEntryAssemblyLocation;
#else
				return System.Reflection.Assembly.GetEntryAssembly().Location;
#endif
			}
		}

		/// <summary>
		/// Gets the ID of the current thread.
		/// </summary>
		/// <value>The ID of the current thread.</value>
		/// <remarks>
		/// <para>
		/// On the .NET framework, the <c>AppDomain.GetCurrentThreadId</c> method
		/// is used to obtain the thread ID for the current thread. This is the 
		/// operating system ID for the thread.
		/// </para>
		/// <para>
		/// On the .NET Compact Framework 1.0 it is not possible to get the 
		/// operating system thread ID for the current thread. The native method 
		/// <c>GetCurrentThreadId</c> is implemented inline in a header file
		/// and cannot be called.
		/// </para>
		/// <para>
		/// On the .NET Framework 2.0 the <c>Thread.ManagedThreadId</c> is used as this
		/// gives a stable id unrelated to the operating system thread ID which may 
		/// change if the runtime is using fibers.
		/// </para>
		/// </remarks>
		public static int CurrentThreadId
		{
			get 
			{
#if NETCF
				return System.Threading.Thread.CurrentThread.GetHashCode();
#elif NET_2_0
				return System.Threading.Thread.CurrentThread.ManagedThreadId;
#else
				return AppDomain.GetCurrentThreadId();
#endif
			}
		}

		/// <summary>
		/// Get the host name or machine name for the current machine
		/// </summary>
		/// <value>
		/// The hostname or machine name
		/// </value>
		/// <remarks>
		/// <para>
		/// Get the host name or machine name for the current machine
		/// </para>
		/// <para>
		/// The host name (<see cref="System.Net.Dns.GetHostName"/>) or
		/// the machine name (<c>Environment.MachineName</c>) for
		/// the current machine, or if neither of these are available
		/// then <c>NOT AVAILABLE</c> is returned.
		/// </para>
		/// </remarks>
		public static string HostName
		{
			get
			{
				if (s_hostName == null)
				{

					// Get the DNS host name of the current machine
					try
					{
						// Lookup the host name
						s_hostName = System.Net.Dns.GetHostName();
					}
					catch(System.Net.Sockets.SocketException)
					{
					}
					catch(System.Security.SecurityException)
					{
						// We may get a security exception looking up the hostname
						// You must have Unrestricted DnsPermission to access resource
					}

					// Get the NETBIOS machine name of the current machine
					if (s_hostName == null || s_hostName.Length == 0)
					{
						try
						{
#if (!SSCLI && !NETCF)
							s_hostName = Environment.MachineName;
#endif
						}
						catch(InvalidOperationException)
						{
						}
						catch(System.Security.SecurityException)
						{
							// We may get a security exception looking up the machine name
							// You must have Unrestricted EnvironmentPermission to access resource
						}
					}

					// Couldn't find a value
					if (s_hostName == null || s_hostName.Length == 0)
					{
						s_hostName = s_notAvailableText;
					}
				}
				return s_hostName;
			}
		}

		/// <summary>
		/// Get this application's friendly name
		/// </summary>
		/// <value>
		/// The friendly name of this application as a string
		/// </value>
		/// <remarks>
		/// <para>
		/// If available the name of the application is retrieved from
		/// the <c>AppDomain</c> using <c>AppDomain.CurrentDomain.FriendlyName</c>.
		/// </para>
		/// <para>
		/// Otherwise the file name of the entry assembly is used.
		/// </para>
		/// </remarks>
		public static string ApplicationFriendlyName
		{
			get
			{
				if (s_appFriendlyName == null)
				{
					try
					{
#if !NETCF
						s_appFriendlyName = AppDomain.CurrentDomain.FriendlyName;
#endif
					}
					catch(System.Security.SecurityException)
					{
						// This security exception will occur if the caller does not have 
						// some undefined set of SecurityPermission flags.
						LogLog.Debug("SystemInfo: Security exception while trying to get current domain friendly name. Error Ignored.");
					}

					if (s_appFriendlyName == null || s_appFriendlyName.Length == 0)
					{
						try
						{
							string assemblyLocation = SystemInfo.EntryAssemblyLocation;
							s_appFriendlyName = System.IO.Path.GetFileName(assemblyLocation);
						}
						catch(System.Security.SecurityException)
						{
							// Caller needs path discovery permission
						}
					}

					if (s_appFriendlyName == null || s_appFriendlyName.Length == 0)
					{
						s_appFriendlyName = s_notAvailableText;
					}
				}
				return s_appFriendlyName;
			}
		}

		/// <summary>
		/// Get the start time for the current process.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This is the time at which the log4net library was loaded into the
		/// AppDomain. Due to reports of a hang in the call to <c>System.Diagnostics.Process.StartTime</c>
		/// this is not the start time for the current process.
		/// </para>
		/// <para>
		/// The log4net library should be loaded by an application early during its
		/// startup, therefore this start time should be a good approximation for
		/// the actual start time.
		/// </para>
		/// <para>
		/// Note that AppDomains may be loaded and unloaded within the
		/// same process without the process terminating, however this start time
		/// will be set per AppDomain.
		/// </para>
		/// </remarks>
		public static DateTime ProcessStartTime
		{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区91精品张津瑜| 中文字幕一区二区视频| 亚洲成av人片| 欧美日韩一区高清| 婷婷久久综合九色综合绿巨人| 欧美日韩成人高清| 蜜桃视频在线观看一区| 久久久久久久久久久久久久久99 | 国产精品美女久久久久av爽李琼| 不卡在线视频中文字幕| 一区二区日韩电影| 欧美一区二区三区思思人| 国产中文字幕一区| 亚洲另类春色国产| 91精品在线观看入口| 国内久久婷婷综合| 亚洲女人****多毛耸耸8| 欧美日本乱大交xxxxx| 国产麻豆成人精品| 亚洲蜜桃精久久久久久久| 欧美高清视频在线高清观看mv色露露十八| 日韩专区一卡二卡| 国产欧美日韩不卡免费| 91免费视频网址| 五月激情六月综合| 国产欧美日韩中文久久| 欧美在线免费视屏| 激情成人午夜视频| 亚洲免费在线看| 日韩美女天天操| 91伊人久久大香线蕉| 日产国产高清一区二区三区| 中文字幕国产一区二区| 欧美日韩精品一区二区三区 | jlzzjlzz亚洲日本少妇| 欧美成人免费网站| 91尤物视频在线观看| 另类小说欧美激情| 亚洲精品免费一二三区| 久久综合成人精品亚洲另类欧美 | 狠狠色丁香婷婷综合| 日韩美女视频19| 精品国产成人系列| 欧美日韩一区三区| 99热国产精品| 国内外精品视频| 日韩和的一区二区| **欧美大码日韩| 久久免费精品国产久精品久久久久| 欧美影视一区在线| 成人aa视频在线观看| 韩日av一区二区| 视频一区二区不卡| 夜夜夜精品看看| 亚洲人快播电影网| 国产女人aaa级久久久级 | 丝袜美腿亚洲色图| 亚洲三级在线看| 国产精品另类一区| 久久久久久麻豆| 精品国产制服丝袜高跟| 欧美一卡2卡3卡4卡| 欧美色图一区二区三区| 在线欧美一区二区| 91行情网站电视在线观看高清版| 高清视频一区二区| 国产黄色成人av| 国产精品2024| 韩国v欧美v亚洲v日本v| 蜜桃精品视频在线| 免费欧美在线视频| 免费看欧美美女黄的网站| 五月综合激情网| 五月激情六月综合| 天天综合天天做天天综合| 一区二区三区四区五区视频在线观看 | 欧美日韩在线亚洲一区蜜芽| 色婷婷综合中文久久一本| 成人国产精品免费观看视频| 国内精品写真在线观看| 国产风韵犹存在线视精品| 国产精华液一区二区三区| 国产一区二三区| 国产一区在线视频| 国产激情视频一区二区三区欧美 | 中文字幕精品一区二区精品绿巨人| 久久久久国产精品厨房| 欧美精品一区二区三区高清aⅴ| 精品国产一区a| 久久久国产精品不卡| 国产亚洲欧美日韩在线一区| 国产日韩欧美电影| 亚洲色图第一区| 亚洲成a人片在线不卡一二三区| 亚洲国产精品久久艾草纯爱 | 国产欧美一区二区精品久导航| 日本一区二区三区国色天香| 日本一区二区成人| 一区二区在线免费观看| 亚洲午夜激情网站| 麻豆精品视频在线观看视频| 狠狠狠色丁香婷婷综合久久五月| 丁香另类激情小说| 欧美在线不卡视频| 91精品国产乱| 久久一二三国产| 亚洲视频精选在线| 日韩经典一区二区| 成人免费va视频| 欧美中文字幕一二三区视频| 欧美xfplay| 亚洲日本在线看| 美女在线视频一区| av不卡在线观看| 日韩视频免费观看高清在线视频| 亚洲国产成人私人影院tom| 亚洲国产裸拍裸体视频在线观看乱了| 久久精品国产网站| 一本在线高清不卡dvd| 精品成人一区二区三区四区| 亚洲精品中文在线| 国产最新精品精品你懂的| 91黄色在线观看| 亚洲国产精品v| 麻豆一区二区三| 91黄视频在线观看| 欧美国产精品中文字幕| 日韩av在线免费观看不卡| 99久久精品免费观看| 欧美电视剧免费全集观看| 亚洲精品成人在线| 国产精品一级在线| 91精品国产乱| 亚洲国产精品精华液网站| 成人国产精品视频| 精品国产乱码久久久久久闺蜜 | 久久先锋影音av鲁色资源| 亚洲v中文字幕| 91啪九色porn原创视频在线观看| 色又黄又爽网站www久久| 亚洲人成伊人成综合网小说| 蜜臀久久99精品久久久久久9| 99久久精品国产导航| 久久综合色天天久久综合图片| 亚洲最新在线观看| 99久久伊人网影院| 欧美国产日韩精品免费观看| 国产一区三区三区| 欧美电视剧免费观看| 视频一区二区三区入口| 精品视频在线看| 一区二区高清在线| 一本色道久久综合精品竹菊| 国产精品全国免费观看高清 | 久久嫩草精品久久久精品| 男男gaygay亚洲| 欧美一级黄色录像| 免费观看久久久4p| 9191国产精品| 日本午夜精品一区二区三区电影 | 久久国产精品无码网站| 91精品国产欧美一区二区成人| 图片区小说区区亚洲影院| 欧美日韩一区二区三区四区五区| 亚洲综合一区二区| 在线精品视频一区二区三四| 一区二区三区国产精品| 一本色道亚洲精品aⅴ| 亚洲影院理伦片| 欧美三级韩国三级日本一级| 亚洲国产精品一区二区久久恐怖片| 日本韩国欧美一区| 亚洲永久免费视频| 56国语精品自产拍在线观看| 视频在线观看一区二区三区| 日韩一区二区三区四区五区六区| 久久99久久99精品免视看婷婷| 欧美xxxx老人做受| 成人网页在线观看| 亚洲男同1069视频| 欧美日本免费一区二区三区| 老司机午夜精品| 国产精品入口麻豆九色| 欧美在线色视频| 麻豆中文一区二区| 国产午夜亚洲精品羞羞网站| www.综合网.com| 亚洲国产一区二区三区| 日韩一区二区三区四区| 国产精品小仙女| 夜色激情一区二区| 日韩欧美国产三级电影视频| 国产高清视频一区| 亚洲精品视频在线观看网站| 欧美区一区二区三区| 精品一区二区久久| 1000精品久久久久久久久| 欧美日韩亚洲不卡| 国产成人精品www牛牛影视| 亚洲精品乱码久久久久久黑人|