public UnresolvedType(string qualifiedName, EdmLocation location) : base(new EdmError[] { new EdmError(location, EdmErrorCode.BadUnresolvedType, Strings.Bad_UnresolvedType(qualifiedName)) }) { string str = qualifiedName; string empty = str; if (str == null) { empty = string.Empty; } qualifiedName = empty; EdmUtil.TryGetNamespaceNameFromQualifiedName(qualifiedName, out this.namespaceName, out this.name); }
public UnresolvedFunction(string qualifiedName, string errorMessage, EdmLocation location) : base(new EdmError[] { new EdmError(location, EdmErrorCode.BadUnresolvedFunction, errorMessage) }) { string str = qualifiedName; string empty = str; if (str == null) { empty = string.Empty; } qualifiedName = empty; EdmUtil.TryGetNamespaceNameFromQualifiedName(qualifiedName, out this.namespaceName, out this.name); this.returnType = new BadTypeReference(new BadType(base.Errors), true); }
public UnresolvedParameter(IEdmFunctionBase declaringFunction, string name, EdmLocation location) : base(new EdmError[] { new EdmError(location, EdmErrorCode.BadUnresolvedParameter, Strings.Bad_UnresolvedParameter(name)) }) { this.type = new Cache<UnresolvedParameter, IEdmTypeReference>(); string str = name; string empty = str; if (str == null) { empty = string.Empty; } this.name = empty; this.declaringFunction = declaringFunction; }
public UnresolvedEnumMember(string name, IEdmEnumType declaringType, EdmLocation location) : base(new EdmError[] { new EdmError(location, EdmErrorCode.BadUnresolvedEnumMember, Strings.Bad_UnresolvedEnumMember(name)) }) { this.@value = new Cache<UnresolvedEnumMember, IEdmPrimitiveValue>(); UnresolvedEnumMember unresolvedEnumMember = this; string str = name; string empty = str; if (str == null) { empty = string.Empty; } unresolvedEnumMember.name = empty; this.declaringType = declaringType; }
private static bool TestNullabilityMatch(this IEdmTypeReference expressionType, IEdmTypeReference assertedType, EdmLocation location, out IEnumerable<EdmError> discoveredErrors) { if (assertedType.IsNullable || !expressionType.IsNullable) { discoveredErrors = Enumerable.Empty<EdmError>(); return true; } else { EdmError[] edmError = new EdmError[1]; edmError[0] = new EdmError(location, EdmErrorCode.CannotAssertNullableTypeAsNonNullableType, Strings.EdmModel_Validator_Semantic_CannotAssertNullableTypeAsNonNullableType(expressionType.FullName())); discoveredErrors = edmError; return false; } }
private static IEnumerable <EdmError> ConversionError(EdmLocation location, string typeName, string typeKindName) { EdmError[] edmErrorArray = new EdmError[1]; EdmError[] edmError = edmErrorArray; int num = 0; EdmLocation edmLocation = location; int num1 = 230; string str = typeName; object obj = str; if (str == null) { obj = "UnnamedType"; } edmError[num] = new EdmError(edmLocation, (EdmErrorCode)num1, Strings.TypeSemantics_CouldNotConvertTypeReference(obj, typeKindName)); return(edmErrorArray); }
private static bool TestTypeMatch(this IEdmTypeReference expressionType, IEdmTypeReference assertedType, EdmLocation location, out IEnumerable<EdmError> discoveredErrors) { if (expressionType.TestNullabilityMatch(assertedType, location, out discoveredErrors)) { if (expressionType.TypeKind() == EdmTypeKind.None || expressionType.IsBad()) { discoveredErrors = Enumerable.Empty<EdmError>(); return true; } else { if (!expressionType.IsPrimitive() || !assertedType.IsPrimitive()) { if (!expressionType.Definition.IsEquivalentTo(assertedType.Definition)) { EdmError[] edmError = new EdmError[1]; edmError[0] = new EdmError(location, EdmErrorCode.ExpressionNotValidForTheAssertedType, Strings.EdmModel_Validator_Semantic_ExpressionNotValidForTheAssertedType); discoveredErrors = edmError; return false; } } else { if (!expressionType.PrimitiveKind().PromotesTo(assertedType.AsPrimitive().PrimitiveKind())) { EdmError[] edmErrorArray = new EdmError[1]; edmErrorArray[0] = new EdmError(location, EdmErrorCode.ExpressionPrimitiveKindNotValidForAssertedType, Strings.EdmModel_Validator_Semantic_ExpressionPrimitiveKindCannotPromoteToAssertedType(expressionType.FullName(), assertedType.FullName())); discoveredErrors = edmErrorArray; return false; } } discoveredErrors = Enumerable.Empty<EdmError>(); return true; } } else { return false; } }
public void AddError(EdmLocation location, EdmErrorCode errorCode, string errorMessage) { this.AddError(new EdmError(location, errorCode, errorMessage)); }
public UnresolvedEntityContainer(string name, EdmLocation location) : base(name, new EdmError[] { new EdmError(location, EdmErrorCode.BadUnresolvedEntityContainer, Strings.Bad_UnresolvedEntityContainer(name)) }) { }
public EdmError(EdmLocation errorLocation, EdmErrorCode errorCode, string errorMessage) { this.ErrorLocation = errorLocation; this.ErrorCode = errorCode; this.ErrorMessage = errorMessage; }
public UnresolvedPrimitiveType(string qualifiedName, EdmLocation location) : base(qualifiedName, 0, new EdmError[] { new EdmError(location, EdmErrorCode.BadUnresolvedPrimitiveType, Strings.Bad_UnresolvedPrimitiveType(qualifiedName)) }) { }
private static IEnumerable <EdmError> ConversionError(EdmLocation location, string typeName, string typeKindName) { return(new[] { new EdmError(location, EdmErrorCode.TypeSemanticsCouldNotConvertTypeReference, Edm.Strings.TypeSemantics_CouldNotConvertTypeReference(typeName ?? EdmConstants.Value_UnnamedType, typeKindName)) }); }
public void JustDecompileGenerated_set_Location(EdmLocation value) { this.JustDecompileGenerated_k__BackingField = value; }
public CyclicComplexType(string qualifiedName, EdmLocation location) : base(qualifiedName, new EdmError[] { new EdmError(location, EdmErrorCode.BadCyclicComplex, Strings.Bad_CyclicComplex(qualifiedName)) }) { }
private static void CheckForNameError(ValidationContext context, string name, EdmLocation location) { if (EdmUtil.IsNullOrWhiteSpaceInternal(name) || name.Length == 0) { context.AddError(location, EdmErrorCode.InvalidName, Strings.EdmModel_Validator_Syntactic_MissingName); return; } else { if (name.Length <= 0x1e0) { if (!EdmUtil.IsValidUndottedName(name)) { context.AddError(location, EdmErrorCode.InvalidName, Strings.EdmModel_Validator_Syntactic_EdmModel_NameIsNotAllowed(name)); } return; } else { context.AddError(location, EdmErrorCode.NameTooLong, Strings.EdmModel_Validator_Syntactic_EdmModel_NameIsTooLong(name)); return; } } }
public CyclicEntityContainer(string name, EdmLocation location) : base(name, new EdmError[] { new EdmError(location, EdmErrorCode.BadCyclicEntityContainer, Strings.Bad_CyclicEntityContainer(name)) }) { }
public UnresolvedAssociation(string qualifiedName, EdmLocation location) : base(qualifiedName, new EdmError[] { new EdmError(location, EdmErrorCode.BadUnresolvedType, Strings.Bad_UnresolvedType(qualifiedName)) }) { }
private static void CheckForUnreacheableTypeError(ValidationContext context, IEdmSchemaType type, EdmLocation location) { IEdmType edmType = context.Model.FindType(type.FullName()); if (edmType as AmbiguousTypeBinding == null) { if (!edmType.IsEquivalentTo(type)) { context.AddError(location, EdmErrorCode.BadUnresolvedType, Strings.EdmModel_Validator_Semantic_InaccessibleType(type.FullName())); } return; } else { context.AddError(location, EdmErrorCode.BadAmbiguousElementBinding, Strings.EdmModel_Validator_Semantic_AmbiguousType(type.FullName())); return; } }
private static IEnumerable<EdmError> ConversionError(EdmLocation location, string typeName, string typeKindName) { return new[] { new EdmError(location, EdmErrorCode.TypeSemanticsCouldNotConvertTypeReference, Edm.Strings.TypeSemantics_CouldNotConvertTypeReference(typeName ?? EdmConstants.Value_UnnamedType, typeKindName)) }; }
private static IEnumerable<EdmError> ConversionError(EdmLocation location, string typeName, string typeKindName) { EdmError[] edmErrorArray = new EdmError[1]; EdmError[] edmError = edmErrorArray; int num = 0; EdmLocation edmLocation = location; int num1 = 230; string str = typeName; object obj = str; if (str == null) { obj = "UnnamedType"; } edmError[num] = new EdmError(edmLocation, (EdmErrorCode)num1, Strings.TypeSemantics_CouldNotConvertTypeReference(obj, typeKindName)); return edmErrorArray; }
public UnresolvedLabeledElement(string label, EdmLocation location) : base(label, new EdmError[] { new EdmError(location, EdmErrorCode.BadUnresolvedLabeledElement, Strings.Bad_UnresolvedLabeledElement(label)) }) { }
public UnresolvedProperty(IEdmStructuredType declaringType, string name, EdmLocation location) : base(declaringType, name, new EdmError[] { new EdmError(location, EdmErrorCode.BadUnresolvedProperty, Strings.Bad_UnresolvedProperty(name)) }) { }
public UnresolvedAssociationEnd(IEdmAssociation declaringAssociation, string role, EdmLocation location) : base(declaringAssociation, role, new EdmError[] { new EdmError(location, EdmErrorCode.BadNonComputableAssociationEnd, Strings.Bad_UncomputableAssociationEnd(role)) }) { }