private void WritePropertyMapping(StoragePropertyMapping propertyMapping) { var scalarPropertyMapping = propertyMapping as StorageScalarPropertyMapping; if (scalarPropertyMapping != null) { WritePropertyMapping(scalarPropertyMapping); } else { var complexPropertyMapping = propertyMapping as StorageComplexPropertyMapping; if (complexPropertyMapping != null) { WritePropertyMapping(complexPropertyMapping); } } }
protected virtual void Visit(StoragePropertyMapping storagePropertyMapping) { // this is a switching node, so no object header and footer will be add for this node, // also this Visit won't add the object to the seen list if (storagePropertyMapping.GetType() == typeof(StorageComplexPropertyMapping)) { Visit((StorageComplexPropertyMapping)storagePropertyMapping); } else if (storagePropertyMapping.GetType() == typeof(StorageConditionPropertyMapping)) { Visit((StorageConditionPropertyMapping)storagePropertyMapping); } else if (storagePropertyMapping.GetType() == typeof(StorageScalarPropertyMapping)) { Visit((StorageScalarPropertyMapping)storagePropertyMapping); } else { Debug.Fail( String.Format( CultureInfo.InvariantCulture, "Found type '{0}', did we add a new type?", storagePropertyMapping.GetType())); } }
internal override void RemoveProperty(StoragePropertyMapping prop) { m_properties.Remove(prop); }
/// <summary> /// Add a property mapping as a child of this mapping fragment /// </summary> /// <param name="propertyMapping"> child property mapping to be added </param> internal override void AddProperty(StoragePropertyMapping propertyMapping) { m_properties.Add(propertyMapping); }
/// <summary> /// Add a property mapping as a child of End property mapping /// </summary> public void AddProperty(StoragePropertyMapping prop) { m_properties.Add(prop); }
private void WritePropertyMapping(StoragePropertyMapping propertyMapping) { DebugCheck.NotNull(propertyMapping); var scalarPropertyMapping = propertyMapping as StorageScalarPropertyMapping; if (scalarPropertyMapping != null) { WritePropertyMapping(scalarPropertyMapping); } else { var complexPropertyMapping = propertyMapping as StorageComplexPropertyMapping; if (complexPropertyMapping != null) { WritePropertyMapping(complexPropertyMapping); } } }
protected override void Visit(StoragePropertyMapping storagePropertyMapping) { base.Visit(storagePropertyMapping); }
private static DbExpression GeneratePropertyMappingView(StoragePropertyMapping mapping, DbExpression row) { Debug.Assert(mapping is StorageScalarPropertyMapping, "Complex property mapping is not supported in function imports."); var scalarPropertyMapping = (StorageScalarPropertyMapping)mapping; return GenerateScalarPropertyMappingView(scalarPropertyMapping.EdmProperty, scalarPropertyMapping.ColumnProperty, row); }
/// <summary> /// Add a property mapping as a child of End property mapping /// </summary> /// <param name="prop"> </param> internal void AddProperty(StoragePropertyMapping prop) { m_properties.Add(prop); }
public void RemoveProperty(StoragePropertyMapping prop) { m_properties.Remove(prop.EdmProperty.Name); }
internal abstract void RemoveProperty(StoragePropertyMapping propertyMapping);
internal abstract void AddProperty(StoragePropertyMapping propertyMapping);