当前位置: 首页>>代码示例>>C#>>正文


C# MemberTracker.BindToInstance方法代码示例

本文整理汇总了C#中Microsoft.Scripting.Actions.MemberTracker.BindToInstance方法的典型用法代码示例。如果您正苦于以下问题:C# MemberTracker.BindToInstance方法的具体用法?C# MemberTracker.BindToInstance怎么用?C# MemberTracker.BindToInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.Scripting.Actions.MemberTracker的用法示例。


在下文中一共展示了MemberTracker.BindToInstance方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MakeGenericBody

        private void MakeGenericBody(SetOrDeleteMemberInfo memInfo, Expression instance, DynamicMetaObject target, Type type, MemberTracker tracker) {
            if (instance != null) {
                tracker = tracker.BindToInstance(instance);
            }

            Expression val = tracker.SetValue(memInfo.CodeContext, this, type, target.Expression);

            if (val != null) {
                memInfo.Body.FinishCondition(val);
            } else {
                memInfo.Body.FinishCondition(
                    MakeError(tracker.GetError(this), typeof(object))
                );
            }
        }
开发者ID:Hank923,项目名称:ironruby,代码行数:15,代码来源:DefaultBinder.SetMember.cs

示例2: MakeGenericBodyWorker

        private void MakeGenericBodyWorker(GetMemberInfo getMemInfo, Type type, MemberTracker tracker, Expression instance) {
            if (instance != null) {
                tracker = tracker.BindToInstance(instance);
            }

            Expression val = tracker.GetValue(getMemInfo.CodeContext, this, type);

            if (val != null) {
                getMemInfo.Body.FinishCondition(val);
            } else {
                ErrorInfo ei = tracker.GetError(this);
                if (ei.Kind != ErrorInfoKind.Success && getMemInfo.IsNoThrow) {
                    getMemInfo.Body.FinishCondition(MakeOperationFailed());
                } else {
                    getMemInfo.Body.FinishCondition(MakeError(tracker.GetError(this), typeof(object)));
                }
            }
        }
开发者ID:Hank923,项目名称:ironruby,代码行数:18,代码来源:DefaultBinder.GetMember.cs

示例3: MakeGenericBody

        private void MakeGenericBody(SetOrDeleteMemberInfo memInfo, DynamicMetaObject instance, DynamicMetaObject target, Type type, MemberTracker tracker, DynamicMetaObject errorSuggestion) {
            if (instance != null) {
                tracker = tracker.BindToInstance(instance);
            }

            DynamicMetaObject val = tracker.SetValue(memInfo.ResolutionFactory, this, type, target, errorSuggestion);

            if (val != null) {
                memInfo.Body.FinishCondition(val);
            } else {
                memInfo.Body.FinishCondition(
                    MakeError(tracker.GetError(this), typeof(object))
                );
            }
        }
开发者ID:BrianGenisio,项目名称:ironruby,代码行数:15,代码来源:DefaultBinder.SetMember.cs

示例4: MakeGenericBodyWorker

        private void MakeGenericBodyWorker(GetMemberInfo getMemInfo, Type type, MemberTracker tracker, Expression instance) {
            if (instance != null) {
                tracker = tracker.BindToInstance(instance);
            }

            Expression val = tracker.GetValue(getMemInfo.CodeContext, this, type);

            getMemInfo.Body.FinishCondition(
                val != null ?
                    val :
                    MakeError(tracker.GetError(this))
            );
        }
开发者ID:bclubb,项目名称:ironruby,代码行数:13,代码来源:DefaultBinder.GetMember.cs

示例5: MakeGenericBodyWorker

        private void MakeGenericBodyWorker(GetMemberInfo getMemInfo, Type type, MemberTracker tracker, DynamicMetaObject instance) {
            if (instance != null) {
                tracker = tracker.BindToInstance(instance);
            }

            DynamicMetaObject val = tracker.GetValue(getMemInfo.ResolutionFactory, this, type);

            if (val != null) {
                getMemInfo.Body.FinishCondition(val);
            } else {
                ErrorInfo ei = tracker.GetError(this);
                if (ei.Kind != ErrorInfoKind.Success && getMemInfo.IsNoThrow) {
                    getMemInfo.Body.FinishError(MakeOperationFailed());
                } else {
                    getMemInfo.Body.FinishError(MakeError(tracker.GetError(this), typeof(object)));
                }
            }
        }
开发者ID:jschementi,项目名称:iron,代码行数:18,代码来源:DefaultBinder.GetMember.cs


注:本文中的Microsoft.Scripting.Actions.MemberTracker.BindToInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。