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