public bool TryGetEntitySet(string name, out CustomEntitySetType entitySet) { CustomUtils.CheckArgumentNotNull(name, "name"); if (_entitySets.TryGetValue(name, out entitySet)) { return(true); } return(false); }
public void Add(CustomEntitySetType entitySet) { CustomEntitySetType otherEntitySet; if (_entitySets.TryGetValue(entitySet.Name, out otherEntitySet)) { throw new CustomMetadataException(String.Format( "EntitySet with the same name '{0}' has already been registred" + " as EntitySet for '{1}'", entitySet.Name, entitySet.BaseElementType )); } _entitySets[entitySet.Name] = entitySet; }
public void DefferedInitialization( bool isPrimaryEnd, CustomEntitySetType entitySetType, CustomEntityType entityType, CustomNavigationPropertyType relatedProperty, CustomMultiplicity multiplicity ) { Debug.Assert(!_readonly); _isPrimaryEnd = isPrimaryEnd; _entitySetType = entitySetType; _entityType = entityType; _relatedProperty = relatedProperty; _multiplicity = multiplicity; _readonly = true; }
public override bool Equals(object obj) { CustomEntitySetType other = obj as CustomEntitySetType; return(null == other ? false : Name.Equals(other.Name) && BaseElementType.Equals(other.BaseElementType)); }