示例#1
0
		// 释放时移除标记的 RunMode 模式
		void IDisposable.Dispose()
		{
			// AppAgentScope 释放时,移除当前业务块,恢复上层业务块
			AppAgentScope.current = this.previous;

			this.previous = null;
		}
示例#2
0
		private AppAgentScope(string name, string version, string platform, bool isMobileDevice, string mobileDeviceManufacturer, string mobileDeviceModel, string mobileDeviceId)
		{
			this.name = name;
			this.version = version;
			this.platform = platform;
			this.isMobileDevice = isMobileDevice;
			this.mobileDeviceModel = mobileDeviceModel;
			this.mobileDeviceManufacturer = mobileDeviceManufacturer;
			this.mobileDeviceId = mobileDeviceId;

			// 通过线程相关的静态字段实现
			this.previous = AppAgentScope.current;

			AppAgentScope.current = this;
		}