/// <summary>
        /// Updates some object attributes to the server.
        /// </summary>
        /// <param name="whatAttributes">A list with all the object attributes to be updated to the server.</param>
        /// <param name="results">A list with the result of the update for each object attribute. </param>
        /// <param name="executionOptions">Specifies the modality of execution for updating attributes to a server.</param>
        /// <returns>The result of updating attributes to a server.</returns>
        /// <include
        ///  file='TBNC.doc.xml'
        ///  path='//class[@name="ObjectSpaceElement"]/method[@name="SetAttributesToServer"]/doc/*'
        /// />
        public virtual int SetAttributesToServer(
            EnumObjectAttribute[] whatAttributes,
            out int[] results,
            ExecutionOptions executionOptions)
        {
            int res = (int)EnumResultCode.E_FAIL;

            results = null;
            try
            {
                OTCExecutionOptions options = new OTCExecutionOptions();

                if (executionOptions != null)
                {
                    options.m_executionType    = (byte)executionOptions.ExecutionType;
                    options.m_executionContext = (uint)executionOptions.ExecutionContext;
                }
                else
                {
                    options.m_executionType    = (byte)EnumExecutionType.SYNCHRONOUS;
                    options.m_executionContext = 0;
                }

                int    count = whatAttributes.Length;
                uint[] whatAttributesToChange = new uint[count];
                for (int i = 0; i < whatAttributes.Length; i++)
                {
                    whatAttributesToChange[i] = (uint)whatAttributes[i];
                }
                results = new int[count];
                res     = OTBFunctions.OTCUpdateAttributes(
                    this.Handle,
                    0,
                    (uint)count,
                    whatAttributesToChange,
                    results,
                    ref options);
            }
            catch (Exception exc)
            {
                Application.Instance.Trace(
                    EnumTraceLevel.ERR,
                    EnumTraceGroup.CLIENT,
                    "ObjectSpaceElement.SetAttributesToServer",
                    exc.ToString());
            }
            return(res);
        }