本文整理汇总了C#中MappingAction.MapToValueBase方法的典型用法代码示例。如果您正苦于以下问题:C# MappingAction.MapToValueBase方法的具体用法?C# MappingAction.MapToValueBase怎么用?C# MappingAction.MapToValueBase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MappingAction
的用法示例。
在下文中一共展示了MappingAction.MapToValueBase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CallActionForDNObject
/// <summary>
/// call the appropriate mapping action, if the CLS type is System.Object
/// </summary>
/// <returns>
/// an optional result of the mapping, some implementation of MappingAction will return null here
/// </returns>
private object CallActionForDNObject(ref Type clsType, ref AttributeExtCollection modifiedAttributes, MappingAction action) {
// distinguis the different cases here
Attribute typeAttr;
modifiedAttributes = modifiedAttributes.RemoveAttributeOfType(s_objectIdlTypeAttrType, out typeAttr);
IdlTypeObject oType = IdlTypeObject.Any;
if (typeAttr != null) {
oType = ((ObjectIdlTypeAttribute)typeAttr).IdlType;
}
switch (oType) {
case IdlTypeObject.Any:
return action.MapToIdlAny(clsType);
case IdlTypeObject.AbstractBase:
return action.MapToAbstractBase(clsType);
case IdlTypeObject.ValueBase:
return action.MapToValueBase(clsType);
default:
// unknown object attribute value: oType
throw new MARSHAL(18807, CompletionStatus.Completed_MayBe);
}
}