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


C# SetMemberBinder.FallbackSetMember方法代碼示例

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


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

示例1: BindSetMember

            public override DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicMetaObject value) {
                var binderDefault = binder.FallbackSetMember(this, value);

                Expression expression = GetSetValueExpression(binder.Name, value.Value);

                var dynamicSuggestion = new DynamicMetaObject(expression, BindingRestrictions.GetTypeRestriction(Expression, LimitType)
                                                                                             .Merge(binderDefault.Restrictions));

                return binder.FallbackSetMember(this, value, dynamicSuggestion);
            }
開發者ID:jesshaw,項目名稱:ASP.NET-Mvc-3,代碼行數:10,代碼來源:DynamicDictionary.cs

示例2: BindSetMember

 public override DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicMetaObject value) {
     ContractUtils.RequiresNotNull(binder, "binder");
     return binder.FallbackSetMember(UnwrapSelf(), value);
 }
開發者ID:jschementi,項目名稱:iron,代碼行數:4,代碼來源:ComFallbackMetaObject.cs

示例3: BindSetMember

            public override DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicMetaObject value) {
                if (IsOverridden("TrySetMember")) {
                    return CallMethodReturnLast("TrySetMember", binder, NoArgs, value.Expression, (e) => binder.FallbackSetMember(this, value, e));
                }

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

示例4: BindSetMember

 /// <summary>
 /// Performs the binding of the dynamic set member operation. 
 /// </summary>
 /// <param name="binder">An instance of the <see cref="SetMemberBinder"/> that represents the details of the dynamic operation.</param>
 /// <param name="value">The <see cref="DynamicMetaObject"/> representing the value for the set member operation.</param>
 /// <returns>The new <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
 public virtual DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicMetaObject value) {
     ContractUtils.RequiresNotNull(binder, "binder");
     return binder.FallbackSetMember(this, value);
 }
開發者ID:joshholmes,項目名稱:ironruby,代碼行數:10,代碼來源:DynamicMetaObject.cs

示例5: BindSetMember

 public override DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicMetaObject value)
 {
     Fallback fallback = null;
     if (!this.IsOverridden("TrySetMember"))
     {
         return base.BindSetMember(binder, value);
     }
     if (fallback == null)
     {
         fallback = e => binder.FallbackSetMember(this, value, e);
     }
     return this.CallMethodReturnLast("TrySetMember", binder, GetArgs(new DynamicMetaObject[] { value }), fallback);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:13,代碼來源:DynamicObject.cs

示例6: BindSetMember

 /// <summary>
 ///     Performs the binding of the dynamic set member operation.
 /// </summary>
 /// <param name="binder">
 ///     An instance of the <see cref="T:System.Dynamic.SetMemberBinder" /> that represents the details of the dynamic operation.
 /// </param>
 /// <param name="value">
 ///     The <see cref="T:System.Dynamic.DynamicMetaObject" /> representing the value for the set member operation.
 /// </param>
 /// <returns>
 ///     The new <see cref="T:System.Dynamic.DynamicMetaObject" /> representing the result of the binding.
 /// </returns>
 public override DynamicMetaObject BindSetMember( SetMemberBinder binder, DynamicMetaObject value )
 {
     return ApplyBinding( meta => meta.BindSetMember( binder, value ),
                          ( target, errorSuggestion ) =>
                          binder.FallbackSetMember( target, value, errorSuggestion ) );
 }
開發者ID:idavis,項目名稱:Archetype,代碼行數:18,代碼來源:DelegatingMetaObject.cs

示例7: BindSetMember

 public override DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicMetaObject value)
 {
     return binder.FallbackSetMember(UnwrapSelf(), value);
 }
開發者ID:40a,項目名稱:PowerShell,代碼行數:4,代碼來源:ComFallbackMetaObject.cs

示例8: BindSetMember

 public override DynamicMetaObject BindSetMember( SetMemberBinder binder, DynamicMetaObject value )
 {
     return binder.FallbackSetMember( _baseMetaObject,
                                      AddTypeRestrictions( _metaObject.BindSetMember( binder, value ) ) );
 }
開發者ID:allenwgreaves,項目名稱:prototype.ps,代碼行數:5,代碼來源:Prototype.cs


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