예제 #1
0
        /// <summary>
        ///     Set the current annotation.
        /// </summary>
        /// <param name="annotation">current annotation.</param>
        /// <returns>
        ///     TFERROR_INVALID_ANNOTATION if annotation is inconsistent with the settings or has invalid value set.
        ///     TFERROR_OK on success.
        /// </returns>
        public ErrorCode SetCurrentAnnotation(TAnnotation annotation)
        {
            if (MessageUtil.HasInvalidEnumField(annotation))
            {
                return(ErrorCode.InvalidAnnotation);
            }

            return(m_AdditionalLibraryMethods.SetCurrentAnnotation(annotation));
        }
        public ErrorCode SetFidelityParameters(TFidelity fidelityParams)
        {
            if (MessageUtil.HasInvalidEnumField(fidelityParams))
            {
                return(ErrorCode.InvalidFidelity);
            }
            var ps        = CProtobufSerialization.Create(fidelityParams);
            var errorCode = m_LibraryMethods.SetFidelityParameters(ref ps);

            CProtobufSerialization.CallDealloc(ref ps);
            return(errorCode);
        }
        public ErrorCode SetCurrentAnnotation(TAnnotation annotation)
        {
            if (MessageUtil.HasInvalidEnumField(annotation))
            {
                return(ErrorCode.InvalidAnnotation);
            }
            var ps        = CProtobufSerialization.Create(annotation);
            var errorCode = m_LibraryMethods.SetCurrentAnnotation(ref ps);

            CProtobufSerialization.CallDealloc(ref ps);
            return(errorCode);
        }