예제 #1
0
        /// <summary>
        /// Gets the property value.
        /// </summary>
        /// <param name="name">The name of the property.</param>
        /// <param name="value">The value of the property.</param>
        /// <returns>True if the property of the specified name exists. Otherwise, false.</returns>
        public bool TryGetProperty(string name, out string value)
        {
            EnsureNotDisposed();

            value = OpenSlideInterop.GetPropertyValue(_handle, name);
            return(value != null);
        }
예제 #2
0
        /// <summary>
        /// Gets the property value.
        /// </summary>
        /// <param name="name">The name of the property.</param>
        /// <param name="value">The value of the property.</param>
        /// <returns>True if the property of the specified name exists. Otherwise, false.</returns>
        public bool TryGetProperty(string name, [NotNullWhen(true)] out string?value)
        {
            var handle = EnsureNotDisposed();

            value = OpenSlideInterop.GetPropertyValue(handle, name);
            return(!(value is null));
        }
예제 #3
0
        public string this[string name]
        {
            get
            {
                EnsureNotDisposed();

                string value = OpenSlideInterop.GetPropertyValue(_handle, name);
                ThrowHelper.CheckAndThrowError(_handle);
                return(value);
            }
        }