src/Shared/EntityFramework/Infrastructure/Annotations/IndexAnnotationSerializer.cs
/// <summary>
///     Serializes the given <see cref="IndexAnnotation" /> into a string for storage in the EDMX XML.
/// </summary>
/// <param name="name">The name of the annotation that is being serialized.</param>
/// <param name="value">The value to serialize which must be an IndexAnnotation object.</param>
/// <returns>The serialized value.</returns>
Serializes the given  into a string for storage in the EDMX XML.
Serializes the given into a string for storage in the EDMX XML .
public virtual string Serialize(string name, object value)
        {
            Check.NotEmpty(name, "name");
            Check.NotNull(value, "value");
            var annotation = value as IndexAnnotation;
            if (annotation == null)
            {
                throw new ArgumentException(
                    Strings.AnnotationSerializeWrongType(
                        value.GetType().Name, typeof(IndexAnnotationSerializer).Name, typeof(IndexAnnotation).Name));
            }
            var stringBuilder = new StringBuilder();
            foreach (var index in annotation.Indexes)
            {
                stringBuilder.Append(SerializeIndexAttribute(index));
            }
            return stringBuilder.ToString();
        }
public virtual string Serialize ( string name , object value ) { Check . NotEmpty ( name , " " ) ; Check . NotNull ( value , " " ) ; var annotation = value as IndexAnnotation ; if ( annotation == null ) { throw new ArgumentException ( Strings . AnnotationSerializeWrongType ( value . GetType ( ) . Name , typeof ( IndexAnnotationSerializer ) . Name , typeof ( IndexAnnotation ) . Name ) ) ; } var stringBuilder = new StringBuilder ( ) ; foreach ( var index in annotation . Indexes ) { stringBuilder . Append ( SerializeIndexAttribute ( index ) ) ; } return stringBuilder . ToString ( ) ; }
Serializes the given  into a string for storage in the EDMX XML.
Serializes the given into a string for storage in the EDMX XML .
The serialized value.
The serialized value .
name
string
The name of the annotation that is being serialized.
The name of the annotation that is being serialized .
value
object
The value to serialize which must be an IndexAnnotation object.
The value to serialize which must be an IndexAnnotation object .