System.Dynamic.DynamicMetaObject.BindConvert C# (CSharp) Method

BindConvert() public method

Performs the binding of the dynamic conversion operation.
public BindConvert ( ConvertBinder binder ) : DynamicMetaObject
binder ConvertBinder An instance of the that represents the details of the dynamic operation.
return DynamicMetaObject
        public virtual DynamicMetaObject BindConvert(ConvertBinder binder)
        {
            ContractUtils.RequiresNotNull(binder, nameof(binder));
            return binder.FallbackConvert(this);
        }

Usage Example

Example #1
0
        /// <inheritdoc />
        /// <summary>
        ///     Performs the binding of the dynamic convert operation.
        /// </summary>
        /// <param name="target">The target of the dynamic convert operation.</param>
        /// <param name="args">An array of arguments of the dynamic convert operation.</param>
        /// <returns>The <see cref="DynamicMetaObject" /> representing the result of the binding.</returns>
        public sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
        {
            ContractUtils.RequiresNotNull(target, nameof(target));
            ContractUtils.Requires(args == null || args.Length == 0, nameof(args));

            return(target.BindConvert(this));
        }
All Usage Examples Of System.Dynamic.DynamicMetaObject::BindConvert