Пример #1
0
        /// <summary>
        /// Adds user presence to event. This corresponds to the
        /// event.addPresence Hyves method.
        /// </summary>
        /// <param name="eventId">The identifier of the event.</param>
        /// <param name="visibility">The visibility of the event presence.</param>
        /// <returns><b>True</b> if successful; otherwise <b>false</b>.</returns>
        public bool AddPresence(string eventId, HyvesEventPrecenseVisibility visibility)
        {
            if (string.IsNullOrEmpty(eventId))
            {
                throw new ArgumentException("eventId");
            }

            HyvesRequest request = new HyvesRequest(this.session);

            request.Parameters["eventid"]    = eventId;
            request.Parameters["visibility"] = EnumHelper.GetDescription(visibility);

            HyvesResponse response = request.InvokeMethod(HyvesMethod.EventsAddPresence);

            return(response.Status == HyvesResponseStatus.Succeeded);
        }
    /// <summary>
    /// Adds user presence to event. This corresponds to the
    /// event.addPresence Hyves method.
		/// </summary>
    /// <param name="eventId">The identifier of the event.</param>
		/// <param name="visibility">The visibility of the event presence.</param>
    /// <returns><b>True</b> if successful; otherwise <b>false</b>.</returns>
    public bool AddPresence(string eventId, HyvesEventPrecenseVisibility visibility)
		{
      if (string.IsNullOrEmpty(eventId))
			{
        throw new ArgumentException("eventId");
			}

			HyvesRequest request = new HyvesRequest(this.session);
      request.Parameters["eventid"] = eventId;
      request.Parameters["visibility"] = EnumHelper.GetDescription(visibility);

			HyvesResponse response = request.InvokeMethod(HyvesMethod.EventsAddPresence);
			return response.Status == HyvesResponseStatus.Succeeded;
		}