當前位置: 首頁>>代碼示例>>C#>>正文


C# GetIndexBinder.FallbackGetIndex方法代碼示例

本文整理匯總了C#中System.Dynamic.GetIndexBinder.FallbackGetIndex方法的典型用法代碼示例。如果您正苦於以下問題:C# GetIndexBinder.FallbackGetIndex方法的具體用法?C# GetIndexBinder.FallbackGetIndex怎麽用?C# GetIndexBinder.FallbackGetIndex使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Dynamic.GetIndexBinder的用法示例。


在下文中一共展示了GetIndexBinder.FallbackGetIndex方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: BindGetIndex

 public override DynamicMetaObject BindGetIndex(GetIndexBinder binder, DynamicMetaObject[] indexes) {
     ContractUtils.RequiresNotNull(binder, "binder");
     return binder.FallbackGetIndex(UnwrapSelf(), indexes);
 }
開發者ID:jschementi,項目名稱:iron,代碼行數:4,代碼來源:ComFallbackMetaObject.cs

示例2: BindGetIndex

 /// <summary>
 /// Performs the binding of the dynamic get index operation.
 /// </summary>
 /// <param name="binder">An instance of the <see cref="GetIndexBinder"/> that represents the details of the dynamic operation.</param>
 /// <param name="indexes">An array of <see cref="DynamicMetaObject"/> instances - indexes for the get index operation.</param>
 /// <returns>The new <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
 public virtual DynamicMetaObject BindGetIndex(GetIndexBinder binder, DynamicMetaObject[] indexes) {
     ContractUtils.RequiresNotNull(binder, "binder");
     return binder.FallbackGetIndex(this, indexes);
 }
開發者ID:joshholmes,項目名稱:ironruby,代碼行數:10,代碼來源:DynamicMetaObject.cs

示例3: BindGetIndex

            public override DynamicMetaObject BindGetIndex(GetIndexBinder binder, DynamicMetaObject[] indexes) {
                if (IsOverridden("TryGetIndex")) {
                    return CallMethodWithResult("TryGetIndex", binder, DynamicMetaObject.GetExpressions(indexes), (e) => binder.FallbackGetIndex(this, indexes, e));
                }

                return base.BindGetIndex(binder, indexes);
            }
開發者ID:iskiselev,項目名稱:JSIL.NetFramework,代碼行數:7,代碼來源:DynamicObject.cs

示例4: BindGetIndex

            public override DynamicMetaObject BindGetIndex(GetIndexBinder binder, DynamicMetaObject[] indexes)
            {
                var index = _type.GetIndex(binder.CallInfo.ArgumentCount);
                if (index != null && index.Getters != null)
                {
                    return TotemProtocol.ResolveOverload(
                        binder,
                        _type,
                        binder.CallInfo,
                        _type.Name + ".<get_index>",
                        index.Getters,
                        this,
                        indexes
                    );
                }

                var fallback = binder.FallbackGetIndex(this, indexes);
                BindingRestrictions restrictions = fallback.Restrictions.Merge(BindingRestrictions.GetTypeRestriction(Expression, LimitType));
                foreach (var arg in indexes)
                    restrictions = restrictions.Merge(BindingRestrictions.GetTypeRestriction(arg.Expression, arg.LimitType));

                return new DynamicMetaObject(
                    AssertImplemented(
                        Expression.Call(
                            Expression.Constant(_type, typeof(TotemType)),
                            TotemType.GetMissingIndexInfo,
                            Expression,
                            Expression.NewArrayInit(
                                typeof(object),
                                ArrayUtils.ConvertAll(indexes, i => i.Expression)
                            )
                        ),
                        fallback.Expression
                    ),
                    restrictions
                );
            }
開發者ID:Alxandr,項目名稱:IronTotem,代碼行數:37,代碼來源:TotemType.cs

示例5: BindGetIndex

 public override DynamicMetaObject BindGetIndex(GetIndexBinder binder, DynamicMetaObject[] indexes)
 {
     Fallback fallback = null;
     if (!this.IsOverridden("TryGetIndex"))
     {
         return base.BindGetIndex(binder, indexes);
     }
     if (fallback == null)
     {
         fallback = e => binder.FallbackGetIndex(this, indexes, e);
     }
     return this.CallMethodWithResult("TryGetIndex", binder, GetArgArray(indexes), fallback);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:13,代碼來源:DynamicObject.cs

示例6: BindGetIndex

 /// <summary>
 ///     Performs the binding of the dynamic get index operation.
 /// </summary>
 /// <param name="binder">
 ///     An instance of the <see cref="T:System.Dynamic.GetIndexBinder" /> that represents the details of the dynamic operation.
 /// </param>
 /// <param name="indexes">
 ///     An array of <see cref="T:System.Dynamic.DynamicMetaObject" /> instances - indexes for the get index operation.
 /// </param>
 /// <returns>
 ///     The new <see cref="T:System.Dynamic.DynamicMetaObject" /> representing the result of the binding.
 /// </returns>
 public override DynamicMetaObject BindGetIndex( GetIndexBinder binder, DynamicMetaObject[] indexes )
 {
     return ApplyBinding( meta => meta.BindGetIndex( binder, indexes ),
                          ( target, errorSuggestion ) =>
                          binder.FallbackGetIndex( target, indexes, errorSuggestion ) );
 }
開發者ID:idavis,項目名稱:Archetype,代碼行數:18,代碼來源:DelegatingMetaObject.cs

示例7: BindGetIndex

 public override DynamicMetaObject BindGetIndex(GetIndexBinder binder, DynamicMetaObject[] indexes)
 {
     return binder.FallbackGetIndex(UnwrapSelf(), indexes);
 }
開發者ID:40a,項目名稱:PowerShell,代碼行數:4,代碼來源:ComFallbackMetaObject.cs

示例8: BindGetIndex

 public override DynamicMetaObject BindGetIndex( GetIndexBinder binder, DynamicMetaObject[] indexes )
 {
     return binder.FallbackGetIndex( _baseMetaObject,
                                     indexes,
                                     AddTypeRestrictions( _metaObject.BindGetIndex( binder, indexes ) ) );
 }
開發者ID:allenwgreaves,項目名稱:prototype.ps,代碼行數:6,代碼來源:Prototype.cs


注:本文中的System.Dynamic.GetIndexBinder.FallbackGetIndex方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。