当前位置: 首页>>代码示例>>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;未经允许,请勿转载。