/// <summary> /// Initializes a new instance of the navigation property class /// </summary> /// <param name="name">name of the navigation property</param> /// <param name="typeUsage">TypeUsage object containing the navigation property type and its facets</param> /// <exception cref="System.ArgumentNullException">Thrown if name or typeUsage arguments are null</exception> /// <exception cref="System.ArgumentException">Thrown if name argument is empty string</exception> internal NavigationProperty(string name, TypeUsage typeUsage) : base(name, typeUsage) { EntityUtil.CheckStringArgument(name, "name"); EntityUtil.GenericCheckArgumentNull(typeUsage, "typeUsage"); _accessor = new NavigationPropertyAccessor(name); }
// ------------ // Constructors // ------------ /// <summary> /// Creates a navigation object with the given relationship /// name, role name for the source and role name for the /// destination. /// </summary> /// <param name="relationshipName">Canonical-space name of the relationship.</param> /// <param name="from">Name of the role which is the source of the navigation.</param> /// <param name="to">Name of the role which is the destination of the navigation.</param> /// <param name="fromAccessor">The navigation property which is the source of the navigation.</param> /// <param name="toAccessor">The navigation property which is the destination of the navigation.</param> internal RelationshipNavigation(string relationshipName, string from, string to, NavigationPropertyAccessor fromAccessor, NavigationPropertyAccessor toAccessor) { EntityUtil.CheckStringArgument(relationshipName, "relationshipName"); EntityUtil.CheckStringArgument(from, "from"); EntityUtil.CheckStringArgument(to, "to"); _relationshipName = relationshipName; _from = from; _to = to; _fromAccessor = fromAccessor; _toAccessor = toAccessor; }
internal void InitializeAccessors(NavigationPropertyAccessor fromAccessor, NavigationPropertyAccessor toAccessor) { _fromAccessor = fromAccessor; _toAccessor = toAccessor; }