Пример #1
0
		public UserData(CacheController invokeCacheController)
		{
			this.Usage = new Usage();
			this.CommandInvocations = new PipelineInvocationCollection();
			DataServiceController.Current.PerfCounters.ActiveUsers.Increment();
			this.invokeCacheController = invokeCacheController;
			this.invokeCacheController.RegisterCache(this.CommandInvocations);
		}
Пример #2
0
		protected void Dispose(bool disposing)
		{
			if (!this.disposed && disposing)
			{
				TraceHelper.Current.DebugMessage(string.Concat("Disposing user data. User data details ", this.ToString()));
				DataServiceController.Current.PerfCounters.ActiveUsers.Decrement();
				if (this.invokeCacheController != null)
				{
					this.invokeCacheController.UnregisterCache(this.CommandInvocations);
					this.invokeCacheController = null;
				}
				foreach (KeyValuePair<Guid, PipelineInvocation> list in this.CommandInvocations.ToList())
				{
					this.CommandInvocations.TryRemove(list.Key);
					list.Value.Dispose();
				}
				GC.SuppressFinalize(this);
				this.disposed = true;
			}
		}