protected override void InvokeInternal(CommandProcessorContext cpc) { // safety check Debug.Assert( _typeMapping != null && _property != null && _columnName != null, "InvokeInternal is called when _typeMapping or _property or _columnName is null."); if (_typeMapping == null || _property == null || String.IsNullOrEmpty(_columnName)) { throw new InvalidOperationException("InvokeInternal is called when _typeMapping or _property or _columnName is null."); } _createdScalarProperty = new FunctionImportScalarProperty(_typeMapping, null); _createdScalarProperty.Name.SetRefName(_property); _createdScalarProperty.ColumnName.Value = _columnName; XmlModelHelper.NormalizeAndResolve(_createdScalarProperty); _typeMapping.AddScalarProperty(_createdScalarProperty); }
public MappingFunctionImportScalarProperty(EditingContext context, FunctionImportScalarProperty sp, MappingEFElement parent) : base(context, sp, parent) { Debug.Assert(sp != null, "FunctionImportScalarProperty shouldn't be null"); }
internal void AddScalarProperty(FunctionImportScalarProperty scalarProperty) { _scalarProperties.Add(scalarProperty); }
internal override bool ParseSingleElement(ICollection<XName> unprocessedElements, XElement elem) { if (elem.Name.LocalName == FunctionImportScalarProperty.ElementName) { var prop = new FunctionImportScalarProperty(this, elem); _scalarProperties.Add(prop); prop.Parse(unprocessedElements); } else { return base.ParseSingleElement(unprocessedElements, elem); } return true; }