internal override bool ParseSingleElement(ICollection <XName> unprocessedElements, XElement elem) { if (elem.Name.LocalName == EntitySetMapping.ElementName) { var esm = new EntitySetMapping(this, elem); _entitySetMappings.Add(esm); esm.Parse(unprocessedElements); } else if (elem.Name.LocalName == AssociationSetMapping.ElementName) { var asm = new AssociationSetMapping(this, elem); _associationSetMappings.Add(asm); asm.Parse(unprocessedElements); } else if (elem.Name.LocalName == FunctionImportMapping.ElementName) { var fim = new FunctionImportMapping(this, elem); _functionImportMappings.Add(fim); fim.Parse(unprocessedElements); } else { return(base.ParseSingleElement(unprocessedElements, elem)); } return(true); }
/// <summary> /// Creates new ComplexTypeMapping inside specified FunctionImportMapping /// </summary> /// <param name="createFunctionImportMapping"></param> /// <param name="complexType"></param> internal CreateFunctionImportTypeMappingCommand( FunctionImportMapping functionImportMapping, CreateComplexTypeCommand createComplexTypeCmd) : base(PrereqId) { CommandValidation.ValidateFunctionImportMapping(functionImportMapping); _functionImportMapping = functionImportMapping; AddPreReqCommand(createComplexTypeCmd); }
/// <summary> /// Creates new ComplexTypeMapping inside specified FunctionImportMapping /// </summary> /// <param name="functionImportMapping"></param> /// <param name="complexType"></param> internal CreateFunctionImportTypeMappingCommand(FunctionImportMapping functionImportMapping, ComplexType complexType) : base(PrereqId) { CommandValidation.ValidateFunctionImportMapping(functionImportMapping); CommandValidation.ValidateComplexType(complexType); _functionImportMapping = functionImportMapping; _complexType = complexType; }
/// <summary> /// Creates new EntityTypeMapping inside specified FunctionImportMapping /// </summary> /// <param name="functionImportMapping"></param> /// <param name="entityType"></param> internal CreateFunctionImportTypeMappingCommand(FunctionImportMapping functionImportMapping, EntityType entityType) : base(PrereqId) { CommandValidation.ValidateFunctionImportMapping(functionImportMapping); CommandValidation.ValidateEntityType(entityType); _functionImportMapping = functionImportMapping; _entityType = entityType; }
protected override void InvokeInternal(CommandProcessorContext cpc) { // safety check, this should never be hit Debug.Assert( _function != null && _functionImport != null, "InvokeInternal is called when _function or _function import is null."); if (_function == null || _functionImport == null) { throw new InvalidOperationException("InvokeInternal is called when _function or _function import is null."); } _fim = _functionImport.FunctionImportMapping; _fim.FunctionName.SetRefName(_function); XmlModelHelper.NormalizeAndResolve(_fim); }
internal void AddFunctionImportMapping(FunctionImportMapping fim) { _functionImportMappings.Add(fim); }
protected override void InvokeInternal(CommandProcessorContext cpc) { // safety check, this should never be hit Debug.Assert( Function != null && FunctionImport != null && ContainerMapping != null, "InvokeInternal is called when Function or FunctionImport or ContainerMapping is null."); if (Function == null || FunctionImport == null || ContainerMapping == null) { throw new InvalidOperationException("InvokeInternal is called when Function or FunctionImport or ContainerMapping is null."); } _fim = new FunctionImportMapping(ContainerMapping, null); _fim.FunctionImportName.SetRefName(FunctionImport); _fim.FunctionName.SetRefName(Function); ContainerMapping.AddFunctionImportMapping(_fim); XmlModelHelper.NormalizeAndResolve(_fim); }
internal ResultMapping(FunctionImportMapping parent, XElement element) : base(parent, element) { }
public MappingFunctionImport(EditingContext context, FunctionImportMapping functionImportMapping, MappingEFElement parent) : base(context, functionImportMapping, parent) { }
protected override void ProcessPreReqCommands() { var preregCommand1 = GetPreReqCommand(CreateFunctionImportMappingCommand.PrereqId) as CreateFunctionImportMappingCommand; if (preregCommand1 != null) { _functionImportMapping = preregCommand1.FunctionImportMapping; Debug.Assert( _functionImportMapping != null, "CreateFunctionImportMappingCommand command return null value of _functionImportMapping"); } var preregCommand2 = GetPreReqCommand(CreateComplexTypeCommand.PrereqId) as CreateComplexTypeCommand; if (preregCommand2 != null) { _complexType = preregCommand2.ComplexType; Debug.Assert(_complexType != null, "CreateComplexTypeCommand command return null value of ComplexType"); } }
internal ResultMapping(FunctionImportMapping parent, XElement element) : base(parent, element) { }
internal static void ValidateFunctionImportMapping(FunctionImportMapping functionImportMapping) { ValidateEFElement(functionImportMapping); }
/// <summary> /// Delete the passed in function import mapping /// </summary> /// <param name="fim"></param> internal DeleteFunctionImportMappingCommand(FunctionImportMapping fim) : base(fim) { CommandValidation.ValidateFunctionImportMapping(fim); }