Ejemplo n.º 1
0
		public void NetworkAnalysis(ServerContent server, ProfileNetwork profile)
		{
			if (server == null)
			{
				throw new NetworkException("The remote service isn't ready for profile network");
			}

			if (profile == ProfileNetwork.LIGHT)
			{
				taskNetwork = new ProfileNetworkLight(server);
			}
			else if (profile == ProfileNetwork.DEFAULT)
			{
				taskNetwork = new ProfileNetworkDefault(server);
			}
			else if (profile == ProfileNetwork.FULL)
			{
				taskNetwork = new ProfileNetworkFull(server);
			}

			EventIntercept();

			taskNetwork.Execute();
		}
Ejemplo n.º 2
0
		public void Destroy()
		{
			if (taskNetwork != null)
			{
				taskNetwork.Cancel();
				taskNetwork = null;
			}
		}