/// <summary> /// Gets a reference to a path type of the specified kind. /// </summary> /// <param name="kind">Primitive kind of the type reference being created.</param> /// <param name="isNullable">Flag specifying if the referenced type should be nullable.</param> /// <returns>A new primitive type reference.</returns> public IEdmPathTypeReference GetPathType(EdmPathTypeKind kind, bool isNullable) { IEdmPathType pathDefinition = this.GetPathType(kind); if (pathDefinition != null) { return(new EdmPathTypeReference(pathDefinition, isNullable)); } else { throw new InvalidOperationException(Edm.Strings.EdmPath_UnexpectedKind); } }
/// <summary> /// Initializes a new instance of the <see cref="EdmCoreModelPathType"/> class. /// </summary> /// <param name="pathKind">The path kind.</param> public EdmCoreModelPathType(EdmPathTypeKind pathKind) { Name = pathKind.ToString(); PathKind = pathKind; }
/// <summary> /// Gets path type by kind. /// </summary> /// <param name="kind">Kind of the path type.</param> /// <returns>Path type definition.</returns> public IEdmPathType GetPathType(EdmPathTypeKind kind) { EdmCoreModelPathType definition; return(pathTypesByKind.TryGetValue(kind, out definition) ? definition : null); }
public void GetPathTypeKindShouldReturnCorrectPathTypeKind(string qualifiedName, EdmPathTypeKind kind) { Assert.Equal(kind, EdmCoreModel.Instance.GetPathTypeKind(qualifiedName)); }