コード例 #1
0
        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);
        }
        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);
        }
コード例 #3
0
 public MappingFunctionImportScalarProperty(EditingContext context, FunctionImportScalarProperty sp, MappingEFElement parent)
     : base(context, sp, parent)
 {
     Debug.Assert(sp != null, "FunctionImportScalarProperty shouldn't be null");
 }
コード例 #4
0
 public MappingFunctionImportScalarProperty(EditingContext context, FunctionImportScalarProperty sp, MappingEFElement parent)
     : base(context, sp, parent)
 {
     Debug.Assert(sp != null, "FunctionImportScalarProperty shouldn't be null");
 }
コード例 #5
0
 internal void AddScalarProperty(FunctionImportScalarProperty scalarProperty)
 {
     _scalarProperties.Add(scalarProperty);
 }
コード例 #6
0
 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;
 }