Example #1
0
 public void Set(SessionModificationAddAttributeOptions other)
 {
     if (other != null)
     {
         m_ApiVersion      = SessionModification.SessionmodificationAddattributeApiLatest;
         SessionAttribute  = other.SessionAttribute;
         AdvertisementType = other.AdvertisementType;
     }
 }
        /// <summary>
        /// Associate an attribute with this session
        /// An attribute is something that may or may not be advertised with the session.
        /// If advertised, it can be queried for in a search, otherwise the data remains local to the client
        /// </summary>
        /// <param name="options">Options to set the attribute and its advertised state</param>
        /// <returns>
        /// <see cref="Result.Success" /> if setting this parameter was successful
        /// <see cref="Result.InvalidParameters" /> if the attribution is missing information or otherwise invalid
        /// <see cref="Result.IncompatibleVersion" /> if the API version passed in is incorrect
        /// </returns>
        public Result AddAttribute(SessionModificationAddAttributeOptions options)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <SessionModificationAddAttributeOptionsInternal, SessionModificationAddAttributeOptions>(ref optionsAddress, options);

            var funcResult = EOS_SessionModification_AddAttribute(InnerHandle, optionsAddress);

            Helper.TryMarshalDispose(ref optionsAddress);

            return(funcResult);
        }