PublishMyPresence() public method

Publish the presence of this node
public PublishMyPresence ( ) : void
return void
Exemplo n.º 1
0
		/// <summary>
		/// Validates loaded license
		/// </summary>
		public virtual void AssertValidLicense(Action onValidLicense)
		{
			LicenseAttributes.Clear();
			if (IsLicenseValid())
			{
				onValidLicense();

				if (MultipleLicenseUsageBehavior == MultipleLicenseUsage.AllowSameLicense)
					return;

				try
				{
					discoveryHost.Start();
				}
				catch (Exception e)
				{
					// we explicitly don't want bad things to happen if we can't do that
					Logger.ErrorException("Could not setup node discovery", e);
				}
				nextLeaseTimer = new Timer(LeaseLicenseAgain);

				discoveryClient = new DiscoveryClient(senderId, UserId, Environment.MachineName, Environment.UserName);
				discoveryClient.PublishMyPresence();
				return;
			}

			Logger.Warn("Could not validate existing license\r\n{0}", License);
			throw new LicenseNotFoundException("Could not find a valid license.");
		}
        /// <summary>
        /// Validates loaded license
        /// </summary>
        public virtual void AssertValidLicense()
        {
            LicenseAttributes.Clear();
            if (HasExistingLicense())
            {
                if (DiscoveryEnabled)
                {
                    discoveryClient = new DiscoveryClient(senderId, UserId, Environment.MachineName, Environment.UserName);
                    discoveryClient.PublishMyPresence();
                }
                return;
            }

            throw new LicenseNotFoundException();
        }
        /// <summary>
        /// Validates loaded license
        /// </summary>
        public virtual void AssertValidLicense()
        {
            LicenseAttributes.Clear();
            if (HasExistingLicense())
            {
                if (this.DiscoveryEnabled)
                {
                    discoveryClient = new DiscoveryClient(senderId, UserId, Environment.MachineName, Environment.UserName);
                    discoveryClient.PublishMyPresence();
                }
                return;
            }

            Log.WarnFormat("Could not validate existing license\r\n{0}", License);
            throw new LicenseNotFoundException();
        }