コード例 #1
0
        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);
                }
            }
        }
コード例 #2
0
        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()));
            }
        }
コード例 #3
0
 internal override void RemoveProperty(StoragePropertyMapping prop)
 {
     m_properties.Remove(prop);
 }
コード例 #4
0
 /// <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);
 }
コード例 #5
0
 /// <summary>
 ///     Add a property mapping as a child of End property mapping
 /// </summary>
 public void AddProperty(StoragePropertyMapping prop)
 {
     m_properties.Add(prop);
 }
コード例 #6
0
        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);
                }
            }
        }
コード例 #7
0
 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);
 }
コード例 #9
0
 /// <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);
 }
コード例 #10
0
 public void RemoveProperty(StoragePropertyMapping prop)
 {
     m_properties.Remove(prop.EdmProperty.Name);
 }
コード例 #11
0
 internal abstract void RemoveProperty(StoragePropertyMapping propertyMapping);
コード例 #12
0
 internal abstract void AddProperty(StoragePropertyMapping propertyMapping);