private static string ToTraceString(this IEdmRowType type) { StringBuilder stringBuilder = new StringBuilder(EdmTypeKind.Row.ToString()); stringBuilder.Append('('); if (type.Properties().Any <IEdmProperty>()) { IEdmProperty edmProperty = type.Properties().Last <IEdmProperty>(); foreach (IEdmProperty edmProperty1 in type.Properties()) { if (edmProperty1 == null) { continue; } stringBuilder.Append(edmProperty1.ToTraceString()); if (edmProperty1.Equals(edmProperty)) { continue; } stringBuilder.Append(", "); } } stringBuilder.Append(')'); return(stringBuilder.ToString()); }
private static bool IsEquivalentTo(this IEdmRowType thisType, IEdmRowType otherType) { bool flag; if (thisType.DeclaredProperties.Count <IEdmProperty>() == otherType.DeclaredProperties.Count <IEdmProperty>()) { IEnumerator <IEdmProperty> enumerator = thisType.DeclaredProperties.GetEnumerator(); IEnumerator <IEdmProperty> enumerator1 = otherType.DeclaredProperties.GetEnumerator(); using (enumerator1) { while (enumerator1.MoveNext()) { IEdmProperty current = enumerator1.Current; enumerator.MoveNext(); if (enumerator.Current.DeclaringType.IsEquivalentTo(current.DeclaringType)) { continue; } flag = false; return(flag); } return(true); } return(flag); } else { return(false); } }
private static bool IsEquivalentTo(this IEdmRowType thisType, IEdmRowType otherType) { if (thisType.DeclaredProperties.Count() != otherType.DeclaredProperties.Count()) { return(false); } IEnumerator <IEdmProperty> thisTypePropertyEnumerator = thisType.DeclaredProperties.GetEnumerator(); foreach (IEdmProperty otherTypeProperty in otherType.DeclaredProperties) { thisTypePropertyEnumerator.MoveNext(); if (!((IEdmStructuralProperty)thisTypePropertyEnumerator.Current).IsEquivalentTo((IEdmStructuralProperty)otherTypeProperty)) { return(false); } } return(true); }
private static string ToTraceString(this IEdmRowType type) { StringBuilder sb = new StringBuilder(EdmTypeKind.Row.ToString()); sb.Append('('); if (type.Properties().Any()) { IEdmProperty lastProperty = type.Properties().Last(); foreach (IEdmProperty prop in type.Properties()) { if (prop != null) { sb.Append(prop.ToTraceString()); if (!prop.Equals(lastProperty)) { sb.Append(", "); } } } } sb.Append(')'); return(sb.ToString()); }
public static IEdmRowTypeReference ApplyType(this IEdmRowType rowType, bool isNullable) { EdmUtil.CheckArgumentNull <IEdmRowType>(rowType, "type"); return(new EdmRowTypeReference(rowType, isNullable)); }
protected override void ProcessRowType(IEdmRowType element) { this.schemaWriter.WriteRowTypeElementHeader(); base.ProcessRowType(element); this.schemaWriter.WriteEndElement(); }
public EdmRowTypeReference(IEdmRowType rowType, bool isNullable) : base(rowType, isNullable) { }
protected virtual void ProcessRowType(IEdmRowType definition) { this.ProcessElement(definition); this.ProcessStructuredType(definition); }
/// <summary> /// Initializes a new instance of the <see cref="EdmRowTypeReference"/> class. /// </summary> /// <param name="rowType">Type that describes this value.</param> /// <param name="isNullable">Denotes whether the type can be nullable.</param> public EdmRowTypeReference(IEdmRowType rowType, bool isNullable) : base(rowType, isNullable) { }
private static bool IsEquivalentTo(this IEdmRowType thisType, IEdmRowType otherType) { if (thisType.DeclaredProperties.Count() != otherType.DeclaredProperties.Count()) { return false; } IEnumerator<IEdmProperty> thisTypePropertyEnumerator = thisType.DeclaredProperties.GetEnumerator(); foreach (IEdmProperty otherTypeProperty in otherType.DeclaredProperties) { thisTypePropertyEnumerator.MoveNext(); if (!((IEdmStructuralProperty)thisTypePropertyEnumerator.Current).IsEquivalentTo((IEdmStructuralProperty)otherTypeProperty)) { return false; } } return true; }
private static bool IsEquivalentTo(this IEdmRowType thisType, IEdmRowType otherType) { bool flag; if (thisType.DeclaredProperties.Count<IEdmProperty>() == otherType.DeclaredProperties.Count<IEdmProperty>()) { IEnumerator<IEdmProperty> enumerator = thisType.DeclaredProperties.GetEnumerator(); IEnumerator<IEdmProperty> enumerator1 = otherType.DeclaredProperties.GetEnumerator(); using (enumerator1) { while (enumerator1.MoveNext()) { IEdmProperty current = enumerator1.Current; enumerator.MoveNext(); if (enumerator.Current.DeclaringType.IsEquivalentTo(current.DeclaringType)) { continue; } flag = false; return flag; } return true; } return flag; } else { return false; } }