protected void TryAddContainer(SchemaType schemaType, bool doNotAddErrorForEmptyName) { SchemaManager.SchemaTypes.Add( schemaType, doNotAddErrorForEmptyName, Strings.EntityContainerAlreadyExists); SchemaTypes.Add(schemaType); }
protected void AddFunctionType(Function function) { var space = DataModel == SchemaDataModelOption.EntityDataModel ? "Conceptual" : "Storage"; if (SchemaVersion >= XmlConstants.EdmVersionForV2 && SchemaManager.SchemaTypes.ContainsKey(function.FQName)) { function.AddError( ErrorCode.AlreadyDefined, EdmSchemaErrorSeverity.Error, Strings.AmbiguousFunctionAndType(function.FQName, space)); } else { var error = SchemaManager.SchemaTypes.TryAdd(function); Debug.Assert(error != AddErrorKind.MissingNameError, "Function identity can never be null while adding global functions"); if (error != AddErrorKind.Succeeded) { function.AddError( ErrorCode.AlreadyDefined, EdmSchemaErrorSeverity.Error, Strings.AmbiguousFunctionOverload(function.FQName, space)); } else { SchemaTypes.Add(function); } } }
protected void TryAddType(SchemaType schemaType, bool doNotAddErrorForEmptyName) { SchemaManager.SchemaTypes.Add( schemaType, doNotAddErrorForEmptyName, Strings.TypeNameAlreadyDefinedDuplicate); SchemaTypes.Add(schemaType); }